#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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
On 2002-01-14 16:20, Patrick wrote:
Can anyone tell me why this insists on bringing up the #DIV/0! Error
=IF((E6-F6)/E6="0","",(E6-F6)/E6)

Egads, I'm surprised no one nailed this down already.

Patrick, you probably already solved this, but in case you did not, here goes.

Look at your IF "condition":
(E6-F6)/E6="0"

The only times this condition will be TRUE is when E6 and F6 are EQUAL. Then your equation collapses to (0/E6); any time you devide zero by something you get zero.

A better test for your purposes is:

E6=0

because what you REALLY want to avoid with this IF equation is having to divide by zero, which is undefined and thus causes computers to have hissy fits.

So, your IF formula should read:
=IF(E6=0,"",(E6-F6)/E6)

which allows the results to be computed and displayed, and instead of getting DIV/0 errors, you get blanks whenever E6 happens to be 0.
 
Upvote 0
I'm surprised no one nailed this down already.

Do a Search on this poster's name, you'll understand.

Aladin
 
Upvote 0
let me guess, he's the type that posts repeatedly until someone gets on it.

whereas I'm the one that skips randomly through the archives in search of easy questions... :cool:
 
Upvote 0
On 2002-01-14 16:20, Patrick wrote:
Can anyone tell me why this insists on bringing up the #DIV/0! Error
=IF((E6-F6)/E6="0","",(E6-F6)/E6)

perhaps this would help:

=IF(E6<>0,IF((E6-F6)/E6 = 0,"",(E6-F6)/E6),"")
 
Upvote 0
Using one of Aladin's tricks (This was a good one Al):

=if(e6,(e6-f6)/e6,o)

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
wave.gif

This message was edited by NateO on 2002-05-06 18:02
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

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