Function Problems

Find an Item Price by Quantity with XLOOKUP in Excel

Khadija KhanKhadija Khan Dec 2, 2026 868 views

Question details

Find the unit price associated with an exact bundle size or the nearest smaller or larger bundle for an ordered quantity.

Find an Item Price by Quantity with XLOOKUP in Excel
Product
Microsoft Excel and WPS Spreadsheets
Device & OS
not provided
Scenario
An ordered quantity must be matched against bundle sizes in a horizontal pricing table.
Observed behavior
The formula should return the price from the corresponding bundle column using the chosen match rule.
Before you start

Check that the ordered quantity is in F6, bundle sizes are in B5:E5, and their corresponding unit prices are in B6:E6. Adjust the cell references if your table uses different locations, and ensure the quantities are numeric.

Solution 1Recommended

Use XLOOKUP to Find the Price for a Bundle Size

Use XLOOKUP when you want an exact match or the nearest bundle size in a specified direction.

1
Choose the next-smaller bundle

Select the result cell and enter =XLOOKUP(F6,$B$5:$E$5,B6:E6,"",-1). This returns the exact match or the price for the next-smaller bundle.

2
Choose the next-larger bundle instead

If your pricing rule uses the next-larger bundle, enter =XLOOKUP(F6,$B$5:$E$5,B6:E6,"",1) in the result cell instead.

3
Check the result

Press Enter and compare the returned price with the bundle sizes in B5:E5. If you copy the formula down for other items, verify that each row's price range matches the item.

Use XLOOKUP to Find the Price for a Bundle Size
When no bundle qualifies: The formulas return a blank if there is no exact or qualifying smaller or larger bundle. For example, the next-smaller formula returns a blank when the quantity is below every bundle size.
Calculate quantity-based prices

Find Bundle Prices in WPS Spreadsheets

Use INDEX and MATCH in WPS Spreadsheets to return a unit price for an exact or next-smaller bundle size.

  1. 1. Open the pricing table: Open WPS Spreadsheets and select Open to load your workbook, or enter bundle sizes in B5:E5 and prices in B6:E6.
  2. 2. Check the bundle order: Arrange the bundle-size columns from smallest to largest, keeping each price under its corresponding bundle size, and enter the ordered quantity in F6.
  3. 3. Enter the lookup formula: Select a result cell and enter =IFERROR(INDEX(B6:E6,1,MATCH(F6,$B$5:$E$5,1)),""). Press Enter to return the exact or next-smaller bundle price.
Look up unit prices from a horizontal bundle tableOpen and edit Microsoft Excel XLS and XLSX filesUse familiar spreadsheet formulas and a straightforward interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I return only an exact bundle match?

Enter =XLOOKUP(F6,$B$5:$E$5,B6:E6,"",0) in the result cell. It returns a blank if F6 does not exactly match a bundle size.

Why does the XLOOKUP formula return a blank?

The formula's not-found argument is an empty string. Check whether F6 has an exact or qualifying smaller or larger bundle in B5:E5, according to the match mode you selected.

Can I use a formula if XLOOKUP is unavailable?

For an exact or next-smaller match, sort the bundle columns from smallest to largest and enter =IFERROR(INDEX(B6:E6,1,MATCH(F6,$B$5:$E$5,1)),""). Keep each price aligned with its bundle size.

How do I calculate the total order price?

If the lookup result is a unit price, multiply it by the ordered quantity. For example, if the unit price is in G6, enter =F6*G6 in a total-price cell.