Macro to replace tab name in a link

gquest

Board Regular
Joined
Feb 20, 2007
Messages
167
Hello,

I have a file (let's call it file A) that is linked to another file (file B) that gets updated monthly. I would like to link file A to file B and just edit links > change source every month, but the problem is the tabs I am linking to contain the current month in the tab name.

Is it possible to create a macro that looks in a table in file A (sheet1'!A1:B3 - column A is the tab names in file A and column B is the new tab names in file B) and does a find replace in each of the three tabs in file A for the new tab names in file B according to what's in the table? IS this the best way to handle this issue? Thank you in advance for your help, George
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,920
Messages
5,834,374
Members
430,281
Latest member
fabcat1

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
Top