Use a criterion cell
=XLOOKUP(H2,A2:A,C2:C,"Not found")Put the criterion in H2 so it can be changed without editing the formula.
Match a shipment label and return its Amount from the same table.
Lookup a shipment amount in Google Sheets with =XLOOKUP(H2,A2:A,C2:C,"Not found"). Paste it into an empty result cell, then change the ranges or criterion to match your columns.
XLOOKUP searches Label and returns the corresponding Amount. In this worked shipment table, column A stores shipment labels, B stores Region, C stores Amount, D stores Date, E stores Status and F stores Notes.
The example uses four rows so you can check the output before applying the formula to a larger shipments table. Edit any input in the playground and compare the new output with the visible criteria.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Shipment | Region | Amount | Date | Status | Notes |
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 |
=XLOOKUP(H2,A2:A,C2:C,"Not found")Put the criterion in H2 so it can be changed without editing the formula.
=XLOOKUP(H2,A2:A1000,C2:C1000,"Not found")Bounded ranges can calculate faster in a large file.
=IFERROR(XLOOKUP(H2,A2:A,C2:C,"Not found"),"No matches")Shows readable text instead of an error when the source has no qualifying rows.
Start every referenced range on row 2 and keep their ending rows aligned.
Check spelling, spaces, number formatting and whether dates are stored as real dates.
Add Shipment non-blank logic when unused rows should be excluded.
Yes. Replace the quoted criterion with a cell reference such as H2.
Yes. Whole-column ranges are convenient; bounded ranges can be faster in a very large spreadsheet.
Check extra spaces, data types, date values and whether every range begins on the same row.
Send this recipe to the SheetSteps assistant and describe how your columns are arranged.