PDA

View Full Version : What is the meaning of this formula?



moishy
06-12-2012, 05:35 PM
What is the meaning of this formula

=IF(AND(A4=1,A5>0),"END",IF(AND(A4="",A5=""),"END",""))

NBVC
06-12-2012, 06:50 PM
What is the meaning of this formula

=IF(AND(A4=1,A5>0),"END",IF(AND(A4="",A5=""),"END",""))

the formula first checks if cell A4 has a 1 in it and cell A5 has a value greater than a 0 in it. If both are true, then the word "END" is placed in the cell the formula is in. If either is False, the the formula checks if both A4 and A5 cells are blank, if that is True, then "END" is placed in the cell the formula is in... otherwised the cell the formula is in stays blank.

It could be shortened to:

=IF(OR(AND(A4=1,A5>0),AND(A4="",A5="")),"END","")

This checks if either the first combination of A4=1 and A5=0 or A4 and A5 are blank is true and puts "END" if either combination is true.. otherwise leaves a blank.