Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
https://pctechmag.co.uk/ PC Tech Mag

Tech news, gadget reviews, tips, and digital trends — PC Tech Mag keeps you informed on everything technology.

https://pctechmag.co.uk/ PC Tech Mag

Tech news, gadget reviews, tips, and digital trends — PC Tech Mag keeps you informed on everything technology.

  • Home
  • About us
  • Contact us
  • Tech

About This Site

PC Tech Mag is an online tech magazine with PC hardware and gaming guides, Windows tips, software explainers and gadget coverage.

Recent Posts

  • How to Find Duplicates in Google Sheets: 5 Easy Methods
  • How to Add Speaker Notes in PowerPoint: A Step-by-Step Guide
  • Lighter Linux: The Best Lightweight Linux Distros for Old and Slow PCs
  • Ubuntu vs Mint: Which Linux Distro Should You Choose in 2026?
  • How Do I Send a GIF in a Text Message? A Complete Guide for iPhone and Android

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Find Us

Contact: farmanali5starseo@gmail.com

  • Home
  • About us
  • Contact us
  • Tech
Subscribe
Close

Search

excel filter function spreadsheet on a laptop screen
Software & Apps

Excel FILTER Function: How to Use It with Examples

By admin
October 29, 2026 7 Min Read
2

If you have ever copied rows by hand, hidden rows one by one, or rebuilt a short list from a long spreadsheet, the Excel FILTER function can save you a lot of time. It looks at a range, keeps only the rows that meet your rule, and shows the result in a new place. The best part is that the result updates by itself when your data changes.

In this guide, you will learn what the Excel FILTER function does, how its syntax works in simple words, and how to use it with clear worked examples. You will also learn how to fix common errors and how it differs from the classic filter buttons at the top of Excel.

What Does the Excel FILTER Function Do?

The Excel FILTER function returns only the rows or columns that pass a test you set. For example, you can ask Excel to show only sales from London, only orders over $500, or only staff in the Sales team. Everything else is left out of the result, but your original data stays untouched.

This is different from sorting or hiding rows. FILTER creates a live, separate result. If you change a value in the source data, add a new row inside the range, or change the condition, the filtered list updates at once. That makes it useful for reports, dashboards, shortlists, and lists you need to reuse.

It is also a dynamic array function. That means one formula can spill its answer across several cells, rows, or columns. You type the formula once, in the top-left cell of the result, and Excel fills the rest. You do not need to copy the formula down the column.

Excel FILTER Function Syntax in Simple Words

The basic syntax is:

=FILTER(array, include, [if_empty])

Here is what each part means in plain English:

  • array: The range you want to filter, such as A2:D20. This is the data Excel will look through.
  • include: The test or condition a row must pass to be shown. For example, B2:B20=”London” means “only keep rows where the city is London.”
  • if_empty: This part is optional. It is the message or value Excel shows if no rows pass the test. Without it, Excel may show an error instead.

Think of it like this: array is where you look, include is the rule, and if_empty is the backup message. Once you understand those three parts, most FILTER formulas become much easier to read.

A Simple Example to Try First

Suppose you have a small staff table in cells A1:D6. Column A holds names, column B holds teams, column C holds cities, and column D holds monthly sales. The first row holds the headings.

NameTeamCitySales
AnaSalesLondon420
BenSupportManchester310
CaraSalesLondon680
DanSalesLeeds540
EllaSupportLondon290

We will use this table for the examples below. In each case, put the formula in an empty cell away from the table, such as F2, so the result has room to spill.

Example 1: Filter by One Condition

To show only the Sales team, use this formula:

=FILTER(A2:D6, B2:B6=”Sales”)

Excel checks each row in B2:B6. If the team is Sales, it keeps the whole row. If not, it leaves that row out. The result shows Ana, Cara, and Dan, with all four columns for each person.

Notice that the include range, B2:B6, is the same height as the array, A2:D6. That is important. Excel compares the two row by row, so the ranges must line up. If they do not, you can get an error.

Example 2: Filter by Two Conditions

Sometimes one rule is not enough. To show only Sales staff in London, you need two tests to be true at the same time. In Excel, you multiply the tests together:

=FILTER(A2:D6, (B2:B6=”Sales”)*(C2:C6=”London”))

Here, the star acts like the word AND. A row is kept only if both parts are true. In our table, that gives Ana and Cara. Dan is in Sales but lives in Leeds, so he is left out. Ella lives in London but works in Support, so she is also left out.

To use OR instead, use a plus sign. For example, (B2:B6=”Sales”)+(C2:C6=”London”) keeps a row if either test is true. That is handy when you want a wider list, such as everyone in Sales plus everyone in London.

Example 3: Filter by Text

FILTER also works well for text searches. Suppose you want every name that starts with “C.” You can use the LEFT function inside the test:

=FILTER(A2:D6, LEFT(A2:A6,1)=”C”)

This checks the first letter of each name and keeps only Cara. For a partial match anywhere in the text, use SEARCH. For example, to find a word inside a product name, you can test whether SEARCH returns a number. SEARCH is not case-sensitive, so “laptop,” “Laptop,” and “LAPTOP” all match.

Text filtering is useful for customer lists, product lists, and notes. Instead of scanning hundreds of rows by eye, you can pull out the matching rows in seconds and check them in one clean list.

Example 4: Filter and Sort the Results

FILTER on its own keeps the original order of your data. To show the result sorted, wrap it in the SORT function:

=SORT(FILTER(A2:D6, B2:B6=”Sales”), 4, -1)

In this formula, 4 means sort by the fourth column, which is Sales, and -1 means largest first. The result shows Cara first with 680, then Dan with 540, then Ana with 420. If you change -1 to 1, Excel sorts smallest first.

You can also sort by name or city by changing the column number. Combining FILTER and SORT is a common pattern for leaderboards, top sellers, and “best of” lists that stay up to date.

Example 5: Show a Friendly Message When Nothing Matches

If no rows meet your rule, FILTER normally returns the #CALC! error. That is not very friendly in a report. The if_empty part lets you replace it with a clear message:

=FILTER(A2:D6, B2:B6=”Marketing”, “No matching staff found”)

Since our table has no Marketing team, Excel shows “No matching staff found” instead of an error. Use this version whenever other people will read the result, because it explains what happened instead of looking broken.

Common Errors and What They Mean

#CALC! Means No Rows Matched

The #CALC! error most often means your rule matched nothing. Check your spelling, check for extra spaces, and check that the test range lines up with the data. Adding an if_empty message, as in Example 5, is the simplest fix when an empty result is possible.

#VALUE! Often Means the Ranges Do Not Line Up

The #VALUE! error can appear when the include range is a different size from the array, or when a test uses the wrong type of data. For example, comparing text with a number, or using a range with 10 rows against a range with 20 rows, can cause trouble. Make sure both ranges start and end on the same rows.

#SPILL! Means the Result Has No Room

If Excel shows #SPILL!, something is blocking the cells where the result needs to go. Clear the cells below and to the right of your formula, remove merged cells in that area, and try again. You only need to type the formula once; Excel fills the rest.

Which Excel Versions Include FILTER?

The Excel FILTER function is available in Microsoft 365 and in Excel 2021 and later versions. It is also available in Excel for the web when you are signed in with a Microsoft 365 account. It is not available in older standalone versions such as Excel 2019 or Excel 2016.

If you open a file with FILTER on an older version, the formula may show an error or a name error, even though it works fine on a newer version. If you share files with other people, it is worth checking which version they use before you rely on FILTER for an important report.

FILTER Function vs. the Classic Filter Buttons

The classic filter buttons, found on the Data tab, hide rows in place. They are quick for a one-time check, and you can tick boxes to choose values. The FILTER function, by contrast, creates a new, live list somewhere else and leaves the original table unchanged.

Use the classic filter buttons when you want a fast, temporary view. Use the Excel FILTER function when you want a result you can reuse, sort, print, or link to another sheet. Because the result is a formula, it also updates when the data changes, while a classic filter view needs to be reapplied by hand.

Practical Tips for Using FILTER Well

  • Put the formula in an empty area with plenty of space below and to the right, so the spill range is not blocked.
  • Use Excel Tables when you can, because table ranges grow as you add rows, which keeps your filtered list complete.
  • Keep your include range the same size as your array, and double-check the row numbers before you press Enter.
  • Add an if_empty message for reports that other people will read.
  • Test with one condition first, then add a second condition, so mistakes are easier to find.

Final Thoughts

The Excel FILTER function turns a long, messy table into a short, useful list with a single formula. Start with one condition, add a second condition when you need it, and use SORT when order matters. Once you are comfortable with array, include, and if_empty, you will find it hard to go back to copying rows by hand.

Frequently Asked Questions

What does the Excel FILTER function do?

It returns only the rows that meet a condition you set, while leaving the original data unchanged.

What is the basic syntax of the Excel FILTER function?

The basic syntax is =FILTER(array, include, [if_empty]), where array is the data, include is the test, and if_empty is an optional message.

Can the Excel FILTER function use two conditions?

Yes. Multiply two tests for AND, so both must be true, or add them for OR, so either test can be true.

Why does the Excel FILTER function show #CALC!?

It usually means no rows matched your rule. Check spelling and spaces, or add an if_empty message.

Which Excel versions include the FILTER function?

It is included in Microsoft 365 and Excel 2021 and later, but not in older versions such as Excel 2019.

Author

admin

Follow Me
Other Articles
A laptop sharing its screen during an online meeting, illustrating how screen mirroring displays a computer screen on a larger display
Previous

How to Share Your Screen on Microsoft Teams (Desktop, Web and Mobile)

microsoft 365 apps on a laptop and phone on a desk
Next

What Is Microsoft 365? Apps, Plans and How It Works

2 Comments
  1. Excel SUMIF Function Explained With Examples - PC Tech Mag says:
    November 1, 2026 at 6:38 am

    […] Use SUMIF for one condition and SUMIFS for two or more. For example, =SUMIFS(C2:C5,A2:A5,”Apples”,B2:B5,”North”) totals only Apples sold in the North. SUMIFS puts the sum range first, so the argument order is different: =SUMIFS(sum_range, criteria_range1, criteria1, …). If you only need one condition, SUMIF is shorter and easier to read. To see a related function that returns matching rows instead of a total, read our guide to the Excel FILTER function. […]

    Reply
  2. Excel Count Cells With Text: 3 Easy Ways (COUNTIF, COUNTA & More) - PC Tech Mag says:
    December 2, 2026 at 4:51 am

    […] all counted by the same formula. If you need to count text in a list you have already filtered, the Excel FILTER function can help you build that filtered list first, then count the text in […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About This Site

PC Tech Mag is an online tech magazine with PC hardware and gaming guides, Windows tips, software explainers and gadget coverage.

Search

Recent Posts

  • How to Find Duplicates in Google Sheets: 5 Easy Methods
  • How to Add Speaker Notes in PowerPoint: A Step-by-Step Guide
  • Lighter Linux: The Best Lightweight Linux Distros for Old and Slow PCs
  • Ubuntu vs Mint: Which Linux Distro Should You Choose in 2026?
  • How Do I Send a GIF in a Text Message? A Complete Guide for iPhone and Android

Find Us

Contact: farmanali5starseo@gmail.com

About This Site

PC Tech Mag is an online tech magazine with PC hardware and gaming guides, Windows tips, software explainers and gadget coverage.

Recent Posts

  • How to Find Duplicates in Google Sheets: 5 Easy Methods
  • How to Add Speaker Notes in PowerPoint: A Step-by-Step Guide
  • Lighter Linux: The Best Lightweight Linux Distros for Old and Slow PCs
  • Ubuntu vs Mint: Which Linux Distro Should You Choose in 2026?
  • How Do I Send a GIF in a Text Message? A Complete Guide for iPhone and Android

Archives

  • December 2026 (15)
  • November 2026 (192)
  • October 2026 (85)

Find Us

Contact: farmanali5starseo@gmail.com

Copyright 2026 — PC Tech Mag. All rights reserved. Blogsy WordPress Theme