Nested IF AND OR Function

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".

1st Variable2nd
Variable
ResultsExpected Results
ActiveYESNo MatchMatch
InactiveNONo MatchMatch
ActiveNONo MatchNo Match
InactiveYESNo MatchNo Match

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

I'm stumped.

Many thanks in advance.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
It looks like your OR is in the wrong place. Give this a try.

Code:
=IF([COLOR="#0000FF"]OR(AND(I3="Active",J3="YES"),AND(I3="Inactive",J3="NO"))[/COLOR],"Match","No Match")
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top