Macro consolidation + record filename

dudumomo

Board Regular
Joined
Jun 3, 2014
Messages
65
Hi there,

I'm looking to consolidate around 100 files having the same format (without headers) into 1.
I need to records the files names that is being imported in the last column for example, in order to keep track.

Ideally, it would be nice to run the macro from a new excel file and the macro will ask to select the folder where all the files are, for the consolidation.

I found some similar macro but never with the the file name record.

Do you have some example that I could reuse for such macro?

Thank you!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thank you Fazza.

It does take the filename! Good.
However their full macro only copy paste the first line. I will have to tweak it.

Also, I've just realized that all my files are csv.

Any different macro for csv then?

Thanks
 
Upvote 0
please try google, there are many on line samples. Also (that is, also as per my earlier post) by Ron de Bruin is

http://www.rondebruin.nl/win/s3/win021.htm
 
Upvote 0

Forum statistics

Threads
1,207,197
Messages
6,077,013
Members
446,250
Latest member
Dontcomehereoften

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