mrcortina1217
New Member
- Joined
- Oct 13, 2015
- Messages
- 2
Hello -
I'm trying to evaluate the contents of two cells with 4 possible values.
I3 can contain either Active or Inactive
J3 can contain either YES or NO
IF I3="Active" AND J3="YES"
OR IF I3="Inactive" AND J3="NO"
THEN "Match"
ELSE "No Match"
I've tried several combinations and am not getting the results I expect - I'm looking for situations where either of these combinations do not exist.
For example, in the test row, I3=Active and J3=Yes ... so I would expect my formula to return "Match" however it returns "No Match"
=IF(AND(I3="Active",J3="YES",OR(AND(I3="Inactive",J3="NO"))),"Match","No Match")
Test rows containing other combinations of the variables also return "No Match".
[TABLE="width: 357"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]1st Variable[/TD]
[TD]2nd
Variable[/TD]
[TD]Results[/TD]
[TD]Expected Results[/TD]
[/TR]
[TR]
[TD]Active[/TD]
[TD]YES[/TD]
[TD]No Match[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]Inactive[/TD]
[TD]NO[/TD]
[TD]No Match[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]Active[/TD]
[TD]NO[/TD]
[TD]No Match[/TD]
[TD]No Match[/TD]
[/TR]
[TR]
[TD]Inactive[/TD]
[TD]YES[/TD]
[TD]No Match[/TD]
[TD]No Match[/TD]
[/TR]
</tbody>[/TABLE]
I'm stumped.
Many thanks in advance.
I'm trying to evaluate the contents of two cells with 4 possible values.
I3 can contain either Active or Inactive
J3 can contain either YES or NO
IF I3="Active" AND J3="YES"
OR IF I3="Inactive" AND J3="NO"
THEN "Match"
ELSE "No Match"
I've tried several combinations and am not getting the results I expect - I'm looking for situations where either of these combinations do not exist.
For example, in the test row, I3=Active and J3=Yes ... so I would expect my formula to return "Match" however it returns "No Match"
=IF(AND(I3="Active",J3="YES",OR(AND(I3="Inactive",J3="NO"))),"Match","No Match")
Test rows containing other combinations of the variables also return "No Match".
[TABLE="width: 357"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]1st Variable[/TD]
[TD]2nd
Variable[/TD]
[TD]Results[/TD]
[TD]Expected Results[/TD]
[/TR]
[TR]
[TD]Active[/TD]
[TD]YES[/TD]
[TD]No Match[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]Inactive[/TD]
[TD]NO[/TD]
[TD]No Match[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]Active[/TD]
[TD]NO[/TD]
[TD]No Match[/TD]
[TD]No Match[/TD]
[/TR]
[TR]
[TD]Inactive[/TD]
[TD]YES[/TD]
[TD]No Match[/TD]
[TD]No Match[/TD]
[/TR]
</tbody>[/TABLE]
I'm stumped.
Many thanks in advance.