Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro to update File and Worksheet References in Formulas
I need to create a macro that will update the file name and worksheet (tab)
references for all formulas within a range. I already have set up form drop down boxes for the users to select the file and worksheet reference. I need the VBA coding that will capture the users inputs and complete a find/replace on all of the formulas for file name/worksheet. Would anyone provide the code or point me in the direction of where this has been discussed previously? Much Thanks!!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro to update File and Worksheet References in Formulas
Sub replaceformula()
OldFile = "OldFile" NewFile = "NewFile" OldSheetName = "OldSheet" NewSheetName = "NewSheet" Set ReplaceRange = Range("A1:G7") ReplaceRange.Replace What:=OldFile, _ Replacement:=NewFile, _ SearchOrder:=xlByColumns, _ MatchCase:=True ReplaceRange.Replace What:=OldSheetName, _ Replacement:=NewSheetName, _ SearchOrder:=xlByColumns, _ MatchCase:=True End Sub "Padrager" wrote: I need to create a macro that will update the file name and worksheet (tab) references for all formulas within a range. I already have set up form drop down boxes for the users to select the file and worksheet reference. I need the VBA coding that will capture the users inputs and complete a find/replace on all of the formulas for file name/worksheet. Would anyone provide the code or point me in the direction of where this has been discussed previously? Much Thanks!!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy of a Worksheet Does Not Update Chart References | Excel Worksheet Functions | |||
Update References in Formulas when Columns are Inserted and Rows are Skipped | Excel Programming | |||
Adding a row to worksheet does not update cell references in another. | Excel Worksheet Functions | |||
How do I create a macro, that references another excel file ??? | Excel Worksheet Functions | |||
Create a Worksheet by getting datas from the txt file with Macro | Excel Programming |