Smart Systems for Home

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

Excel Filter Value with Formula: Using the FILTER Function

· 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 values with a formula in Excel, use the =FILTER() function. This dynamic array formula allows you to extract a subset of data from a range based on criteria you define, and it updates automatically whenever the source data changes. Unlike the manual Filter button in the Data tab, this method keeps your original list intact while creating a separate, live-updating list of results elsewhere in your workbook.

What You'll Need

  • A version of Excel that supports dynamic arrays (Microsoft 365 or Excel 2021 and later).
  • A dataset organized in rows and columns with clear headers.
  • A destination cell where the filtered results will be displayed.

Step-by-Step

  1. Prepare Your Data: Ensure your data is in a clean table format. While not strictly required, converting your data range into an official Excel Table (select data and press Ctrl + T) makes your formulas easier to read and ensures new rows are automatically included in the filter.
  2. Select the Destination Cell: Click on the empty cell where you want the filtered list to begin. Ensure there is enough empty space below and to the right of this cell, as the formula will "spill" the results into adjacent cells.
  3. Start the FILTER Formula: Type =FILTER( into the cell.
  4. Define the Array: Select the entire range of data you want to filter (including all columns you wish to see in the result). For example, if your data is in cells A2 through C10, your formula will look like =FILTER(A2:C10, .
  5. Set the Include Criteria: After the first comma, tell Excel which column to check and what value to look for. To filter for a specific value, select the column range and use an equals sign. For example, if column B contains categories and you only want "Electronics," type B2:B10="Electronics". The formula now looks like: =FILTER(A2:C10, B2:B10="Electronics").
  6. Add an "If Empty" Argument (Optional): To prevent the #CALC! error if no matches are found, add a third argument at the end. For example: =FILTER(A2:C10, B2:B10="Electronics", "No results found").
  7. Press Enter: Once you hit Enter, Excel will automatically populate the cells below and to the right with all rows that meet your criteria.

Common Mistakes

  • Blocking the Spill Range: The most common error is having existing data in the cells where the FILTER function needs to place its results. This causes a #SPILL! error. Always ensure the area below and to the right of your formula is completely empty.
  • Mismatched Range Sizes: The "Array" range and the "Include" range must have the same number of rows. If you select A2:C10 for the array but B2:B20 for the criteria, Excel will return a #VALUE! error.
  • Case Sensitivity: By default, the FILTER function is not case-sensitive. If you need to filter specifically for "APPLE" and ignore "apple," you will need to combine FILTER with the EXACT() function.
  • Forgetting Quotes: When filtering for text, the value must be enclosed in double quotation marks (e.g., "Completed"). Numbers do not require quotes.

Tips

  • Use Cell References: Instead of typing "Electronics" directly into the formula, type the value in a separate cell (e.g., E1) and reference that cell: =FILTER(A2:C10, B2:B10=E1). This allows you to change the filter value instantly without editing the formula.
  • Filter by Multiple Criteria: To filter by two or more conditions, use the asterisk * for "AND" logic or the plus sign + for "OR" logic.
    • AND: =FILTER(A2:C10, (B2:B10="Electronics") * (C2:C10="In Stock"))
    • OR: =FILTER(A2:C10, (B2:B10="Electronics") + (B2:B10="Furniture"))
  • Combine with SORT: Wrap your FILTER function inside a SORT function to organize your results automatically. Example: =SORT(FILTER(A2:C10, B2:B10="Electronics"), 1, 1) (this sorts the filtered list by the first column in ascending order).

Troubleshooting

If the formula does not work as expected, try these steps in order:

  1. Check for #SPILL!: Look for any text or formatting in the cells where the data should appear. Delete any content in the way and the data will appear instantly.
  2. Verify Range Dimensions: Double-check that your criteria range (the second argument) starts and ends on the same row numbers as your main data array (the first argument).
  3. Check for #CALC!: This usually means no data matches your criteria. Check for typos in your search term or add the "If Empty" argument to confirm the formula is working but finding nothing.
  4. Update Excel: If you do not see the FILTER function in your formula suggestions, you may be using an older version of Excel (like 2019 or 2016) that does not support dynamic arrays. In this case, you must use the manual Filter tool or a complex INDEX/MATCH array formula.

Frequently Asked Questions

Can I filter for partial text matches?

Yes. Since the FILTER function doesn't support wildcards like * directly, you can use the ISNUMBER(SEARCH()) combination. Example: =FILTER(A2:C10, ISNUMBER(SEARCH("text", B2:B10))).

Does the filtered list update automatically?

Yes. Because this is a dynamic array formula, any change you make to the source data will be reflected in the filtered results immediately.

Can I filter for blank cells?

Yes. To filter for blanks, use ="" in your criteria. Example: =FILTER(A2:C10, B2:B10=""). To filter for non-blank cells, use <>"".

How do I filter based on a date?

You can reference a cell containing a date or use the DATE() function. Example: =FILTER(A2:C10, B2:B10=DATE(2023,12,25)).

Can I use this formula across different worksheets?

Yes. You can reference a range on another sheet by including the sheet name. Example: =FILTER(Sheet1!A2:C10, Sheet1!B2:B10="Electronics").