Inequalities Function

E

EngAaron

All,

I am trying to create an If THEN statement in excel for inequalities.

B3 = 80
B4 = 60
B5 = Cell Value

I would like a function that will export the following into :

IF B5 >= B3 THEN "+"
IF B5<B3, B5>B4 THEN " "
IF B5<= B4 THEN "-"

This is the function that I currently have and it does not work:

=IF(B5>=B$3,”+”,IF(AND(B5>B$4,B5<B$3),””,IF(B5<=B$4,”-“)))

Can someone please help me out?

Thank you very much
 
C

Claus Busch

Hi,

Am Fri, 15 Feb 2013 12:51:03 +0000 schrieb EngAaron:
B3 = 80
B4 = 60
B5 = Cell Value

I would like a function that will export the following into :

IF B5 >= B3 THEN "+"
IF B5<B3, B5>B4 THEN " "
IF B5<= B4 THEN "-"

try:
=IF(B5>=B3,"+",IF(AND(B5<B3,B5>B4),"",IF(B5<=B4,"-","")))


Regards
Claus Busch
 
E

EngAaron

I figured it out...

The function to acheive this in excel is:

=IF(B5>=B3,"+",IF(B5<=B4,"-",IF(AND(B5<B3,B5>B4),"n","n"))
 
J

joeu2004

EngAaron said:
I would like a function that will export the following into :
IF B5 >= B3 THEN "+"
IF B5<B3, B5>B4 THEN " "
IF B5<= B4 THEN "-"
This is the function that I currently have and it does not work:
=IF(B5>=B$3,"+",IF(AND(B5>B$4,B5<B$3),"",IF(B5<=B$4,"-")))

You are over-specifying. Try:

=IF(B5>=B$3,"+",IF(B5>B$4,"","-"))

In the second test, we do not need AND(B5<$B3,...). That is implied by the
fact that B5>=B3 is false.

Similarly, the third test is not needed. That is implied by the fact that
B5>B4 is false.
 

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