Function Problems

Search Multiple Excel Tables with FILTER and VSTACK

Aamir Naveed AkramAamir Naveed Akram Nov 12, 2026 871 views

Question details

Search customer names, company names, and email addresses across several Excel tables with one search value.

Search Multiple Excel Tables with FILTER and VSTACK in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Set the search input cell

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.

2
Select the results starting cell

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.

3
Enter the multi-table search formula

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.

4
Adjust the searchable column count if needed

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.

Combine the tables and search every column with one formula
Search results update automatically: When the value in input changes, the spilled results refresh to show all matching records across the combined tables.
WPS Spreadsheets solution

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. 1. Open the Excel workbook: In WPS Office, select Open and choose the .xlsx workbook containing the contact tables and search sheet.
  2. 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. 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. 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.
Create a single searchable list from multiple contact tables.Use dynamic-array workflows for formula-based filtering and returned results.Open and edit Microsoft Excel .xlsx and .xls files with format compatibility.Use a familiar spreadsheet interface for a smooth Excel workbook transition.
microsoft office alternative - wps office

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.