Editing an "IF" function across a worksheet/excel file

  • Thread starter Thread starter Cedric Dennis
  • Start date Start date
C

Cedric Dennis

Hi
I have about a 1000 formulae using the function "IF" across many
worksheets in an excel file.
eg: =IF(C1315>0,ROUND(C1315+15,-1),"")
I wish to change the number 15 to 25 across all IF functions in the
worksheet and in all worksheets in the file.
Is there as easy way to do it ?
Any help is appreciated.
Thanks for taking the time.
Regards
Cedric
 
This will do it however be advised that ANY formula that has +15
anywhere in the formula will change. If ?? that is a problem, post
back.

Sub changeformulas()
For Each ws In Worksheets
ws.Cells.SpecialCells(xlCellTypeFormulas).Replace "+15", "+42"
Next ws
End Sub
 
Group the sheets then Edit>Replace

What: +15

With: +25

Replace all

Make sure you set Options>Within to Workbook

Note Don's caveat.


Gord
 
Back
Top