Forum Discussion
Mike Button
Apr 28, 2022Copper Contributor
Nested If statement help
I know this is/has been asked a thousand times but having problems getting my head around this, it is simple I know but driving me nuts.
I have column A that has a Value X, Y or Z, then Column B, with a time in minutes. In Column C, I want to say "if Column A is value Y and B is < 0.31, then say Met, if Column A is X or Z and it is less than 120 they say Met, otherwise, say Miss"
- Got it figured out:
=IF(OR(AND(A2>="Y", B2<=30), AND(A2<>"Y", B2<=120)), "Met", "Miss")
3 Replies
- Mike ButtonCopper ContributorI should note, I have the basic equation so far just not sure how to add in the 2nd criteria
=IF(AND(A2="Y", B<0.31), "Met", "Miss")- Mike ButtonCopper ContributorGot it figured out:
=IF(OR(AND(A2>="Y", B2<=30), AND(A2<>"Y", B2<=120)), "Met", "Miss")- mathetesSilver Contributor
Good job!
There's a minor extraneous character in your formula. You can take it out with no adverse effect.
=IF(OR(AND(A2>="Y", B2<=30), AND(A2<>"Y", B2<=120)), "Met", "Miss")
After all, there's no such thing as "greater than 'Y'". it either equals "Y" or it doesn't, and you have those two possibilities covered.