Function Problems

Excel: Look Up the Next Larger Size Price by Color

Elise WilliamsElise Williams Nov 18, 2026 868 views

Question details

Find a price by calculated area, selected color, and quantity, using the next larger size when there is no exact size match.

Look Up the Next Larger Size Price by Color in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A price list contains size-based unit prices for different colors and quantity headers. The user calculates the required size from two dimensions and needs a total price.
Observed behavior
The desired result is the unit price for the exact size or next larger available size in the selected color, multiplied by the requested quantity.
Before you start

Check that the calculated area and price-list sizes use the same units, and that each color and size combination appears only once. The example assumes Excel supports LET, FILTER, XMATCH, and XLOOKUP.

Solution 1Recommended

Filter by Color and Look Up the Next Larger Size

Use this formula to find the matching quantity column and return a total based on the exact or next larger size.

The example uses colors in A2:A100, numeric sizes in B2:B100, quantity headers in C1:E1, and unit prices in C2:E100. The selected color is in F16, dimensions are in H2 and I2, and the requested quantity is in H5.

XLOOKUP match mode 1 finds an exact size or the next larger size. It does not require the size list to be sorted when using the default search mode.

1
Arrange the price list

In the worksheet, place colors in column A, sizes in column B, and unit prices under the quantity headers in columns C through E. Adjust these ranges in the formula if your table is elsewhere.

2
Enter the criteria

Enter the selected color in F16, the two dimensions in H2 and I2, and a quantity matching one of the headers in H5.

3
Calculate the total

Select H6 and enter =IFERROR(LET(s,FILTER($B$2:$B$100,($A$2:$A$100=$F$16)*ISNUMBER($B$2:$B$100)),p,FILTER($C$2:$E$100,($A$2:$A$100=$F$16)*ISNUMBER($B$2:$B$100)),q,XMATCH(H5,$C$1:$E$1,0),XLOOKUP($H$2*$I$2,s,INDEX(p,0,q),,1)*H5),"No matching price").

4
Calculate other quantities

Enter additional quantities in I5 and the cells to its right, then drag the fill handle from H6 across to calculate each total.

Filter by Color and Look Up the Next Larger Size
When no price is returned: The formula displays “No matching price” if the color or quantity is missing, the calculated area exceeds every available size for that color, or another formula error occurs. Check the inputs and price-list ranges.
Calculate prices in WPS Spreadsheet

Find Size-Based Prices in WPS Spreadsheet

Open the price list in WPS Spreadsheet and use the same color, area, and quantity lookup formula in a version that supports the required functions.

  1. 1. Open the workbook: In WPS Spreadsheet, choose Open and select the Excel price-list workbook.
  2. 2. Set up the inputs: Arrange the price list in A1:E100 and enter the color in F16, dimensions in H2 and I2, and quantity in H5, or adjust the formula references to match your sheet.
  3. 3. Enter the lookup formula: Select H6 and enter the LET, FILTER, XMATCH, and XLOOKUP formula from the solution above. Confirm that your WPS Spreadsheet version supports these functions.
  4. 4. Check and save: Check the result against the price list, then choose File > Save As to save the workbook in XLSX format.
Find the exact or next larger size price for a selected colorOpen and save Microsoft Excel XLSX filesCalculate totals for multiple quantity headersWork with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

What happens when the calculated area exactly matches a size?

XLOOKUP with match mode 1 returns the exact size if it exists. Otherwise, it returns the next larger size for the filtered color.

Why does the formula say “No matching price”?

Check F16 for a color in the price list, H5 for an exact quantity-header match, and the calculated area against the largest size available for that color. The message can also indicate another formula error.

Do the size values need to be sorted?

No. The formula uses XLOOKUP's default search mode, so the filtered sizes do not need to be sorted.

Can I use a different price-list layout?

Yes. Change the color, size, price, and quantity-header ranges in the formula to match your worksheet. Keep the FILTER ranges aligned to the same rows.