# What's wrong with this Excel IF function?

=IF(E13<1001,E13*F5,IF(E13>1000<2001,E13*F6,IF(E13>2000<3001,E13*F7,IF(E13>3000<4001,E13*F8,IF(E13>4001,E13*F9))))) Is it possible to use greater than and less than multiple times in an IF function? Any help is appreciated.
###### Who is Participating?

Commented:
You cannnot say something like E13>1000<2001

The correct way to do this type of thing is to write " E13>1000 AND E13<2001 "

That being said, you don't even need the greater than symbol in the second if statement, because if it has made it that far, then it is a given that E13 is creater than 1000, because you allready proved that it was not less than 1001. You are also missing the else statement for your final if. Your final if should be the else statement.

Therefore, here is the correct formula:

=IF(E13<1001,E13*F5,IF(E13<2001,E13*F6,IF(E13<3001,E13*F7,IF(E13<4001,E13*F8,E13*F9)))))
0

Commented:

To my knowledge, you can use constructs like 'E13>1000<2001' (which I presume means "Is E13 >1000 AND < 2001?")

Try using the AND keyword as per:

=IF(E13<1001,E13*F5,IF(AND(E13>1000,E13<2001),E13*F6,IF(AND(E13>2000,E13<3001),E13*F7,IF(AND(E13>3000,E13<4001),E13*F8,IF(E13>4001,E13*F9)))))

cheers
0

Commented:
As mlsnader submitted moments before, but as I said you do not need and statements at all, it's much more efficient without them, and mlsnader's formula is still missing the final else statement, for the last IF() bracket
0

Commented:
*replace mlsnader with fostejo. I confused the commenter with the questionner.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.