Macros: Create macro to combine several files

GuyFromStl

New Member
Joined
Sep 8, 2012
Messages
18
I receive daily files that I must combine into a single file each month. The data in each file is the same (fields) but the challenge is the file name is different each day.

Is there a way i can create a macro to combine all files together? Since the file names are different I would put into a temp directory and have the macro do a loop until it reads all files.

Any suggestions?
 
I would like to thank you for your help today. The new code worked like a charm. This will surely save time and ensure that I consolidate the data into one file without the potential for overlaying data.</SPAN>
Thanks again. </SPAN>
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I would like to thank you for your help today. The new code worked like a charm. This will surely save time and ensure that I consolidate the data into one file without the potential for overlaying data.</SPAN>
Thanks again. </SPAN>

I have had better days without so much bumbling around. But I was somewhat preoccupied today and didn't pay close attention to detail. Anyhow, glad you got it going.

Regards, JLG
 
Upvote 0

Forum statistics

Threads
1,223,991
Messages
6,175,820
Members
452,672
Latest member
missbanana

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