0

What is wrong in my formula:

=IF(D2>B2 AND (F2==auc OR F2==r2), D2-B2, B2-D2)

auc and r2 are values in column F2. I want the following logic:

if value in col D > val in col B AND metric is auc or r2 then D-B, else B-D

Now sure what is not correct in my expression.

Thanks!

1 Answer 1

2

You are writing it incorrectly. It should be:

=IF(AND(D2>B2, OR(F2="auc", F2="r2")), D2-B2, B2-D2)

In Excel, the functions' arguments are inside the parenthesis. Also you don't use == but =.

enter image description here

1
  • damn my pythonic urge, thank you
    – YohanRoth
    Jul 3, 2020 at 2:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .