Nested if question

D

dakotasteve

In the cell where the formula resides, I get a FALSE result. My
intention is that I get a message that says "No Deprec. this yr". My
formula is as follows:

=IF(B36<$D$23,IF(E36<D36,(1/C36*D36),"No Dep. This yr"))

If anyone can tell me where I am going wrong, please let me know.
Thanks everyone!
 
S

swatsp0p

Without seeing your data and fully understanding what you are comparing
I think this may meet your needs:

=IF(AND(B36<$D$23,E36<D36),(1/C36*D36),"No Dep. This yr")

as your formula looks first at B36<D23 and if true then looks a
E36<D36. If true then do the math. Therefore if either are false, "N
Dep...." should be returned.

Is this what you are trying to accomplish?

Alternately, you could simply add a second 'value_if_false' parameter
as such:

=IF(B36<$D$23,IF(E36<D36,(1/C36*D36),"No Dep. This yr"),"No Dep. Thi
yr")

as you have two IF statements, you need two 'value_if_false' values
else the default "FALSE" is returned.

Bruc
 
D

Dave Peterson

=IF(B36<$D$23,IF(E36<D36,(1/C36*D36),"No Dep. This yr"),"this is B36>=d23")

Or maybe if you want the same message:

=if(and(b36<$d$23,E36<d36),1/c36*d36,"no dep. this yr")
 
S

Sandy Mann

dakotasteve,

The Reason that you were getting FALSE as a return from your formula was
that you have not provided an option for when the 1st test was false. If
the 1st test:

=IF(B36<$D$23

is not true then XL will skip the "do is test true" part of the formula
which in your case is the ENTIRE next IF statement:

IF(E36<D36,(1/C36*D36),"No Dep. This yr")

So being as there is no other option, the formula returns FALSE


--
HTH

Sandy
(e-mail address removed)
Replace@mailinator with @tiscali.co.uk


"dakotasteve" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top