#1
|
|||
|
|||
Find & Replace in Formulas?
I'd like to find and replace parts of each formula on a spreadsheet. "Range.Find ... LookIn:=xlFormulas" does the job of Find, but not the job of Replace. However, "Range.Replace" does not look in a formula, just cell values. Is there any fixed function doing the job? Any help is appreciated. |
#2
|
||||
|
||||
Having found the cell, simply use the Replace method to revise the formula. For example:
Code:
Dim Rng As Range With ActiveSheet Set Rng = .Find ... Rng.Formula = Replace(Rng.Formula, "FindString", "ReplaceString") End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Batch Find & Replace for all MSOffice extensions, to replace File Name and Content of the File | QA_Compliance_Advisor | Word VBA | 11 | 09-11-2014 11:51 PM |
Find what box in Find and replace limits the length of a search term | Hoxton118 | Word VBA | 7 | 06-10-2014 05:05 AM |
Find/Find and Replace Loop | Tango Mike | Word | 3 | 04-20-2014 02:47 PM |
Bad view when using Find and Find & Replace - Word places found string on top line | paulkaye | Word | 4 | 12-06-2011 11:05 PM |
Help with find and replace or query and replace | shabbaranks | Excel | 4 | 03-19-2011 08:38 AM |