Help on IF condition

  • Thread starter Thread starter Karthik
  • Start date Start date
K

Karthik

I want cell 'G4' to show "Red" if the value Cell 'D4' is greater than the
value of 'A7' and 'E4' is greater than 'A9' and show "Green" if any one of
them is less than 'A7' or 'A9' respectively.
I tried a formula but it didn't work as I expected.
=IF(AND(D4>$A$7,E4>$A$9),"Red","Green")
Any suggestions would be appreciated.

Thanks..
 
=IF(AND(D4>$A$7,E4>$A$9),"Red","Green")
will display Green for all conditions unless d4 and E4 are greater than...
If blank or equal, then you need to deal with that as well..

=IF(AND(D4>$A$7,E4>$A$9),"Red",IF(OR(D4<$A$7,E4<$A$9),"Green",""))
 
=IF(AND(D4>$A$7,E4>$A$9),"Red","Green")
will display Green for all conditions unless d4 and E4 are greater than...
If blank or equal, then you need to deal with that as well..

=IF(AND(D4>$A$7,E4>$A$9),"Red",IF(OR(D4<$A$7,E4<$A$9),"Green",""))
 
Thanks Jacob,
--
Karthi


Jacob Skaria said:
=IF(AND(D4>$A$7,E4>$A$9),"Red","Green")
will display Green for all conditions unless d4 and E4 are greater than...
If blank or equal, then you need to deal with that as well..

=IF(AND(D4>$A$7,E4>$A$9),"Red",IF(OR(D4<$A$7,E4<$A$9),"Green",""))
 
Thanks Jacob,
--
Karthi


Jacob Skaria said:
=IF(AND(D4>$A$7,E4>$A$9),"Red","Green")
will display Green for all conditions unless d4 and E4 are greater than...
If blank or equal, then you need to deal with that as well..

=IF(AND(D4>$A$7,E4>$A$9),"Red",IF(OR(D4<$A$7,E4<$A$9),"Green",""))
 
Back
Top