link multiple files

Tumbad

New Member
Joined
Aug 28, 2019
Messages
30
Hi Friends,

I need to develop macro for one of my day to day activity which involves pasting data from 14 different excel files in single excel file in 14 different sheets. Format of source and destination files name is same except date change.

Destination file is Xxx.ddmmyy.xlsx

Source files format is as below.
XXXXX_XXXXXXX_ddmmyyyy.xls

data in first sheet always of all 14 files. and worksheet name is same across all 14 files.

Always clear data in destination sheets and paste updated data. There is one to one co-relation between which file to go in which sheet however worksheet name in destination file can be changed if required.

Warm regards,
Tumbad
 
Apologies Yongle, I was on leave for few days hence couldn't check this. I am back today. Will test over the weekend and confirm. Thanks a ton for your efforts in writing this.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Thanks Yongle, this works like magic. After doing some testing, below are small clarifications required.

1. Is there number of character limit while searching file? I have one file name which reads as below, which is exactly what i have put in macro, but it doesnt fetch that file.

"ORAN_Redesignes_Below_thresholde_rates_adjust_20200921"

Rest all files got fetched, except this.

2. While cleaning the workseet everytime macro runs, for "Dest.Sheets(x + 2).Cells.ClearContents" want to delete data from column A to L only in all destination sheets.

3. Macro needs to run in checking file itself i.e. in destination file itself and after macro run in completed, simply save the file with date like FV210920 in non macro format in same folder.

Thanks a ton and really appreciate your help so far.

Tumbad
 
Upvote 0
Glad code does what you require
Busy for next day or so - will update thread when clear of other duties
 
Upvote 0
I have not forgotten you, but I am fully committed elsewhere until tomorrow :(
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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