logo
search
Function Problems

How to Use Excel Formulas to Return a Matching Row of Data

Muhammad TalhaMuhammad Talha Sep 28, 2026 870 views

Question details

The user needs to retrieve and return multiple related values across a row based on a specific lookup reference value in an Excel table.

How to Use Excel Formulas to Return a Matching Row of Data
Product
Excel
Device & OS
not provided
Scenario
Looking up data dynamically across rows to auto-populate reports, invoices, or master dashboards.
Observed behavior
The goal is to automatically fill cells in a horizontal row with data corresponding to a matched lookup value from a source table.
Before you start

Ensure your source data has a unique column for the lookup value to prevent incorrect or duplicate matches, and check that both data ranges are formatted similarly.

Solution 1Recommended

Use INDEX and MATCH Formulas (Compatible with All Excel Versions)

The combination of INDEX and MATCH is a robust, universally compatible way to look up a value and return an entire row of data, working perfectly in older versions like Excel 2019.

By nesting a MATCH function inside an INDEX function, you can search for a specific value in a column and return the corresponding value from another column. Locking the column reference ensures you can drag the formula horizontally across the row.

1
Select the Destination Cell

Click on the cell where you want the first returned value to appear (for example, B5).

2
Enter the Formula

Type the formula: =IFERROR(INDEX(B$8:B$9999,MATCH($C5,$C$8:$C$9999,0)),"") where $C5 is your lookup value and $C$8:$C$9999 is the lookup column.

3
Apply Across the Row

Press Enter. Select the cell, click the small square in the bottom-right corner (fill handle), and drag it across the row to populate the remaining columns.

Use INDEX and MATCH Formulas (Compatible with All Excel Versions)
Clean Data Display: The IFERROR function wrapped around the formula ensures that cells remain blank (rather than showing #N/A) if no match is found.
Efficient Data Management

Use WPS Spreadsheet to Easily Look Up and Return Row Data

WPS Office offers a powerful Spreadsheet application that fully supports advanced lookup functions like XLOOKUP, INDEX, and MATCH. You can manage complex datasets and cross-sheet references smoothly without paying for expensive software.

  1. 1. Open Your Workbook: Launch WPS Spreadsheet and open the file containing your lookup table and destination table.
  2. 2. Select the Target Cell: Click on the cell where you want to output the lookup result.
  3. 3. Input the Formula: Go to the Formulas tab or type your =XLOOKUP or =INDEX(MATCH()) formula directly into the formula bar.
  4. 4. Drag to Fill: Press Enter, then use the fill handle in the corner of the cell to copy the formula across the row if you are using INDEX and MATCH.
Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) file formats.Native support for advanced functions including XLOOKUP, INDEX, and MATCH.Lightweight and optimized for fast performance on both Windows and Mac.Familiar ribbon interface makes transitioning from Excel seamless.
microsoft office alternative - wps office

Frequently Asked Questions

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

This error occurs when the exact lookup value cannot be found in the reference array. Ensure there are no leading or trailing spaces, check that numbers aren't stored as text, and confirm the lookup array covers the correct range.

Can I look up multiple criteria at once?

Yes, you can use an array formula with INDEX and MATCH by concatenating lookup values and arrays using the ampersand (&) symbol. Similarly, XLOOKUP allows multiple criteria by linking them in the lookup arguments.

How do I return a row of data horizontally from a vertical list?

You can combine your lookup formula with the TRANSPOSE function to flip the orientation of the returned data. Alternatively, you can use horizontal lookup functions like HLOOKUP depending on how your source data is structured.

Why is XLOOKUP returning a #NAME? error in my spreadsheet?

XLOOKUP is only available in newer versions (Excel 365, Excel 2021, and modern versions of WPS Office). If you see the #NAME? error, your version does not support XLOOKUP, and you must use the INDEX and MATCH solution instead.