Multiple if and

Copper Contributor
Hello,

I would like one cell to determine 4 AND scenarios and return a specified result if true. I’m unable to get past 2 AND statements in one formula. Can anyone help?

=IF(AND(C2>C5,D2<D5),A2,IF(AND(C2<C5,D2>D5),B2,IF(AND(C2>C5,D2>D5),IF(AND(C2<C5,D2<D5)F2,C2*C5))))
1 Reply

@bnelson61 

Perhaps you meant

 

=IF(AND(C2>C5,D2<D5),A2,IF(AND(C2<C5,D2>D5),B2,IF(AND(C2>C5,D2>D5),F2,IF(AND(C2<C5,D2<D5),C2*C5))))

 

or (if you have Excel 2019 or later)

 

=IFS(AND(C2>C5,D2<D5),A2,AND(C2<C5,D2>D5),B2,AND(C2>C5,D2>D5),F2,AND(C2<C5,D2<D5),C2*C5)

 

Please note that the formula will return FALSE if C2=C5 and/or D2=D5 since your conditions don't include that situation.