How to Find the First Brown Dog in Multiple Columns with an Excel Formula
Question details
The user wants an Excel-compatible formula to return the first Name where the Color column equals Brown and the Pet column equals Dog, using a structured table and multiple-column comparison.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has a spreadsheet table with Color, Pet, and Name columns and needs to look up the first row matching two criteria.
- Observed behavior
- The user wants to avoid fragile concatenation or full-column calculations and prefers a dynamic array formula that updates automatically.
Confirm your data is in a structured Excel Table with columns named Color, Pet, and Name, and check whether your spreadsheet version supports dynamic array functions such as LET and BYROW.
Use LET, BYROW, and XLOOKUP in an Excel 365 Dynamic Array Formula
Best for Excel 365 and newer spreadsheet versions that support LET and BYROW; returns the first matching Name automatically as the table grows.
Comparing Table1[[Color]:[Pet]]={"Brown","Dog"} creates TRUE/FALSE values for each row. BYROW and LAMBDA(AND) reduce each row to TRUE only when both columns match, and XLOOKUP returns the first matching Name. This method avoids fragile concatenation and unnecessary full-column calculations.
Click any cell in the data range and press Ctrl+T. Name the columns Color, Pet, and Name, and make sure the table is named Table1 or adjust the formula to match your table name.
Select the output cell and enter =LET(matches,Table1[[Color]:[Pet]]={"Brown","Dog"},criterion,BYROW(matches,LAMBDA(row,AND(row))),XLOOKUP(TRUE,criterion,Table1[Name],"Not found")).
In Excel 365, press Enter. XLOOKUP returns the first Name where both criteria are TRUE, or "Not found" if no row matches.
Because the formula uses structured table references, new rows are included automatically when the table expands.

Use an INDEX-MATCH Array Formula for Older Excel and WPS Spreadsheets
Use this bounded-range formula when dynamic array functions are unavailable or when you prefer a formula compatible with older Excel versions and WPS Office Spreadsheets.
Find the First Brown Dog in Multiple Columns with WPS Office Spreadsheets
Use WPS Office Spreadsheets to apply a clean multiple-criteria formula and return the first matching Name without fragile helper columns. Open your Excel file directly in WPS Office and enter a structured-table or bounded-range formula.
- 1. Open WPS Office Spreadsheets: Launch WPS Office and open the workbook containing the Color, Pet, and Name columns.
- 2. Create a structured table: Select the data range and press Ctrl+T. Confirm the range and headers, then name the table if required.
- 3. Enter the multiple-criteria formula: In an empty cell, type =INDEX(C2:C1000,MATCH(1,(A2:A1000="Brown")*(B2:B1000="Dog"),0)) or use the LET/BYROW/XLOOKUP formula if supported.
- 4. Confirm as an array formula if required: Press Ctrl+Shift+Enter in older Excel or WPS Office versions that require legacy array formula confirmation.
- 5. Check the returned Name: Verify that the cell returns the first row where Color is Brown and Pet is Dog, or adjust the criteria cells accordingly.

Frequently Asked Questions
Can I use this formula if my data is not in an Excel Table?
Yes. Use the bounded-range formula =INDEX(C2:C1000,MATCH(1,(A2:A1000="Brown")*(B2:B1000="Dog"),0)) and adjust the ranges to your actual data.
Why does my formula return "Not found" or #N/A?
Check that the Color and Pet cells exactly contain Brown and Dog with no leading or trailing spaces, and make sure all compared ranges have the same number of rows.
Do I need to press Ctrl+Shift+Enter in WPS Office Spreadsheets?
In WPS Office and older Excel versions, legacy array formulas such as INDEX-MATCH need Ctrl+Shift+Enter. In Excel 365 with the LET/BYROW/XLOOKUP formula, press Enter.
Can I modify the formula to find the first Dog of any color?
Yes. Remove or replace the Color condition. For example, use =XLOOKUP("Dog",Table1[Pet],Table1[Name],"Not found") to return the first Dog regardless of color.
Will the structured table formula update when I add new rows?
Yes. Structured table references such as Table1[Name] and Table1[[Color]:[Pet]] expand automatically when rows are added, so the formula continues to search new data.




