EXCEL SOLUTIONS

Look up a price from a price list

Type a product code and get the price back, with a friendly message when the code is wrong.

IntermediateSalesAbout 8 minutes

Sample data

RowABC
1CodeProductPrice
2P-101Desk lamp24.9
3P-102Notebook3.5
4P-103Mouse15
5P-104Keyboard32
6P-105Monitor stand21
Price list (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

Steps

Each formula is already filled in and calculated. Edit it and press Run to try your own version. Nothing is saved or uploaded.

  1. Find the price of P-103 with VLOOKUP. FALSE means an exact match.

    Result15

  2. Return the product name instead by changing the column number to 2.

    ResultMonitor stand

  3. See what a wrong code does.

    Result#N/A "P-999" was not found in the first column.

  4. Wrap it in IFERROR to show a message.

    ResultCode not in price list

  5. The modern way: XLOOKUP, which also works to the left.

    ResultP-103

  6. Classic alternative that works in every Excel: INDEX with MATCH.

    Result32

What to remember

Use VLOOKUP or XLOOKUP when you have a code and need a detail. Always ask for an exact match.

Formulas used

VLOOKUPXLOOKUPIFERRORINDEXMATCH

Tools that help

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.