Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2015, 05:12 AM
tinfanide tinfanide is offline Find & Replace in Formulas? Windows 7 64bit Find & Replace in Formulas? Office 2010 32bit
Expert
Find & Replace in Formulas?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 11-04-2015, 05:23 AM
macropod's Avatar
macropod macropod is offline Find & Replace in Formulas? Windows 7 64bit Find & Replace in Formulas? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace in Formulas? 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 & Replace in Formulas? 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
Find & Replace in Formulas? Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Find & Replace in Formulas? Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft