Lookup & Referenceintermediate
VLOOKUP to match two columns
=VLOOKUP(A2,$F$2:$G$8,2,FALSE)
Pull the latest status, most recent price, or last logged owner for a matching key.
Step-by-step instructions
Use A2 as the lookup value and point XLOOKUP at the column containing all repeated keys.
Set the return array to the values you want back, like status or owner.
Keep the match mode exact and set search mode to -1 so Excel returns the last match.
Example data
| Order ID | Status |
|---|---|
| A-100 | Packed |
| A-100 | Shipped |
| A-100 | Delivered |
Common mistakes
Not found returned unexpectedly
Check whether the lookup values in the source table and lookup cell are stored as the same type, especially text vs numeric IDs.
FAQ
Why use -1 in XLOOKUP?
The search mode argument of -1 tells XLOOKUP to search from last to first, which returns the last matching row.
Related how-to guides