Dividing by zero with nested IF's

Scott Krause

Board Regular
Joined
Mar 8, 2009
Messages
96
I'm working with excel 2003, I've got one column (E) being divided by another (H). If column E is 0 I get #DIV/0!. Here's the formula I used, what can I do to have 0 entered instead of the error?

=IF(H6/E6<0.5,0,IF(H6/E6<0.67,1,IF(H6/E6<0.83,2,IF(H6/E6<1,3,IF(H6/E6<1.17,4,5)))))

Thanks again
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Or =IF(E6="", 0, IF(E6=0,0, IF(H6/E6<0.5,0,IF(H6/E6<0.67,1,IF(H6/E6<0.83,2,IF(H6/E6<1,3,IF(H6/E6<1.17,4,5)))))))

Which probably isn't as efficient as Mikes
 
Upvote 0
Inconsistent with the formula around it?? This would be because you haven't changed them all to the new formula yet
 
Upvote 0

Forum statistics

Threads
1,203,198
Messages
6,054,073
Members
444,701
Latest member
PTDykman

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