Find, lookup, match - based on 2 separate criteria.

ExcelBrent

New Member
Joined
Oct 17, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello world. I have 2 sheets, the first sheet contains a column of phone numbers (Sheet1!H:H) and a column of IDs (Sheet1!L:L), and the second sheet contains the same - phone numbers (Sheet2!E:E) and IDs (Sheet2!B:B).
Looking at it from a single-row perspective, I need to first find out if the phone number from Sheet1 H2 exists in Sheet2!E:E. Then, if it is found, compare the ID value from Sheet1 L2 to the Sheet2!B:B column but the same row on Sheet2 where the phone number match was found. If the IDs match, then return "MATCH", otherwise return the ID value from Sheet2.

Hopefully, that makes sense.
Any help would be greatly appreciated. Thank you!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
try this, you'll need adjust the formulas to fit your workbook:
Book2
ABCDE
1Sheet2 Data
2ID NbrPhoneNbr
3A2333895(994) 729-2689
4A6460856(994) 729-2681
5A8193540(990) 137-2115
6A6460856(972) 877-5079
7A8193540(983) 712-3074
8A7688978(972) 877-5079
9A7654833(983) 712-3074
10A4895465(983) 784-3553
11A65498712(984) 735-0571
12
13
14Sheet1 Data:
15Pho NbrIDSLookup:
16(982) 061-6220A4944571 
17(987) 920-1623A2333895 
18(972) 877-5079A6460856MATCH
19(983) 712-3074A8193540MATCH
20(983) 784-3553A4809077 
21(984) 735-0571A880395 
22(985) 720-9968A7688978 
23(977) 665-1027A7654833 
24(987) 896-2723A7488906 
25(982) 556-9905A1252460 
Sheet2
Cell Formulas
RangeFormula
E16:E25E16=IF(XLOOKUP(A16,$E$3:$E$11,$B$3:$B$11,"",0)=C16,"MATCH","")

D=fw:b]E16[/XD][XD]=IF(XLOOKUP(A16,$E$3:$E$11,$B$3:$B$11,"",0)=C16,"MATCH","")[/XD][/XR][/RANGE]
 
Upvote 0
This is my take on it

ExcelBrent.xlsm
BCDE
1ID NbrPhoneNbr
2A23338959947292689
3A64608569947292681
4A81935409901372115
5A64608569728775079
6A81935409837123074
7A76889789728775079
8A76548339837123074
9A48954659837843553
10A654987129847350571
Sheet2


ExcelBrent.xlsm
HIJKLM
1Pho NbrIDSResult
29820616220A4944571A4999999
39879201623A2333895Not found
49728775079A6460856A7688978
59837123074A8193540MATCH
69837843553A4809077A4895465
79847350571A880395MATCH
89857209968A7688978Not found
Sheet1
Cell Formulas
RangeFormula
M2:M8M2=LET(ID,XLOOKUP(H2,Sheet2!E:E,Sheet2!B:B,"Not found"),IF(ID=L2,"MATCH",ID))
 
Upvote 1
Solution
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,198
Messages
6,123,589
Members
449,109
Latest member
Sebas8956

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