Forum Discussion
Find and Replace Formulas
- Oct 18, 2024
WendyVN maybe there is another way but this might work for you if they are all in the same column:
1) convert worksheet to R1C1 style
2) find & replace
3) convert workshet back to A1 style
so step 1 is go into excel options select formulas section and click the checkbox for R1C1 style. See image below
now all the formulas will look something like =RC[-5]+RC[-4]-RC[-3]
highlight that formula and go into find and replace and paste that into the find
under replace you can change the + to - so it will be =RC[-5]-RC[-4]-RC[-3]
then go back into options and unclick the R1C1 checkbox.
For the future consider using array formulas so =A1:A100 + B1:B100 - C1:C100 which will do the calculation on all 100 rows and then if you need to change you only change the 1 cell.
Or better yet you can use LAMBDA so you define a LAMBDA function like MyCalc
MyCalc := LAMBDA(a,b,c, a+b-c)
then you have =MyCalc(A1, B1, C1) or =MyCalc(A1:A100, B1:B100, C1:C100) in the formula boxes. Then if you need to change the calculation you go back into your Name Manager and change the definition of MyCalc to be MyCalc := LAMBDA(a,b,c, a-b-c) and then all cases of that are corrected.
the other 2 points at the end were just some tip to think about going forward about how to potentially improve the maintanability of your sheets.