Is there a way to combine these 4 IF functions into 1 function?
The most I could do is write it like
But the problem I need it to state specificially (UP/DOWN/LEFT/RIGHT) but the code above could only output values values is true/false (YES/NO).
Thanks!
VBA Code:
=IF(AND(E3>C3,G3>E3,F3>D3,H3>F3),"UP","NO")
=IF(AND(C3>E3,E3>G3,D3>F3,F3>H3),"DOWN","NO")
=IF(AND(E3>C3,G3>E3,D3>F3,F3>H3),"LEFT","NO")
=IF(AND(C3>E3,E3>G3,F3>D3,H3>F3),"RIGHT","NO")
The most I could do is write it like
VBA Code:
=IF(OR(AND(E3>C3,G3>E3,F3>D3,H3>F3),AND(C3>E3,E3>G3,D3>F3,F3>H3),AND(E3>C3,G3>E3,D3>F3,F3>H3),AND(C3>E3,E3>G3,F3>D3,H3>F3)),"YES","NO")
But the problem I need it to state specificially (UP/DOWN/LEFT/RIGHT) but the code above could only output values values is true/false (YES/NO).
Thanks!