Locate the values in B not in A

philky001

Board Regular
Joined
Jun 8, 2005
Messages
129
I have a small worksheet: in A 176 and B 186. I would like to know which in B are not in A. Do I use vlookup? Below I would like a mark next to Gates, Bill and Green, Cole, or output a mark in col c is fine.
A B
fullnamestaff_name
Almer, Harry
Almer, Harry
Aber, NicoleAber, Nicole
Apple, SteveGates, Bill
Apple, TomGreen, Cole
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
It is better to use match like this:
VBA Code:
=IFERROR(MATCH(B2,A$2:A$176,0)>0,FALSE)
put this in row 2 column C and copy down
 
Upvote 0
Along similar lines, if the name does match this identifies which row the (first) match is in, otherwise shows that it is not in column A.

22 01 17.xlsm
ABC
1fullnamestaff_name
2Almer, HarryAlmer, Harry2
3Aber, NicoleAber, Nicole3
4Apple, SteveGates, BillNot found
5Apple, TomGreen, ColeNot found
Not in A
Cell Formulas
RangeFormula
C2:C5C2=IFNA(MATCH(B2,A:A,0),"Not found")


BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I want to find my match of A in B.
That is a different request to post #1. Have you changed what you want to know or is this an extra question?

Could you post a small set of sample data again and also include the expected results. Use XL2BB if possible.
 
Upvote 0
this looks like it should work but I think i need the vlookup. I want to find my match of A in B.
Both of the solutions suggested do exactly that, do try them, depends exactly what you mean by (match of A in B)
to find that macthc the other way round just swap the As for B in the equatoin
 
Upvote 0
Hi,

You can also do one of these:

Book3.xlsx
ABCD
1fullnamestaff_name
2Almer, HarryAlmer, HarryTRUE 
3Aber, NicoleAber, NicoleTRUE 
4Apple, SteveGates, BillFALSENot in A
5Apple, TomGreen, ColeFALSENot in A
Sheet942
Cell Formulas
RangeFormula
C2:C5C2=COUNTIF(A$2:A$176,B2)>=1
D2:D5D2=IF(COUNTIF(A$2:A$176,B2),"","Not in A")


EDIT: Post 3 to Post 6 were added before I posted.
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,222
Members
448,951
Latest member
jennlynn

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