ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Incorrect Formual (https://www.excelbanter.com/excel-programming/336504-incorrect-formual.html)

Nigel

Incorrect Formual
 
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

Vacation's Over

Incorrect Formual
 
Try one more IF
=IF(L4=0,0,IF(L20=0,0,if(l4=0,if( l20=0,0,(L4-L20)/L4),(L4-L20/L4))))


"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


Nigel

Incorrect Formual
 
I did some investigation and maybe found a better way

=IF(ISERROR(IF(L4-L201,L4-L20,IF(L4-L20<-1,L4-L20,""))),"",IF(L4-L201,L4-L20,IF(L4-L20<-1,L4-L20,"")))


"Vacation's Over" wrote:

Try one more IF
=IF(L4=0,0,IF(L20=0,0,if(l4=0,if( l20=0,0,(L4-L20)/L4),(L4-L20/L4))))


"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


Tom Ogilvy

Incorrect Formual
 
=if(L4<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




STEVE BELL

Incorrect Formual
 
Tom,

I frequently use:
=If(L4,(L4-L20)/L4,0)

Is this just another alternative, or am I asking for trouble...

Thanks...

--
steveB

Remove "AYN" from email to respond
"Tom Ogilvy" wrote in message
...
=if(L4<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






Tom Ogilvy

Incorrect Formual
 
six of one, half dozen of another. If someone else has to use the sheet,
mine method is clearer in my opinion (but every one has one).

--
Regards,
Tom Ogilvy

"STEVE BELL" wrote in message
news:d_LIe.24$vD.18@trnddc05...
Tom,

I frequently use:
=If(L4,(L4-L20)/L4,0)

Is this just another alternative, or am I asking for trouble...

Thanks...

--
steveB

Remove "AYN" from email to respond
"Tom Ogilvy" wrote in message
...
=if(L4<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








STEVE BELL

Incorrect Formual
 
Tom,

Thanks!

Just wanted to make sure I wasn't setting myself up...

--
steveB

Remove "AYN" from email to respond
"Tom Ogilvy" wrote in message
...
six of one, half dozen of another. If someone else has to use the sheet,
mine method is clearer in my opinion (but every one has one).

--
Regards,
Tom Ogilvy

"STEVE BELL" wrote in message
news:d_LIe.24$vD.18@trnddc05...
Tom,

I frequently use:
=If(L4,(L4-L20)/L4,0)

Is this just another alternative, or am I asking for trouble...

Thanks...

--
steveB

Remove "AYN" from email to respond
"Tom Ogilvy" wrote in message
...
=if(L4<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










All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com