Adding "IFERROR" with substitute formula:

valmir

Active Member
Joined
Feb 10, 2021
Messages
272
Office Version
  1. 365
Platform
  1. Windows
Hello everyone:
In cell I3, I have this formula:
Excel Formula:
=I4-I5
In cell J3 I want to use a substitute formula to turn the cell in I3 into this:
Excel Formula:
=IFERROR(I4-I5;"")
I tried this:
Excel Formula:
=SUBSTITUTE(I3; "="; "=IFERROR(") & ';"")
But it's giving me a "not a formula?" error.
Any solution? Or any other solution to automatically replace formulas with "iferror"?
 
That is not a valid formula.
I don't think you can use the SUBSTITUTE function on formulas. I believe it works on the values being returned by the formulas, not the underlying formulas.
If you want to change the formulas, you would either need to use the Find/Replace functionality, or VBA.

But why do you need a formula to change it?
Why not just re-type the formula the way you want?
If it covers a multi-cell range, you should just be able to copy/auto fill the rest of the range after your fix the first one.
 
Upvote 0
That is not a valid formula.
I don't think you can use the SUBSTITUTE function on formulas. I believe it works on the values being returned by the formulas, not the underlying formulas.
If you want to change the formulas, you would either need to use the Find/Replace functionality, or VBA.

But why do you need a formula to change it?
Why not just re-type the formula the way you want?
If it covers a multi-cell range, you should just be able to copy/auto fill the rest of the range after your fix the first one.
Thanks for the explanation. I couldn't think that far... :)
 
Upvote 0
Note, if you wanted a separate formula in J3, leaving formula I3 alone, you could just put this in J3:
Excel Formula:
=IFERROR(I3,"")
which I think will get you the result you want.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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