Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Formula Table Filter: Step-by-Step Guide

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To filter an Excel table using a formula, you use the FILTER function (available in Excel 365 and Excel 2021) to create a dynamic spill range that updates automatically. The formula =FILTER(Table1[Column1], Table1[Column2]="criteria") returns only the rows where the condition is true. This guide walks you through setting it up, avoiding common errors, and troubleshooting when results don't appear as expected.

What You'll Need

  • Excel 365 or Excel 2021 (or later) on Windows or Mac. The FILTER function is not available in older perpetual versions like Excel 2019 or 2016.
  • Your data formatted as an Excel Table (select the range and press Ctrl+T, or Cmd+T on Mac). This ensures references stay intact when data changes.
  • Basic familiarity with Excel formulas and cell references.

Step-by-Step

  1. Convert your data to a table. Select any cell in your data range, then press Ctrl+T (Cmd+T on Mac). In the Create Table dialog, confirm the range and check "My table has headers." Click OK. This creates a structured table with a default name like Table1. You can rename it via Table Design > Table Name.
  2. Choose a cell for the filtered output. Pick an empty area on the same sheet or a new sheet. Ensure there is enough empty space below and to the right for the results to spill into; otherwise you'll get a #SPILL! error.
  3. Write the FILTER formula. Click the output cell and type =FILTER(. Then select the data range you want returned (e.g., Table1[Sales]) or the entire table if you want all columns. Type a comma, then the condition using the table's column names: e.g., Table1[Region]="West". Close the parenthesis and press Enter. For example: =FILTER(Table1, Table1[Region]="West") returns all rows where Region is West.
  4. Add an optional "if empty" message. If no rows match, FILTER returns a #CALC! error by default. To show a friendly message, add a third argument: =FILTER(Table1, Table1[Region]="West", "No results").
  5. Test and adjust. Change the criteria in the formula or reference a cell (e.g., =FILTER(Table1, Table1[Region]=H1) where H1 contains "West"). The results update automatically when the table data or the criteria cell changes.
  6. Use multiple criteria if needed. Combine conditions with multiplication (AND logic) or addition (OR logic). For AND: =FILTER(Table1, (Table1[Region]="West")*(Table1[Sales]>1000)). For OR: =FILTER(Table1, (Table1[Region]="West")+(Table1[Region]="East")).

Common Mistakes

  • Forgetting to convert to a table. Using regular cell ranges works but breaks easily if rows are added. Always use a table for dynamic filtering.
  • Incorrect column references. Typing Table1[Region] when the column is named "Region " (with a trailing space) causes errors. Check exact header names.
  • Not leaving enough spill space. If cells below or to the right of the output cell contain data, you'll see #SPILL!. Clear the area or move the formula.
  • Using FILTER in older Excel versions. If you have Excel 2019 or earlier, FILTER is not available; you'll get #NAME?. Use AutoFilter or advanced filters instead.
  • Mismatched array sizes. The include argument must have the same number of rows as the array argument. For example, =FILTER(Table1[Sales], Table1[Region]="West") works because both have the same row count.

Tips

  • Use a cell reference for criteria (e.g., H1) to make the filter interactive without editing the formula.
  • Combine FILTER with SORT to order results: =SORT(FILTER(Table1, Table1[Region]="West"), 2, -1) sorts by the second column descending.
  • To return only specific columns, use CHOOSECOLS: =CHOOSECOLS(FILTER(Table1, Table1[Region]="West"), 1, 3) returns columns 1 and 3.
  • Remember that FILTER results are dynamic; if you need static values, copy and paste as values.
  • Name your tables meaningfully (e.g., SalesData) to make formulas readable.

Troubleshooting

  • #SPILL! error: The output range is blocked. Clear cells below and to the right of the formula cell, or move the formula to an empty area.
  • #CALC! error: No rows match the criteria. Add an if_empty argument like "No results" to handle this gracefully.
  • #NAME? error: FILTER is not recognized. Check your Excel version; if you have Excel 2019 or earlier, use AutoFilter (Data > Filter) instead.
  • #VALUE! error: The include argument is not the same size as the array. Ensure both refer to the same number of rows.
  • Results don't update: If calculation is set to manual, press F9 to recalculate. Also check that the table references are correct.
  • Formula returns all rows: The criteria might be too broad (e.g., using a wildcard incorrectly). Use exact matches or functions like ISNUMBER(SEARCH()) for partial matches.

Frequently Asked Questions

Can I use FILTER with multiple criteria?

Yes. For AND logic, multiply conditions: (Table1[Region]="West")*(Table1[Sales]>1000). For OR logic, add them: (Table1[Region]="West")+(Table1[Region]="East").

Does FILTER work in Excel 2019?

No. FILTER is available only in Excel 365 and Excel 2021. In older versions, use AutoFilter or Advanced Filter.

How do I filter a table by a cell value?

Reference the cell in the condition: =FILTER(Table1, Table1[Region]=H1) where H1 contains the value to filter by.

Why do I get a #SPILL! error?

The formula results would overlap existing data. Clear the cells below and to the right of the formula cell, or move the formula to an empty area.

Can I sort the filtered results?

Yes. Wrap FILTER in SORT: =SORT(FILTER(Table1, Table1[Region]="West"), 1, 1) sorts by the first column ascending.

What if no rows match my criteria?

FILTER returns #CALC! by default. Add a third argument with a message, like "No results", to display instead.