Forum Discussion
Dan1ExcelUser
Jan 15, 2025Copper Contributor
Compare two workbook and return the cell value
Hi, I've two sheets with the following structure: Sheet1 (Main) has columns A (Last Name), B (First Name), and C (Email); Sheet2 has columns A (Last Name), B (First Name), and C (Email). I used...
- Jan 15, 2025
In D2 on Sheet1:
=XLOOKUP(A2&" "&B2, 'Sheet2'!$A$2:$A$1000&" "&'Sheet2'!$B$2:$B$1000, 'Sheet2'!$C$2:$C$1000, "")
Replace Sheet2 to the real name of that sheet, then fill down.
HansVogelaar
Jan 15, 2025MVP
Do you really want to match on column A or B? Or on columns A and B?
Dan1ExcelUser
Jan 15, 2025Copper Contributor
I want to do both if possible. Because there are some cases where A and B are matching.
- HansVogelaarJan 15, 2025MVP
In D2 on Sheet1:
=XLOOKUP(A2&" "&B2, 'Sheet2'!$A$2:$A$1000&" "&'Sheet2'!$B$2:$B$1000, 'Sheet2'!$C$2:$C$1000, "")
Replace Sheet2 to the real name of that sheet, then fill down.