Excel Formulas for Matching Product IDs with Price Lists

📅 Sep 04, 2026 📝 Sarah Miller

Manually matching product IDs to fluctuating price lists is a tedious, error-prone process that drains valuable administrative hours. When aligning procurement budgets with standard funding sources, operational accuracy is non-negotiable. Utilizing the correct Excel lookup formula grants you absolute precision and confidence in your financial reporting.

As a key stipulation, both datasets must share identical data formatting to prevent common lookup errors. For example, using the XLOOKUP function to match product ID "PROD-102" to its approved contract price serves as the standard approach to guarantee data integrity. Below, we explore the exact formulas and implementation steps required to streamline your workflow.

Excel Formulas for Matching Product IDs with Price Lists

Managing inventory, sales, and financial reports in Excel almost always requires linking different data sets. One of the most common tasks is matching a Product ID from a sales or order sheet to a master Price List to retrieve the correct unit price.

Depending on your version of Excel and your specific data structure, there are several ways to accomplish this. This guide will walk you through the three most effective Excel formulas to match Product IDs with prices: XLOOKUP, INDEX & MATCH, and VLOOKUP. We will also cover how to handle common errors and apply advanced matching techniques like tiered pricing.


Understanding the Data Setup

To make these examples easy to follow, let's assume you have two worksheets in your Excel workbook:

  • Orders Sheet: Where you record sales transactions. It contains Product ID in Column A, and you want to pull the Price into Column B.
  • Price List Sheet: Your master database. It contains Product ID in Column A and the corresponding Price in Column B.
Orders Sheet (Target) Price List Sheet (Source)
Col A: Product ID (e.g., PROD-001)
Col B: Price (Formula goes here)
Col A: Product ID (e.g., PROD-001)
Col B: Product Name
Col C: Base Price ($19.99)

Method 1: XLOOKUP (The Modern & Best Approach)

If you are using Microsoft 365, Excel 2021, or Excel for the Web, XLOOKUP is the absolute best formula to use. It is safer, easier to write, and more flexible than older lookup formulas.

The XLOOKUP Syntax

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode])

Step-by-Step Formula

To match the Product ID in cell A2 of your Orders sheet with the price in your Price List sheet, enter the following formula in cell B2:

=XLOOKUP(A2, 'Price List'!$A$2:$A$500, 'Price List'!$C$2:$C$500, "Price Not Found", 0)

How It Works:

  • A2: The Product ID you want to look up.
  • 'Price List'!$A$2:$A$500: The column in your master list containing the Product IDs. (Absolute references $ ensure the range doesn't shift when you drag the formula down).
  • 'Price List'!$C$2:$C$500: The column containing the prices you want to return.
  • "Price Not Found": (Optional) The text Excel will display if the Product ID does not exist in the master list.
  • 0: Instructs Excel to perform an exact match (this is actually the default behavior of XLOOKUP, but defining it is a good habit).

Why XLOOKUP is superior: It doesn't care if the Price column is to the left or right of the Product ID column. It also prevents errors if you insert or delete columns in your master sheet later.


Method 2: INDEX and MATCH (The Flexible Classic)

If you are using an older version of Excel (like Excel 2013, 2016, or 2019) and want a robust, high-performance formula that won't break when columns are added or removed, INDEX & MATCH is your best option.

The Syntax

This method combines two functions:

  • MATCH finds the row number where the Product ID is located.
  • INDEX retrieves the price from that specific row number.
=INDEX(return_column, MATCH(lookup_value, lookup_column, 0))

Step-by-Step Formula

Enter this formula in cell B2 of your Orders sheet:

=INDEX('Price List'!$C$2:$C$500, MATCH(A2, 'Price List'!$A$2:$A$500, 0))

How It Works:

  1. MATCH(A2, 'Price List'!$A$2:$A$500, 0): Excel searches Column A of the Price List for the ID in cell A2. The 0 specifies an exact match. If it finds the ID on row 15, MATCH returns the number 14 (since row 15 is the 14th item in the range $A$2:$A$500).
  2. INDEX('Price List'!$C$2:$C$500, 14): Excel goes to the price range (Column C) and extracts the value from the 14th cell down, which is your price.

Method 3: VLOOKUP (The Traditional Method)

VLOOKUP is the most famous lookup formula in Excel. While legacy users still use it widely, it has one major limitation: the Product ID column must be the very first column in the lookup range. It cannot search to its left.

The VLOOKUP Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Step-by-Step Formula

If your Price List has Product ID in Column A, Product Name in Column B, and Price in Column C, Column C is the 3rd column in that range. Enter this formula in cell B2:

=VLOOKUP(A2, 'Price List'!$A$2:$C$500, 3, FALSE)

How It Works:

  • A2: The Product ID you are matching.
  • 'Price List'!$A$2:$C$500: The entire database block containing both the lookup column and the data you want to retrieve.
  • 3: Tells Excel to pull the result from the 3rd column of the highlighted block (Column C).
  • FALSE: Forces Excel to look for an exact match. Warning: If you omit this or type TRUE, Excel will return incorrect prices if your IDs are not sorted alphabetically!

Troubleshooting Common Errors

Even with the correct formula, you might run into errors. Here is how to fix the most common issues:

1. The dreaded #N/A Error

This means Excel cannot find the Product ID. Check the following:

  • Trailing Spaces: "PROD-001 " is not the same as "PROD-001". Use the TRIM function to clean your data: `=XLOOKUP(TRIM(A2), TRIM('Price List'!$A$2:$A$500), 'Price List'!$C$2:$C$500)`.
  • Data Type Mismatch: One sheet might store the Product ID as a number (e.g., 10203), while the other stores it as text (formatted as text, or with an apostrophe like '10203). Ensure both columns are formatted identically.

2. The #REF! Error (with VLOOKUP)

This occurs if you tell VLOOKUP to pull from a column index that is outside your range. For example, if your table array is $A$2:$B$500 (2 columns) but your column index is set to 3, Excel will throw a #REF! error because column 3 does not exist in your defined range.


Pro Tip: Use Excel Tables for Dynamic Price Lists

Instead of referencing cell coordinates (like $A$2:$C$500), convert your Price List into an official Excel Table by highlighting it and pressing Ctrl + T. Name your table PriceTable.

Once converted, you can write highly readable formulas that automatically expand as you add new products:

=XLOOKUP(A2, PriceTable[Product ID], PriceTable[Price], "Not Found")

With structured references, you never have to worry about updating your formula when you add new products to your master price list.


Summary: Which Formula Should You Use?

Use this quick guide to choose the right formula for your workbook:

  • Use XLOOKUP if you are on Microsoft 365 or Excel 2021. It is the modern, error-resistant standard.
  • Use INDEX & MATCH if you are sharing your spreadsheet with people using older Excel versions, or if you need maximum spreadsheet calculation speeds on large databases.
  • Use VLOOKUP only if you are working on legacy sheets where it is already implemented, as it is highly fragile compared to newer methods.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.