Compare Different Data with Rules

perrymans

New Member
Joined
Aug 21, 2011
Messages
22
Is there a better way to compare lists with rules other than lots of nested IF statements?

List A
------
pass
unknown
fail

List B
------
NR (--unkown--)
NF (--pass--)
O (--fail--)

Rules
------
If A=pass AND B=NF then Pass
If A=fail AND B=O then Fail
If A=pass and B<>NF then Pass/Mismatch
If A=fail and B<>O then Fail/Mismatch
etc.

Didn't know if there was some fancier way to accomplish.

Thanks. Sean.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
you could use "Select Case" statements like:


Code:
Select Case A
        Case Pass
            Select Case B
                Case NF
                    'Pass
                Case Else ' <> NF
                    'Pass_Mismatch
            End Select
        Case Fail
            Select Case B
                Case O
                    'Fail
                Case Else ' <> O
                    'Fail_Mismatch
        End Select
End Select
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,659
Members
449,462
Latest member
Chislobog

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