If, then, else statement

A

ACarella

Two things:
What would the formula be for the following:

If D10<K10 and <>0, then L10 (this would put the value in M10)

and

If D10 < K10 and <>0, then highlight and bold L10

thank you
Arlene
 
B

Bob Phillips

M10: =IF(AND(D10<K10,D10<>0),L10,"")

and use that same formula in conditional formatting for L10
 
A

ACarella

Thank you both for your help.
However, one of my If statements was incorrect.
This is what it should be and I cannot get the third IF statement to
function properly
=IF(D10<K10,L10,IF(D10>=K10,F10,IF(B10<C10,D10)))

The 3rd If Statement is the issue. No matter what I do, it doesn't work.
B10 can be blank, so I tried IF B10=' ', D10 or IF B10=0, D10, or IF B10 is
blank, 0
I just can't get it to work. Then it would be the same if this condition
was true then highlight and bold L10
Please help, thank you.
 
B

Bob I

No you don't seem to understand, ONE OF THE FIRST TWO IF's ARE ALWAYS
TRUE! The third IF will NEVER be reached to be acted upon.
 
A

ACarella

oh, is there a way to rewrite the formula to return the value if any of the
three IF statements are reached?
 
B

Bob I

No, it a progression, IF, THEN, ELSE. You will need to place them in
ORDER of the desired outcome. Place the B10 one first. Once you evaluate
to TRUE then that is the last evaluation that is done, game over.
 
A

ACarella

Hi Bob:
This works and enters the value into M10.
IF(AND(D10<K10,D10<>0),L10)
However, if the statement is false it returns
#VALUE!
is there a way to make the statment return 0 if false so that the I can
subtotal on the column?
Thank you.
 
B

Bob I

=IF(AND(D10<K10,D10<>0),L10,0)
Hi Bob:
This works and enters the value into M10.
IF(AND(D10<K10,D10<>0),L10)
However, if the statement is false it returns
#VALUE!
is there a way to make the statment return 0 if false so that the I can
subtotal on the column?
Thank you.

:
 

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