How to Use INDEX and MATCH to Look Up Product Prices by Part Number in Excel

📅 Jan 05, 2026 📝 Sarah Miller

Manually matching fluctuating product prices to thousands of part numbers is tedious and highly prone to costly billing errors. While traditional static lookups offer a basic starting point, they frequently fail when spreadsheet columns are reorganized. Upgrading to a dynamic index framework grants your inventory team real-time pricing precision and structural spreadsheet flexibility. As a key stipulation, your master data must maintain unique SKU identifiers to prevent incorrect matches. For example, deploying the formula =INDEX(Price_Column, MATCH(Part_Number, Part_Column, 0)) guarantees bulletproof retrieval. Below, we outline step-by-step formula configurations to automate your pricing workflow efficiently.

How to Use INDEX and MATCH to Look Up Product Prices by Part Number in Excel

Excel Formula to Index Product Prices with Part Numbers

Managing inventory, generating quotes, and preparing invoices are fundamental operations for any product-based business. At the heart of these tasks lies a recurring challenge: matching a specific product part number with its current price. Doing this manually is not only tedious but also highly prone to costly human errors.

Fortunately, Microsoft Excel offers several powerful formulas to automate this process. Whether you are using the latest version of Excel 365 or working on an older legacy version, this comprehensive guide will show you how to build robust formulas to instantly index and retrieve product prices using part numbers.


Method 1: The Modern Standard – XLOOKUP (Excel 365 & Excel 2021)

If you are using a modern version of Excel, XLOOKUP is the absolute best tool for the job. It was designed to replace older functions like VLOOKUP and INDEX/MATCH by being more intuitive, safer to use, and highly flexible.

The XLOOKUP Syntax

The basic syntax for XLOOKUP is:

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

Step-by-Step Scenario

Imagine you have two sheets in your workbook:

  • Sheet 1 ("Invoice"): Where you enter the Part Number in cell A2 and want the price to appear in cell B2.
  • Sheet 2 ("Price_List"): Your master database where Part Numbers are in column A (rows 2 to 1000) and Prices are in column C (rows 2 to 1000).

To pull the price into your Invoice sheet, enter the following formula in cell B2:

=XLOOKUP(A2, Price_List!$A$2:$A$1000, Price_List!$C$2:$C$1000, "Price Not Found")

Why XLOOKUP is Superior:

  • Exact Match by Default: Unlike VLOOKUP, you do not need to specify "FALSE" to find an exact match; XLOOKUP does this automatically.
  • Leftward Lookups: Your price column can be to the left of your part number column on your master list. XLOOKUP does not care about column order.
  • Built-in Error Handling: The fourth argument ("Price Not Found") replaces the need for a separate IFERROR wrapper.

Method 2: The Power Couple – INDEX & MATCH (All Excel Versions)

If you are working in an environment with older versions of Excel (such as Excel 2019, 2016, or 2013), or if you need to share your worksheets with external clients using legacy software, INDEX and MATCH is the industry-standard workaround.

While it looks intimidating at first, it is highly efficient and offers the same flexibility as XLOOKUP.

How It Works

  • INDEX returns the value of a cell in a specific row and column within a designated range.
  • MATCH searches for a specified item in a range of cells and returns the relative position of that item.

By nesting MATCH inside INDEX, you find the exact row number of your part number and use that row number to pull the corresponding price.

The INDEX & MATCH Formula

Using the same scenario (looking up cell A2 against the "Price_List" sheet), enter this formula in cell B2:

=INDEX(Price_List!$C$2:$C$1000, MATCH(A2, Price_List!$A$2:$A$1000, 0))

Breaking Down the Formula:

  1. MATCH(A2, Price_List!$A$2:$A$1000, 0): Excel searches for the part number in A2 within the master list's part number column. The 0 at the end specifies an exact match. If it finds the part number in the 15th row of that range, it returns the number 15.
  2. INDEX(Price_List!$C$2:$C$1000, 15): Excel then jumps to the price range in Column C and retrieves the value from the 15th row, which is the correct price.

Method 3: The Classic – VLOOKUP (With Best Practices)

While VLOOKUP is older and has structural limitations, it remains one of the most widely recognized formulas in spreadsheet history. If your data is structured with the Part Number on the far left and the Price to its right, you can safely use it.

The VLOOKUP Syntax

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

The VLOOKUP Formula

Assuming your Master Price List spans columns A to C, where Column A contains Part Numbers and Column C (the 3rd column) contains Prices:

=VLOOKUP(A2, Price_List!$A$2:$C$1000, 3, FALSE)

Crucial VLOOKUP Pitfalls to Avoid:

  • The "FALSE" Argument: Always write FALSE (or 0) as the fourth argument. If you omit it, Excel will look for an approximate match and return completely incorrect pricing data.
  • Column Insertion Risk: If you insert a new column between Column B and Column C on your master list, your formula will break or pull data from the wrong column because the index 3 is hardcoded. Both XLOOKUP and INDEX/MATCH avoid this issue entirely.

Advanced Scenario: Multi-Criteria Price Indexing

Sometimes, a part number alone is not enough to determine a price. For example, a product might have different prices based on Size, Material, or Region. In these cases, you need a multi-criteria lookup.

The Solution: XLOOKUP with Boolean Logic

Suppose you have a part number in A2 and a region ("East" or "West") in B2. Your master price list has Part Numbers in Column A, Regions in Column B, and Prices in Column C.

You can concatenate search terms using the ampersand (&) operator:

=XLOOKUP(A2 & B2, Price_List!$A$2:$A$1000 & Price_List!$B$2:$B$1000, Price_List!$C$2:$C$1000, "Not Found")

This formula temporarily joins the part number and region together (e.g., "PART123-East") and matches it against a similarly joined array of the master list columns.


Best Practices for Maintaining Pricing Sheets in Excel

To ensure your pricing formulas remain fast, accurate, and easy to maintain, implement these database best practices:

1. Use Excel Tables (Structured References)

Instead of referencing raw cell ranges (like $A$2:$C$1000), convert your master price list into an official Excel Table by pressing Ctrl + T. Name your table MasterPriceList.

Your formulas will instantly become much easier to read and automatically expand when you add new inventory items:

=XLOOKUP(A2, MasterPriceList[Part Number], MasterPriceList[Price], "Not Found")

2. Clean Your Data (Avoid Invisible Spaces)

One of the most common reasons why pricing formulas return #N/A errors is invisible leading or trailing spaces in your part numbers (e.g., "PART-101 " vs "PART-101"). Use the TRIM function to clean up imported data, or wrap your lookup value in it: TRIM(A2).

3. Handle Missing Values Elegantly

Blank cells or missing parts can result in ugly #N/A errors that ruin the visual presentation of an invoice. If you are not using XLOOKUP (which has built-in error handling), wrap your INDEX/MATCH or VLOOKUP in an IFNA wrapper:

=IFNA(INDEX(Price_List!$C$2:$C$1000, MATCH(A2, Price_List!$A$2:$A$1000, 0)), 0)

This ensures that if a part number isn't found, Excel returns a clean 0 or empty text "" instead of an error code.


Summary of Methods

Method Excel Version Compatibility Flexibility Rating Complexity
XLOOKUP Excel 365, Excel 2021+ Excellent (Best Choice) Low
INDEX & MATCH All Versions Excellent Medium
VLOOKUP All Versions Limited (Strict column ordering) Low

By transitioning from manual data entry to dynamic formulas like XLOOKUP or INDEX/MATCH, you save hours of operational time, safeguard your margins from calculation errors, and establish a highly scalable workflow for pricing management.

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.