Shorten Excel Price Lookup Formulas with INDEX and MATCH
Question details
Find a shorter formula that returns a price for an eligible item, a numeric condition, and a matching measurement.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has an item in A2, a condition such as 0.4, 0.5, or 0.6 in B2, and a measurement in C2.
- Observed behavior
- The desired formula returns the price at the intersection of the matching condition and measurement, without a long nested IF formula.
Check that the conditions and measurements are stored as numbers, not text. The example assumes Item 1, Item 2, and Item 3 use the same price matrix.
Use INDEX and MATCH with a worksheet price matrix
Use this approach to make the formula shorter and keep prices easy to update.
In Excel, paste the following tab-separated data into E1:H9: Size 0.4 0.5 0.6 0.152 145 124 170 0.229 158 287 625 0.305 252 325 370 0.406 380 441 894 0.457 373 497 576 0.61 691 831 784 0.915 744 1287 1635 1.22 986 1763 1887
Select D2 and enter =IF(OR(A2="Item 1",A2="Item 2",A2="Item 3"),INDEX($F$2:$H$9,MATCH(C2,$E$2:$E$9,0),MATCH(B2,$F$1:$H$1,0)),"").
Enter Item 1 in A2, 0.4 in B2, and 0.152 in C2; D2 should return 145. Drag the fill handle from D2 down to apply the formula to other rows.

Build the same price lookup in WPS Spreadsheets
Create a price matrix in WPS Spreadsheets and use INDEX and MATCH to return the price for an eligible item, condition, and measurement.
- 1. Open the workbook: Launch WPS Office, open Spreadsheets, and select Open to choose your Excel workbook.
- 2. Add the price matrix: Paste the price matrix from the solution into cells E1:H9, or arrange your own measurements, conditions, and prices in the same layout.
- 3. Enter the formula: Select D2 and enter =IF(OR(A2="Item 1",A2="Item 2",A2="Item 3"),INDEX($F$2:$H$9,MATCH(C2,$E$2:$E$9,0),MATCH(B2,$F$1:$H$1,0)),"").
- 4. Check and save: Test the formula with an item, condition, and measurement, then choose File > Save As to save the workbook in XLSX format.

Frequently Asked Questions
Why does the formula return #N/A?
MATCH uses exact matching here. Check that B2 matches a numeric header in F1:H1 and C2 matches a numeric measurement in E2:E9; numbers stored as text can prevent a match.
How can I hide unmatched lookup errors?
Wrap the lookup formula in IFERROR, for example =IFERROR(IF(OR(A2="Item 1",A2="Item 2",A2="Item 3"),INDEX($F$2:$H$9,MATCH(C2,$E$2:$E$9,0),MATCH(B2,$F$1:$H$1,0)),""),""). This returns a blank for errors as well as ineligible items.
Can each item have a different price table?
Yes, but the example formula assumes all three items share one matrix. For different prices, create a table with separate item, condition, measurement, and price columns and use a lookup that matches all three criteria.
What if my measurements are calculated values?
Calculated decimals may differ slightly from the displayed values. If appropriate for your data, use ROUND on C2 in the MATCH expression and store the matrix measurements at the same precision.




