=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
| Argument | Required | Description |
|---|---|---|
| lookup_value | Required | The value to search for. Can be a cell reference, typed value, or formula result. Data types must match the lookup column. |
| lookup_array | Required | The single column or row to search in. Unlike VLOOKUP this is just the search column, not the entire table. |
| return_array | Required | The column or range to return values from. Can be anywhere — left, right, or another sheet. Span multiple columns to return multiple values at once. |
| if_not_found | Optional | What to return when no match is found. Use "" for blank or "Not found" for a message. Without this XLOOKUP returns #N/A when no match exists. |
| match_mode | Optional | 0 for exact match (default). -1 for exact or next smaller. 1 for exact or next larger. 2 for wildcard match. Most lookups use 0. |
| search_mode | Optional | 1 to search first to last (default). -1 to search last to first for the most recent match among duplicates. |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Lookup Code | Code | Product Name | Price |
| 2 | PRD-003 | PRD-001 | Wireless Mouse | 29.99 |
| 3 | PRD-002 | USB Keyboard | 45.99 | |
| 4 | PRD-003 | Monitor Stand | 89.50 | |
| 5 | PRD-004 | Laptop Bag | 59.99 | |
| 6 | PRD-005 | HDMI Cable | 12.99 | |
| 7 | PRD-006 | Webcam HD | 79.00 | |
| 8 | PRD-007 | Desk Lamp | 34.50 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Lookup Code | Code | Name | Price |
| 2 | PRD-005 | PRD-001 | Wireless Mouse | 29.99 |
| 3 | PRD-002 | USB Keyboard | 45.99 | |
| 4 | PRD-003 | Monitor Stand | 89.50 | |
| 5 | PRD-004 | Laptop Bag | 59.99 | |
| 6 | PRD-005 | HDMI Cable | 12.99 | |
| 7 | PRD-006 | Webcam HD | 79.00 |
| A | B | C | |
|---|---|---|---|
| 1 | Find | Employee | Clock-in |
| 2 | EMP-002 | EMP-001 | 08:02 |
| 3 | EMP-003 | 07:45 | |
| 4 | EMP-002 | 09:10 | |
| 5 | EMP-001 | 08:55 | |
| 6 | EMP-002 | 08:30 | |
| 7 | EMP-004 | 07:58 | |
| 8 | EMP-002 | 10:15 | |
| 9 | EMP-001 | 07:40 |
=XLOOKUP(A2,C:C,B:B,"Not found")
=XLOOKUP(A2,D:D,E:G)
=XLOOKUP(A2,B:B,C:C,"No record",0,-1)
=XLOOKUP(A2,Tiers!A:A,Tiers!B:B,0,-1)
=XLOOKUP("*"&A2&"*",D:D,E:E,"Not found",,2)
=XLOOKUP(A2,D:D,E:E,"Not found")
=XLOOKUP(A2,D:D,E:H)
=XLOOKUP(A2,B:B,C:C,"None",0,-1)