Function Problems

Return a Table Result for Five Matching Criteria in Excel

Jason MillerJason Miller Nov 12, 2026 869 views

Question details

Create a formula that compares five required values with five columns in a data table and returns the related result.

Return a Table Result for Five Matching Criteria in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user needs to find either the first matching result or every matching result when all five criteria are met in the same row.
Observed behavior
A result should be returned only for rows where each of the five source values matches its corresponding required criterion.
Before you start

Arrange the five lookup columns next to each other, and make sure the criteria range has the same five fields in the same order. Define or identify the result column or result range you want the formula to return.

Solution 1Recommended

Return the first result that matches all five criteria

Use this formula when only the first row satisfying every criterion should return a result.

This approach tests each data row against the five required values. BYROW returns TRUE only when all five comparisons in that row are TRUE, and XLOOKUP returns the related value from the Result range.

1
Create matching ranges

Set variables to the five-column data range, required to the one-row or one-column range containing the five criteria, and Result to the column or range to return. Ensure variables and required use the same field order.

2
Enter the XLOOKUP formula

In the output cell, enter =XLOOKUP(TRUE,BYROW(variables,LAMBDA(r,AND(r=required))),Result,"No match"). Replace variables, required, and Result with your actual cell ranges or named ranges.

3
Confirm the returned value

Press Enter. Excel returns the Result value from the first row where all five fields match; it displays "No match" when no row meets every condition.

Return the first result that matches all five criteria
Range layout matters: The five criteria must correspond position by position with the five columns in variables. If a criterion is in the wrong order, the formula can return no match or an incorrect match.
WPS Spreadsheets formula tools

Match Five Criteria and Return Results with WPS Spreadsheets

WPS Spreadsheets provides a familiar worksheet interface for building multi-criteria lookup formulas. Set up your five criteria and source columns, then use modern lookup and filter functions to return the first matching value or a list of all matches.

  1. 1. Open the workbook in WPS Spreadsheets: Launch WPS Office, select Spreadsheets, and open the Excel workbook containing the five source columns and result column.
  2. 2. Place criteria in aligned cells: Enter the five required values in adjacent cells so their order matches the five fields in the data table.
  3. 3. Add a first-match formula: Click the result cell and enter an XLOOKUP formula that evaluates the five-column match condition and returns the related result.
  4. 4. Use FILTER for multiple records: Click an empty output cell and use FILTER with the same five-condition test when all matching results are needed.
Build five-criteria lookup logic with spreadsheet formulas.Return a single matching value or filter multiple matching records.Open and edit Microsoft Excel .xlsx and .xls workbooks.Use a familiar, lightweight spreadsheet interface for seamless formula migration.
microsoft office alternative - wps office

Frequently Asked Questions

How do I match five columns in Excel and return one value?

Use XLOOKUP with a row-by-row logical test, such as =XLOOKUP(TRUE,BYROW(variables,LAMBDA(r,AND(r=required))),Result,"No match"). The variables range must contain the five source columns, and required must contain the five matching criteria in the same order.

How can I return all rows that meet five criteria in Excel?

Use =FILTER(Result,BYROW(variables,LAMBDA(r,AND(r=required))),"No match"). Enter it in an empty cell and leave enough space for the results to spill.

Why does my five-criteria lookup return no match?

Check that the criteria and source columns are in the same order, have compatible data types, and do not contain hidden spaces. Also verify that every required value exists together in one data row.

Can the Result range contain more than one column?

Yes. Set Result to multiple adjacent columns in XLOOKUP or FILTER. The formula returns the related fields from the matching row or rows.

What should I use if more than one record has the same five criteria?

Use FILTER when you need every matching record. XLOOKUP returns only the first match it finds.