#DIV/0! Error

Patrick

Board Regular
Joined
Mar 2, 2002
Messages
50
Can anyone tell me why this insists on bringing up the #DIV/0! Error
=IF((E6-F6)/E6="0","",(E6-F6)/E6)
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
"IF((E6-F6)/E6="0","",(E6-F6)/E6)"

most probably E6 has 0 or no value. Try checking the value of E6 instead of checking the whole formula in the if condition.
 
Upvote 0
In addition to what Shalini noted:

Any number including 0 divided by 0 is undefined and Excel renders this as #DIV/0!

An empty cell in math expressions interpreted by Excel as 0.

Rewrite your formula as:

=IF(E6,(E6-F6)/E6,"")
 
Upvote 0
your first arguement that says if it's equal to "0" is telling it to recognise a textual value of "0"

even if your (E6-f6/e6) is zero, it's not recognising it as text, and thusly defaulting to your 2nd arguement, which results in a division by zero....

drop the "quotes" or go with Aladin's more compact solution
 
Upvote 0
On 2002-04-26 12:26, Chris Davison wrote:
your first arguement that says if it's equal to "0" is telling it to recognise a textual value of "0"

even if your (E6-f6/e6) is zero, it's not recognising it as text, and thusly defaulting to your 2nd arguement, which results in a division by zero....

drop the "quotes" or go with Aladin's more compact solution

Guess what: Dropping the quotes won't help when E6=0 or empty :biggrin:.
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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