Function Problems

How to Perform a Two-Criteria Lookup in Excel Using INDEX and MATCH

Kushani NimanthikaKushani Nimanthika Nov 11, 2026 869 views

Question details

Retrieve a specific financial value from a dataset by matching two distinct criteria: an account number in a row and a specific month in a column.

How to Perform a Two-Criteria Lookup in Excel Using INDEX and MATCH
Product
Excel
Device & OS
not provided
Scenario
Locating a specific data point at the intersection of a row and a column within a two-dimensional financial report or table.
Observed behavior
Looking for the correct formula structure to apply INDEX and MATCH functions to intersect a row and a column dynamically.
Before you start

Ensure your dataset is organized in a clear grid format, with account numbers consistently in one column and months listed across a single header row without merged cells.

Solution 1Recommended

Use INDEX and MATCH for Two-Criteria Intersections

The most efficient way to look up a value at the intersection of a specific row and column is by nesting two MATCH functions inside an INDEX function.

The INDEX function returns the value of a cell in a specific row and column. By combining it with two MATCH functions, you can dynamically locate the correct row (e.g., account number) and the correct column (e.g., month) without manually counting rows or columns.

1
Select the target cell

Click on the empty cell where you want the retrieved financial value to be displayed.

2
Enter the formula structure

Type the core formula: =INDEX(data_range, MATCH(row_criteria, row_range, 0), MATCH(column_criteria, column_range, 0)).

3
Input your specific ranges

For example, type =INDEX(Report!$B$2:$H$7, MATCH($E7, Report!$A$2:$A$7, 0), MATCH($F7, Report!$B$1:$H$1, 0)).

4
Execute the formula

Press Enter to execute. The cell will now display the exact value intersecting the specified account number and month.

Use INDEX and MATCH for Two-Criteria Intersections
Using Absolute References: Using dollar signs ($) locks the ranges (like $B$2:$H$7). This ensures your formula remains accurate if you drag or copy it to other cells in your report.

Easily Manage Advanced Financial Lookups with WPS Spreadsheet

WPS Spreadsheet fully supports advanced lookup functions like INDEX, MATCH, VLOOKUP, and XLOOKUP. It provides a highly intuitive environment to execute two-way lookups seamlessly.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your .xlsx financial report file.
  2. 2. Use the Formula tab: Click on your target cell and navigate to the Formulas tab to insert your lookup functions.
  3. 3. Follow the Formula Prompt: As you type =INDEX(, WPS will provide syntax tooltips to guide you through nesting the MATCH functions correctly.
Fully compatible with Microsoft Excel formulas and .xlsx formats.Seamlessly process two-criteria lookups using INDEX and MATCH.Free, lightweight, and ensures fast performance on complex financial datasets.Built-in robust formula prompt feature to help you write nested formulas effortlessly.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my INDEX and MATCH formula return an #N/A error?

An #N/A error usually occurs when the MATCH function cannot find the exact lookup value. Check for hidden trailing spaces in your cells, mismatched data types (such as numbers formatted as text), and ensure the lookup value is actually present in the lookup array.

Does the order of the MATCH functions matter in the INDEX formula?

Yes. The syntax for the INDEX function is INDEX(array, row_num, column_num). Therefore, your first MATCH must be configured to find the row (e.g., the account number), and the second MATCH must find the column (e.g., the month).

Can I use XLOOKUP for a two-way lookup instead of INDEX and MATCH?

Yes. In supported spreadsheet software, you can nest one XLOOKUP inside another XLOOKUP to perform a two-way intersection lookup. The inner XLOOKUP returns the correct column array, and the outer XLOOKUP searches down the correct row array.