Hi all
Am a regular reader and user of the advice on these boards, so am really hoping you can help.
I have a spreadsheet with a list of store names in column A. I then have formulas in cell H3 to M3 which pick up data from cells in a separate workbook within the same folder. The second workbook is named as a store number - ie. 344.xlsx. The store number in this example would be the value in Cell A3.
What I am trying to do is create a macro that will copy the formulas down through each row (and new rows when stores are added to list) and then change the workbook link in the formula to pick up the new workbook name (which will be the store number in cell A4 - for example).
Indirect formulas won't work as the store workbooks won't always be open. I am aware of the morefunc addin, but that is not an option as this workbook will be used by others who can't add that in.
What I was hoping for was the VBA code for a simple replace , so that in the formula ='C:\Users\Vicky\Desktop\Store tracker folder\[1408.xlsx]Store Tracker'!$M$71 - the 1408.xlsx can be replaced with, for example 567.xlsx. But the workbook name will always be based on a cell value.
I have tried but failed hopelessly at doing this using Replace in VBA. Any help most welcome!
Am a regular reader and user of the advice on these boards, so am really hoping you can help.
I have a spreadsheet with a list of store names in column A. I then have formulas in cell H3 to M3 which pick up data from cells in a separate workbook within the same folder. The second workbook is named as a store number - ie. 344.xlsx. The store number in this example would be the value in Cell A3.
What I am trying to do is create a macro that will copy the formulas down through each row (and new rows when stores are added to list) and then change the workbook link in the formula to pick up the new workbook name (which will be the store number in cell A4 - for example).
Indirect formulas won't work as the store workbooks won't always be open. I am aware of the morefunc addin, but that is not an option as this workbook will be used by others who can't add that in.
What I was hoping for was the VBA code for a simple replace , so that in the formula ='C:\Users\Vicky\Desktop\Store tracker folder\[1408.xlsx]Store Tracker'!$M$71 - the 1408.xlsx can be replaced with, for example 567.xlsx. But the workbook name will always be based on a cell value.
I have tried but failed hopelessly at doing this using Replace in VBA. Any help most welcome!