Deleting part of a formula

Hoosier03

Board Regular
Joined
Apr 29, 2011
Messages
121
Is there a way to delete part of a formula without deleting the entire formula?

I have these formulas =(+U21*OpsCalc!$E$161)*0.01, =(U21*OpsCalc!$E$162)*0.01,=(U21*OpsCalc!$E$163)*0.01, etc. and I have to delete the *.01 out of them. There are 250 in each worksheet and I have 17 worksheets. Is there a way to do this without deleting all of them manually?


I tried find and replace and I could not get it to delete just part of the formula. I am using Excel 2007.


Thanks,


Rodney
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Select you cells, press CTRL+H to bring up Excel's Replace Dialog box, put this (exactly as shown)...

~*0.01

in the "Find what" field, leave the "Replace with" field empty, click the "Options>>" button to reveal all the options and make sure the "Match entire cell contents" checkbox is not checked, then click the "Replace All" button.
 
Upvote 0
Paste into a Standard Module - Highlight the area of your spreadsheet with the formulas, then run FixFormulas -- Do this on a FILE BACKUP First...


Code:
Sub FixFormula()
Dim C As Range
Dim Temp As String
For Each C In Selection
If C.HasFormula Then
Temp = C.Formula
Temp = WorksheetFunction.Substitute(Temp, "*0.01", "")
C.Formula = Temp
End If
Next C
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,855
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top