Comparing 2 columns

AlgaRejov

New Member
Joined
Mar 21, 2011
Messages
3
Hi guys,

I'm fairly new to this so please bear with me. I know this is something that was posted before but most of the answers I've found so far, compare items within the same row and what I need, is to compare i.e B4 to ALL of column A and return a value in column C. Also, column B is shorter than Column A.

Example:

Column A

Red
Green
Blue
Blue
Blue
Yellow
Brown
Pink
Black
Purple
Green

Column B

Pink
Blue
Green
Black
White
Yellow

The outcomes:

1) So, if 'Blue' from column B is found anywhere on Column A (even if it's more than once), I want a value returned on Column C (next to Blue, so C2) that says 'OK'.

2) If there is a value on Column B that doesn't exist on Column A (i.e 'White) I need a value of 'Missing' returned on column C.

I hope this is not too complicated. Could someone give me a hand with this?

THANK YOU.

G.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try this

Excel Workbook
ABC
1RedPinkMissing
2GreenBlueOK
3BlueGreenOK
4BlueBlackOK
5BlueWhiteOK
6YellowYellowOK
7BrownMissing
8PinkOK
9BlackOK
10PurpleMissing
11GreenMissing
Sheet3
 
Upvote 0
Thanks Peter! Though C1 should return 'OK' and C5 should return 'MISSING', as there is no match for 'white', right?


Thank you.

G.
 
Upvote 0
Sorry, I had it the wrong way round

=IF(ISNUMBER(MATCH(B1,A:A,0)),"OK","Missing")
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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