Тёмный
No video :(

How to Import data from a Text File into Excel 

Ajay Anand
Подписаться 152 тыс.
Просмотров 9 тыс.
50% 1

Please watch: "25 Advanced Excel Shortcuts"
• 25 Advanced Excel Shor... -~-
How to Read Data from a Text File or multiple Text Files and Import that data into an Excel Sheet or Excel Workbook using VBA
Topics discussed are :
1. Input Function in VBA
2. File Number
3. Reading data from a text file/files
4. Importing Data into Excel Sheet / Workbook
Check out my video on How to convert PDF file into Word, Excel or JPEG format
• How to convert PDF fil...
Hit the Subscribe Button and Stay Tuned for updates.
#ImportTextFileIntoExcel #ImportDataintoExcel #ReaddatafromMultipleTextFiles
I strongly recommend TubeBuddy for upcoming RU-vidrs
www.tubebuddy.com/ajayanand
Visit my webpage
xlncad.com

Опубликовано:

 

16 окт 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@AjayAnandXLnCAD
@AjayAnandXLnCAD 5 лет назад
Codes explained here can be downloaded from the following link xlncad.com/macros-excel/
@adriancaluya5572
@adriancaluya5572 5 лет назад
this vid is great. I'll try to use this as reference to make my attendance sheet.
@AjayAnandXLnCAD
@AjayAnandXLnCAD 5 лет назад
Happy to see that you find the video useful. And thanks for leaving feedback.
@AjayAnandXLnCAD
@AjayAnandXLnCAD 5 лет назад
Following is the answer to a question raised by a viewer in FB The question was, how can I read/extract a sentence written in a 'specific line number' in a text file? If you want to read a sentence from a specific line in a text file, for example, the sentence from line number 3 of a text file called VBA Tutorial.txt in the Drive D, the code will be Dim Temptext As String Open "D:\VBA Tutorial.txt" For Input As 1 Range("C1").Select For i = 1 To 3 Input #1, Temptext Next i ActiveCell.Value = Temptext Close (1) --------------------------------------------------------------------------------- then if you want to return the line number of a specific line in text file called VBA Tutorial.txt in the Drive D, for example, the line number of 'XL n CAD' in a text file called VBA Tutorial.txt Dim lineno As Integer lineno = 1 Open "D:\VBA Tutorial.TXT" For Input As 2 Range("C1").Select Do Until EOF(2) Input #2, Temptext If Temptext = "XL n CAD" Then ActiveCell.Value = lineno End If lineno = lineno + 1 Loop Close (2)
@salmannaseer1286
@salmannaseer1286 4 года назад
thanks bro
@AjayAnandXLnCAD
@AjayAnandXLnCAD 4 года назад
My pleasure
@trabajo5539
@trabajo5539 3 года назад
Hi, great video! Simple question, how can I open txt files when they have the same name but at the end of the name has a date instead of a consecutive number?
@AjayAnandXLnCAD
@AjayAnandXLnCAD 3 года назад
Yes, you can. Should modify the code accordingly.
@mahhongyew9524
@mahhongyew9524 3 года назад
Hi Sir Can share the coding.
@shyamsolanki5229
@shyamsolanki5229 3 года назад
Sir this code my text file data automatically trim but i am not want trim data i am want same format paste in excel
@darshanitharangathotagamuw5618
@darshanitharangathotagamuw5618 4 года назад
hi Anand, Thank you for the great video. I am a beginner for VBA. I am wondering whether how I can modify this code for my purpose. I have multiple txt files with same format. for example the first 2 files; file1.txt Para1:aaaa Para2: bbbb Para3:cccc file2.txt Para1:dddd Para2: eeee Para3:ffff I need to extract the data into columns in a excel sheet like; Para1 Para2 Para3 aaaa bbbb cccc dddd eeee ffff Highly appreciate if you can assist me to get this Thank you
@AjayAnandXLnCAD
@AjayAnandXLnCAD 4 года назад
Darshani, I suggest to use Power Query in Excel for this purpose. Of course VBA can be used, but this particular task won't be easy for a beginner.
@darshanitharangathotagamuw5618
@darshanitharangathotagamuw5618 4 года назад
@@AjayAnandXLnCAD ok. Thanks Anand
@vighnarajsarang2279
@vighnarajsarang2279 3 года назад
Sir how to import specific data in require specific cells
@AjayAnandXLnCAD
@AjayAnandXLnCAD 3 года назад
You need to specify the target cells. For example, the following statement will insert the value 100 in the cell A1. Range("A1").Value=100
Далее
Import Series - Import CSV TXT File into Excel
26:53
Просмотров 135 тыс.
Schoolboy - Часть 2
00:12
Просмотров 5 млн
How to import data from a Text file into Excel.
3:20
Excel VBA - How to Import Data From a Text File
3:23
Import Text files into Excel [5 Methods]
13:08
Просмотров 66 тыс.
How to use SPLIT Function in Excel VBA - Two Examples
10:22
Schoolboy - Часть 2
00:12
Просмотров 5 млн