Check IF statement please

I

Iriemon

I'm getting confused!!
Here is what I am tryng to accomplish:

IF K2>3 and <= 4
AND
D2>0 and <25

put in a 10

IF K2>2.4 and <=3
AND
D2>0 and <25

put in an 11


Do I have an extra AND at the beginning of the IF's in this formula?

=IF(AND(AND($K2>3,$K2<=4),AND($D2>0,$D2<25)),10,IF(AND(AND($K2>2.4,$K2<=3,AND($D2>0,$D2<25)),11,""))
 
J

Jacob Skaria

You dont need those extra AND()'s. You can have those together in one.

=IF(AND($K2>3,$K2<=4,$D2>0,$D2<25),10,IF(AND($K2>2.4,$K2<=3,$D2>0,$D2<25),11,""))

If this post helps click Yes
 
S

Sean Timmons

=IF(AND(K2>3,K2<=4,D2>0,D2<25),10,IF(AND(K2>2.4,K2<=3,D2>0,D2<25),11))

No need to separate the criteria...
 
I

Iriemon

Both of you came up with the same solution, but when I tried it and neither
condition is met, it returns "FALSE".

How do I get it to return "" (empty string) instead?

Thanks
 
I

Iriemon

Sorry, Jacob has it the way I want.

Thank again

Jacob Skaria said:
You dont need those extra AND()'s. You can have those together in one.

=IF(AND($K2>3,$K2<=4,$D2>0,$D2<25),10,IF(AND($K2>2.4,$K2<=3,$D2>0,$D2<25),11,""))

If this post helps click Yes
 
F

Fred Smith

They are not the same. Use Jacob's solution. It will return the empty string
for you.

Regards,
Fred.
 

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

Top