Search Multiple Excel Tables with FILTER and VSTACK
Question details
Search customer names, company names, and email addresses across several Excel tables with one search value.

- Product
- Microsoft Excel for Microsoft 365
- Device & OS
- not provided
- Scenario
- The user wants one formula to combine multiple contact tables and return every row containing the value entered in a search cell.
- Observed behavior
- The desired result is a single dynamic list of matching rows, including column headers, from all compatible tables.
Confirm that all source tables use the same columns in the same order and that your Excel version supports dynamic-array functions, including FILTER and VSTACK. Define or verify the search input reference, such as the named cell input on the Search sheet.
Combine the tables and search every column with one formula
Use this method when Contacts, Contacts2, and Contacts3 have matching structures and you want to return rows containing the search text in any of four columns.
VSTACK creates one combined array from the source tables. SEARCH checks each cell for the entered text, MMULT identifies rows with at least one match, and FILTER returns those rows.
On the Search sheet, enter the search value in a cell and assign that cell the name input, or replace input in the formula with an absolute cell reference such as Search!$B$2.
Click the empty cell where the returned list should begin. Make sure the cells below and to the right are clear so the dynamic array can spill.
Enter =LET(stack,VSTACK(Contacts,Contacts2,Contacts3),header,Contacts[#Headers],multiplier,IFERROR(SEARCH(input,stack),0),vector,MMULT(multiplier,SEQUENCE(4,,1,0)),results,FILTER(stack,vector>0,"None Found"),IFERROR(VSTACK(header,results),"")) and press Enter.
If your tables do not have four searchable columns, change SEQUENCE(4,,1,0) so that 4 matches the number of columns in the stacked tables.

Check table compatibility and spill-range issues
Use these checks if the formula returns an error, incomplete results, or a spill error.
Search combined contact tables in WPS Spreadsheets
WPS Spreadsheets provides a familiar worksheet environment for combining contact data and building searchable result lists with modern dynamic-array formulas. Import your Excel workbook, keep matching table columns aligned, and use a formula-driven results area for fast customer lookups.
- 1. Open the Excel workbook: In WPS Office, select Open and choose the .xlsx workbook containing the contact tables and search sheet.
- 2. Align the contact table columns: In WPS Spreadsheets, verify that each contact range uses the same header order for customer name, company, email, and other searchable fields.
- 3. Create a search input cell: Select an empty cell on the search worksheet, enter a search term, and use that cell reference in the lookup formula.
- 4. Add the results formula: Click the first empty output cell and enter a compatible dynamic-array formula that stacks the contact ranges and filters rows matching the search input.

Frequently Asked Questions
Why does the formula use MMULT after SEARCH?
SEARCH returns a result for every matching cell, not a single result for each row. MMULT adds the match values across each row, allowing FILTER to return a row when at least one column contains the search text.
How do I search more or fewer than four columns?
Change the first argument in SEQUENCE(4,,1,0) to the number of columns in each stacked table. For example, use SEQUENCE(6,,1,0) when each table has six searchable columns.
Can the source tables have different names?
Yes. Replace Contacts, Contacts2, and Contacts3 inside VSTACK with your actual Excel table names. The tables must still have compatible column counts and column order.
Why does Excel return a #SPILL! error for the search results?
The formula returns multiple rows and columns. Clear the cells in the intended output area, remove merged cells, and ensure the formula is not entered inside an Excel table.
Can I search for part of an email address or company name?
Yes. SEARCH performs a partial-text match, so entering a value such as "@company.com" or part of a company name returns rows containing that text.




