Use Excel INDEX and MATCH to Return an Item Cost
Question details
Return an item's cost from a lookup table based on a selection in a data-validation drop-down list.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An estimate sheet has an item drop-down, and a separate sheet contains item names and their costs.
- Observed behavior
- The cost cell should display the price associated with the selected item.
Check that the lookup table has item names in Sheet 1 cells A2:A4 and corresponding costs in B2:B4. Confirm that the item drop-down is in Sheet 2 cell A2, or adjust the formula references to match your workbook.
Return the Selected Item's Cost with INDEX and MATCH
Use this formula when item names and costs are stored in corresponding rows on a separate sheet.
MATCH finds the selected item in the item-name range, and INDEX returns the value at the same position in the cost range. The final 0 in MATCH requires an exact match.
Open Sheet 1 and verify that A2:A4 contains the item names and B2:B4 contains their corresponding costs.
On Sheet 2, select the cost cell, such as B2, and enter =INDEX('Sheet 1'!$B$2:$B$4,MATCH('Sheet 2'!$A2,'Sheet 1'!$A$2:$A$4,0)). Press Enter.
Select an item from the drop-down in Sheet 2 cell A2 and check that the cost cell displays the matching value from Sheet 1.
If other estimate rows have item selections in column A, drag the cost cell's fill handle down. The $A2 reference changes its row while the lookup ranges remain fixed.

Look Up Item Costs in WPS Spreadsheets
Use INDEX and MATCH in WPS Spreadsheets to return a cost for an item selected from a drop-down list.
- 1. Open the workbook: In WPS Spreadsheets, open the workbook containing the item drop-down and lookup table.
- 2. Check the table: On Sheet 1, confirm that item names are in A2:A4 and their costs are in B2:B4, or note the ranges used in your workbook.
- 3. Add the lookup formula: On Sheet 2, select the cost cell and enter =INDEX('Sheet 1'!$B$2:$B$4,MATCH('Sheet 2'!$A2,'Sheet 1'!$A$2:$A$4,0)). Press Enter.
- 4. Select an item: Use the drop-down in Sheet 2 cell A2 to select an item and verify that its cost appears in the formula cell.

Frequently Asked Questions
Why does the formula return #N/A?
MATCH returns #N/A when it cannot find an exact match. Check the selection in Sheet 2 cell A2 against the item names in Sheet 1 A2:A4, including any extra spaces.
How can I hide an error when no item is selected?
Wrap the formula in IFERROR, for example: =IFERROR(INDEX('Sheet 1'!$B$2:$B$4,MATCH('Sheet 2'!$A2,'Sheet 1'!$A$2:$A$4,0)),""). This displays a blank for any formula error, including a missing match.
What happens if the lookup table contains duplicate item names?
MATCH returns the position of the first exact match, so INDEX returns the cost from that first matching row. Use unique item names if each item should have a distinct cost.
How do I include more items in the lookup table?
Extend both ranges in the formula by the same number of rows. For example, change A2:A4 and B2:B4 to A2:A20 and B2:B20, respectively.




