Checking for Matching Data in Two Columns

damccart

New Member
Joined
Nov 28, 2017
Messages
2
I'm needing to create a formula to check two columns. I'm needing to check following...

if the first column has an A, then the second column should have a 1 or 2;
if the first column has a B, then the second column should have a 2 or 4;
if the first column has a C, then the second column should have a 4.

I don't care if its done through conditional formatting and for example something turns red if they don't match or it can be a formula that returns a 0 if they don't and a 100 if they do.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the Board!

Try this formula (for row 1 entries):
Code:
=IF(OR(AND(A1="A",OR(B1=1,B1=2)),AND(A1="B",OR(B1=2,B1=4)),AND(A1="C",B1=4)),100,0)
 
Upvote 0
You are welcome!:)
 
Upvote 0

Forum statistics

Threads
1,216,058
Messages
6,128,532
Members
449,456
Latest member
SammMcCandless

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