Function Problems

Use Multiple Criteria to Look Up Estimated Cost in Excel

Ayan MasoodAyan Masood Dec 2, 2026 869 views

Question details

Find an estimated cost based on length, subtype, and condition without using a long series of nested IF statements.

Look Up an Estimated Cost Using Multiple Criteria in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains estimated costs associated with combinations of length, subtype, and condition.
Observed behavior
The desired result is a cost from a row that matches all three criteria.
Before you start

Arrange the lookup data in columns with one row per combination. For the examples below, use columns A–D for length, subtype, condition, and cost, and enter the lookup criteria in F2, G2, and H2.

Solution 1Recommended

Find the First Matching Cost with INDEX and MATCH

Use this approach when you need one cost and want a formula that works across a range of Excel versions.

1
Check the lookup ranges

Place the data in A2:D100, with length in A, subtype in B, condition in C, and estimated cost in D. Adjust all four ranges to cover the same rows if your table is a different size.

2
Enter the criteria

Type the length in F2, the subtype in G2, and the condition in H2. Make sure the values match the data types and spelling used in columns A–C.

3
Enter the lookup formula

Select an empty result cell and enter =INDEX(D2:D100,MATCH(1,INDEX((A2:A100=F2)*(B2:B100=G2)*(C2:C100=H2),0),0)). Press Enter. If your Excel version requires array entry, select the formula cell, press F2, and then press Ctrl+Shift+Enter.

Find the First Matching Cost with INDEX and MATCH
First match only: The formula returns the cost from the first row matching all three criteria. If no row matches, it returns #N/A.
Work with spreadsheets in WPS Office

Look Up Estimated Costs with WPS Spreadsheet

Use INDEX and MATCH in WPS Spreadsheet to find the first cost matching a length, subtype, and condition.

  1. 1. Open the worksheet: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Arrange the data: Place length, subtype, condition, and cost in columns A–D, and enter the three lookup values in F2, G2, and H2.
  3. 3. Enter the formula: Select an empty cell and enter =INDEX(D2:D100,MATCH(1,INDEX((A2:A100=F2)*(B2:B100=G2)*(C2:C100=H2),0),0)). Press Enter.
  4. 4. Check the result: Compare the returned cost with the first matching row. If you see #N/A, check the criteria in F2:H2 and the data in A2:C100.
Find a cost using three criteria without nested IF statementsOpen and edit Microsoft Excel XLSX filesWork with formulas in a familiar spreadsheet interfaceUse WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does the INDEX and MATCH formula return #N/A?

No row may match all three criteria. Check F2, G2, and H2 against columns A–C for spelling, extra spaces, and numbers stored as text. Also make sure the ranges cover the relevant rows.

What happens if multiple rows match the criteria?

The INDEX and MATCH formula returns the cost from the first matching row. Use the FILTER formula to return all matching costs in a supported version of Excel.

Can I use an Excel table instead of fixed cell ranges?

Yes. Select your data and choose Insert > Table, then replace the cell ranges in the formula with the corresponding structured column references. Each referenced column should cover the same table rows.

Why does FILTER show a #SPILL! error?

FILTER needs empty cells below the formula for multiple results. Clear any values or merged cells blocking the spill area and check the formula again.