to see if a unique id in one sheet sits anywhere in another sheet

Joschiedog

New Member
Joined
Mar 16, 2018
Messages
3
I have two sheets of data, where column A of both sheets have a unique ID. I would like to see if any of the unique ID's in sheet two are also in sheet one. I've tried VLookups, but this only picks those up where they match exactly on the same row number. My issue is, the Unique ID's my fall on both sheets, but not necessarily on the same row, and that the entries in the two sheets may contain different amounts of data, so in Sheet 1 there may be 200 entries, but in sheet 2, only 150 entries.
The way i'd prefer to represent the returns is in a column. rather than creating a single cell and searching individually, as my ultimate aim is to show if there are any instances of the ID's showing in both sheets in Tableau.


If anyone has any solutions, I'd be most grateful.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Excel 2010
A
2ID1
3ID2
4ID3
5ID4
6ID5
7ID6
8ID7
9ID8
10ID9
11ID10
12ID11
13ID12
14ID13
15ID14
16ID15
17ID16
18ID17
Sheet1



Cell Formulas
RangeFormula
B2=IF(ISNUMBER(MATCH(A2,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B3=IF(ISNUMBER(MATCH(A3,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B4=IF(ISNUMBER(MATCH(A4,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B5=IF(ISNUMBER(MATCH(A5,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B6=IF(ISNUMBER(MATCH(A6,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B7=IF(ISNUMBER(MATCH(A7,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B8=IF(ISNUMBER(MATCH(A8,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B9=IF(ISNUMBER(MATCH(A9,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B10=IF(ISNUMBER(MATCH(A10,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B11=IF(ISNUMBER(MATCH(A11,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B12=IF(ISNUMBER(MATCH(A12,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B13=IF(ISNUMBER(MATCH(A13,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B14=IF(ISNUMBER(MATCH(A14,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B15=IF(ISNUMBER(MATCH(A15,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
B16=IF(ISNUMBER(MATCH(A16,Sheet1!$A$2:$A$18,0)),"On sheet1","NOT on sheet1")
 
Upvote 0
Many thanks for this Scott. I have just plugged it in and tried and it does work up to a point, but not fully functioning as predicted. I like your formula and can read how it goes, so will play around with it to try and get it to work. It might be that I have my data set in tables so they automatically expand depending on how much data is being copied into each list.
 
Upvote 0
In Sheet1 B1 put the formula =COUNTIF(Sheet2!A:A, A1)

If it returns 0, no match in sheet2, othewise, the ID is also in sheet2
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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