#DIV/0! Errors

Carl Clements

Board Regular
Joined
Jun 13, 2008
Messages
95
Hi,

I'm using a long formula which is returning a #DIV/0! value for some cells where it is unable to perform the calculation.

Is there a subsequent formula I can use to change this to a different value? I tried using the below IF statement but it still returns the same message.

=IF(S9="#DIV/0!",1,2)

Thanks,
Carl
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You could use:

=IF(ISERROR(S9),1,2)

or if you want to be completely specific about #DIV/0!:

=IF(ERROR.TYPE(S9)=2,1,2)

or just fix the original formula
 
Upvote 0
Hi Carl

If your using Excel 2007 then you can use something like

Code:
=IFERROR(S9,1)

Or an earlier version...

Code:
=IF(ISERROR(S9),1,2)

HTH :)
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,510
Members
452,918
Latest member
Davion615

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