Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to add this formula in a cell to get rid of a div/0 error but it
won't let me add it =IF(L4=0,0,IF(L20=0,0,if(l4=0 and l20=0,0,(L4-L20)/L4))) it doesn't like the statement if(l4=0 and l20=0,0 is there anyway to easily get rid of div/0 error thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=IF(L4=0,0,IF(L20=0,0,if(AND(l4=0, l20=0),0,(L4-L20)/L4)))
-- - K Dales "Nigel" wrote: I am trying to add this formula in a cell to get rid of a div/0 error but it won't let me add it =IF(L4=0,0,IF(L20=0,0,if(l4=0 and l20=0,0,(L4-L20)/L4))) it doesn't like the statement if(l4=0 and l20=0,0 is there anyway to easily get rid of div/0 error thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nigel,
have you tried: =IF(L4=0,0,IF(L20=0,0,IF(L4=0 + L20=0,0,(L4-L20)/L4))) regards, Rob. "Nigel" wrote: I am trying to add this formula in a cell to get rid of a div/0 error but it won't let me add it =IF(L4=0,0,IF(L20=0,0,if(l4=0 and l20=0,0,(L4-L20)/L4))) it doesn't like the statement if(l4=0 and l20=0,0 is there anyway to easily get rid of div/0 error thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=If(L4<0,(L4-L20)/L4,0)
only the denominator needs to be checked. If you wanted to check both =If(And(L4<0,L20<0),(L4-L20)/L4,0) -- Regards, Tom Ogilvy "Nigel" wrote in message ... I am trying to add this formula in a cell to get rid of a div/0 error but it won't let me add it =IF(L4=0,0,IF(L20=0,0,if(l4=0 and l20=0,0,(L4-L20)/L4))) it doesn't like the statement if(l4=0 and l20=0,0 is there anyway to easily get rid of div/0 error thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula returns error; abbreviating the formula | Excel Discussion (Misc queries) | |||
Error in Formula ?? | Excel Worksheet Functions | |||
How do I replace "#N/A" error, to continue my formula w/o error? | Excel Worksheet Functions | |||
#REF error in formula | Excel Discussion (Misc queries) | |||
Formula error with Mac resulting in '#NAME' error | Excel Programming |