Importing from Multiple CSV files into corresponding XL sheets using VBA

Pakhi

New Member
Joined
Jul 18, 2017
Messages
1
Hi Board Members,

I need help in creating a Macro which will help me to pull data from Multiple CSV files (text CSV as well as XL CSV, I mean different types of CSV) from a destination folder.
The CSV file names can be stored in a separate sheet as a List. The code has to pickup file names from the list and run the loop to identify the files at Destination, copy the contents in a Workbook. While copying, it will copy to different Worksheets.
Let's say for an example, there is a CVS file named AA, the data from AA file to be copied to the AA sheet/tab in MasterWorkbook. Similarly, the data from AB CSV file to be copied in the AB sheet/tab of the same XL MasterWorkbook.

The List will have the name of Files as AA, AB, etc.

MasterWorkbook can't be changed to accommodate any new feature as it has a different owner. Please help.


Edit: CSV file can come in Text format as well.
 
Last edited by a moderator:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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