How do I import multiple txt files into an excel file and each file's data into an independent Colum on one Worksheet?

Roves12

New Member
Joined
Aug 13, 2021
Messages
3
Office Version
  1. 365
Hi, I am very new using VBA (just started couple of hours ago) and I can't seem to make any code work. I have multiple text files in one folder. I collect multiple files every day. The files are not coma separated. So I am trying to import multiple files onto one worksheet.

I want to separate the data of each file into columns and also have all the data of each file in one excel sheet.
Usually the data on each file looks like this:
1.3338946755,0.0262078755
1.3345811935,0.0266146902
1.3352677114,0.0257036537
1.3359542293,0.0267986581
1.3366407473,0.0267906375
1.3373272652,0.0267787594
1.3380137831,0.0262176413
1.3387003011,0.0262094792

Thanks in advanced!!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Look at this link on how to append text files. Once they are all appended you can then split the data (if you need to) with a comma delimeter in Power Query.

 
Upvote 0
Look at this link on how to append text files. Once they are all appended you can then split the data (if you need to) with a comma delimeter in Power Query.

Look at this link on how to append text files. Once they are all appended you can then split the data (if you need to) with a comma delimeter in Power Query.

Thank you very much!
But now I have all the data from multiple files in one single column instead of having the data of each file separated in individual columns.
How can I move each file’s data in a single column?
 
Upvote 0
If I understand correctly, when you bring the data into the "Master" you want each of the columns appended horizontally and not vertically. Is there only one column in each file? Is there a field name at the top of the column? If yes, are they all the same?
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top