Forum

Notifications
Clear all

Macro for changing the worksheet name in multiple formulae

2 Posts
2 Users
0 Reactions
73 Views
(@mimie)
Posts: 1
New Member
Topic starter
 

I have a master workbook that has 29 worksheets. I have created a macro that opens 29 other workbooks, copies a worksheet from each of them, and then pastes it into the master workbook with the name of worksheet that was initially in the master workbook (before pasting it deletes the equivalent worksheet from the master workbook). 

My problem is that there are formulae in the master workbook linked to the worksheets I have deleted. As the ones i replaced them with have equivalent names, I hoped that the formulae would still work but they don't. 

Is there a way of making a formulae linked to a worksheet name rather than a specific worksheet?

Or if not, how would I got about creating a macro that goes into each formula and links it to the new worksheet?

Thanks! 

 
Posted : 21/03/2019 5:25 am
(@sunnykow)
Posts: 1417
Noble Member
 

It  is difficult to give an exact answer as we don't know if the sheets you are copying contains only data or it includes formulas as well.

Why don't you just copy and paste the data (overriding the old data) instead of deleting the sheets?

 
Posted : 22/03/2019 12:55 am
Share: