Function Problems

Excel Lookup Formula for Product Price by Size and Color

Rana GarciaRana Garcia Dec 2, 2026 868 views

Question details

Create a formula that returns a product price based on the selected product, size, and color.

Look Up a Product Price by Size and Color in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
An order row contains a product, size, and color that must be matched to a table of product options and prices.
Observed behavior
The formula should return the price for the matching product, size, and color combination.
Before you start

Arrange the lookup table with one row per product, size, and color combination, and check that the entries match those used in the order rows. The examples use order values in A2:C2 and lookup data in H2:K100, with prices in column K.

Solution 1Recommended

Use XLOOKUP to Match Product, Size, and Color

Use this formula when your Excel version supports XLOOKUP and you want to match all three criteria without a helper column.

1
Check the lookup columns

Place products in H2:H100, sizes in I2:I100, colors in J2:J100, and prices in K2:K100. Enter the order's product, size, and color in A2, B2, and C2.

2
Enter the lookup formula

In the order's price cell, enter =XLOOKUP(1,($H$2:$H$100=A2)*($I$2:$I$100=B2)*($J$2:$J$100=C2),$K$2:$K$100,"Not found").

3
Fill the formula down

Drag the price cell's fill handle down to calculate prices for the remaining order rows. Adjust the fixed lookup ranges if your table extends beyond row 100.

Use XLOOKUP to Match Product, Size, and Color
Duplicate combinations: XLOOKUP returns the first match. Keep each product, size, and color combination unique if each should have only one price.
Calculate prices in WPS Spreadsheets

Look Up Product Prices in WPS Spreadsheets

Use a helper key with INDEX and MATCH in WPS Spreadsheets to return the price for each product, size, and color combination.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook, or create a new spreadsheet.
  2. 2. Arrange the data: Put order product, size, and color values in A2:C2. Put lookup products, sizes, colors, and prices in columns H through K.
  3. 3. Build the helper keys: In L2, enter =H2&"|"&I2&"|"&J2 and drag the fill handle down the lookup rows. Use a separator that does not appear in the values.
  4. 4. Look up each price: In the order's price cell, enter =IFERROR(INDEX($K$2:$K$100,MATCH(A2&"|"&B2&"|"&C2,$L$2:$L$100,0)),"Not found"), then drag the fill handle down.
Match product, size, and color to a single priceOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and fill handlesWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return Not found?

Check that the product, size, and color in A2:C2 match a lookup row in H:J. Look for extra spaces, missing options, or data outside the formula's fixed ranges.

What happens if the lookup table has duplicate combinations?

Both XLOOKUP and MATCH return the first matching row in these examples. Remove duplicates or decide which price should appear first.

Can I use the formula without XLOOKUP?

Yes. Create a combined key in column L and use INDEX and MATCH to find that key and return the corresponding price from column K.

How do I calculate the total for multiple units?

First return the unit price in a price cell, then multiply that cell by the order quantity in another cell. For example, if D2 contains the unit price and E2 contains quantity, enter =D2*E2 in the total cell.