![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Canada
Posts: 50
|
Can anyone tell me why this insists on bringing up the #DIV/0! Error
=IF((E6-F6)/E6="0","",(E6-F6)/E6) |
|
|
|
|
|
#2 | |
|
New Member
Join Date: Mar 2002
Location: San Ramon CA
Posts: 23
|
Quote:
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. |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Maybe this:
=If(I7,G7/I7-1,0) change cell refs to suit James |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
I'm surprised no one nailed this down already.
Do a Search on this poster's name, you'll understand. Aladin |
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Location: San Ramon CA
Posts: 23
|
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... |
|
|
|
|
|
#6 | |
|
Board Regular
Join Date: Apr 2002
Location: Arizona
Posts: 68
|
Quote:
=IF(E6<>0,IF((E6-F6)/E6 = 0,"",(E6-F6)/E6),"") |
|
|
|
|
|
|
#7 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Using one of Aladin's tricks (This was a good one Al):
=if(e6,(e6-f6)/e6,o) _________________ Cheers, NateO ![]() [ This Message was edited by: NateO on 2002-05-06 18:02 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|