Function Problems

Return a Value at a Row and Column Intersection in Excel

Elise WilliamsElise Williams Dec 2, 2026 869 views

Question details

Find a cell value where a selected row key and column header intersect.

Return a Value at a Row and Column Intersection in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A table contains row keys, column headers, and values, and the user wants to look up a value using one key from each axis.
Observed behavior
The lookup should return the value at the intersection of the matching row and column.
Before you start

Identify the data range, row-key range, and header range. Make sure the row keys align with the data rows and the headers align with the data columns.

Solution 1Recommended

Use INDEX and MATCH for a two-way lookup

Use this formula for an exact-match lookup in Excel versions that support INDEX and MATCH.

1
Enter the lookup values

Enter the row key in F2 and the column header in F3. For this example, row keys are in A2:A4, headers are in B1:D1, and data is in B2:D4.

2
Enter the formula

Select an empty cell and enter =INDEX(B2:D4,MATCH(F2,A2:A4,0),MATCH(F3,B1:D1,0)), then press Enter.

3
Check the result

Compare the returned value with the cell where the matching row and column meet. Adjust the ranges in the formula to fit your table.

Use INDEX and MATCH for a two-way lookup
Named ranges: If your ranges are named Values, dates, and clients, you can use =INDEX(Values,MATCH(B15,dates,0),MATCH(B16,clients,0)). B15 holds the row key and B16 holds the column header.
WPS Spreadsheets

Find a Row and Column Intersection in WPS Spreadsheets

Use INDEX and MATCH in WPS Spreadsheets to return the value where a row key and column header meet.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and choose Open to select your workbook.
  2. 2. Enter lookup values: Enter the row key in F2 and the column header in F3, or choose other cells for your lookup values.
  3. 3. Add the formula: Select an empty cell and enter =INDEX(B2:D4,MATCH(F2,A2:A4,0),MATCH(F3,B1:D1,0)). Replace the example ranges with your own.
  4. 4. Confirm the result: Press Enter and check that the returned value matches the intersection in your table.
Look up a value using both a row key and a column headerOpen and work with Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and controlsWork with spreadsheets using the free version of WPS Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return #N/A?

An exact-match lookup could not find the row key or header. Check the values in the lookup cells against the row-key and header ranges, including spaces and whether dates or numbers are stored as text.

What happens if a row key or header appears more than once?

MATCH with 0 and XMATCH with its default settings return the first matching position. Use unique keys and headers if you need an unambiguous result.

Can I use named ranges instead of cell references?

Yes. Define the data, row-key, and header ranges using Formulas > Name Manager, then use those names in the INDEX and MATCH formula. Ensure their dimensions align.

Why does my formula reject commas?

Your regional settings may require semicolons as argument separators. Replace the commas between formula arguments with semicolons and try again.