Excel: Search & Replace Formulas linked to text boxes?

I have an Excel sheet with diagrams containing text boxes (see below) with each text box linked to a cell on another sheet.

I want to copy this sheet, then bulk search and replace the sheet name in the linked formulas to point to a different location.

Is it possible to search and replace within formulas that are linked to text boxes?

Use a macro:

Sub Macro1()

Dim sh As Shape

For Each sh In ActiveSheet.Shapes

sh.Select

Selection.Formula = Replace(Selection.Formula, "Current Link Path", "New Link Path")

Next sh

End Sub

HTH,
Bernie

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 30, 2024 Views 9 Applies to: