Excel Lookup Formula for Product Price by Size and Color
Question details
Create a formula that returns a product price based on the selected product, size, and color.

- 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.
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.
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.
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.
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").
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 INDEX and MATCH With a Helper Key
Use a helper column when XLOOKUP is unavailable or you prefer a standard INDEX and MATCH formula.
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. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook, or create a new spreadsheet.
- 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. 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. 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.

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.




