What are filters in excel

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

Try it!

Use filters to temporarily hide some of the data in a table, so you can focus on the data you want to see.

Filter a range of data

  1. Select any cell within the range.

  2. Select Data > Filter.

    Filter button

  3. Select the column header arrow Filter arrow.

  4. Select Text Filters or Number Filters, and then select a comparison, like Between.

    Number Filters Between

  5. Enter the filter criteria and select OK.

    Custom AutoFilter dialog box

Filter data in a table

When you Create and format tables, filter controls are automatically added to the table headers.

An Excel table showing built-in filters

  1. Select the column header arrow Filter drop-down arrow for the column you want to filter.

  2. Uncheck (Select All) and select the boxes you want to show.

    Filter Gallery

  3. Click OK.

The column header arrow Filter drop-down arrow changes to a Applied filter iconFilter icon. Select this icon to change or clear the filter.

Want more?

Filter data in a range or table

Filter data in a PivotTable

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

What is Filter in Excel?

The filter in excel helps display relevant data by eliminating the irrelevant entries temporarily from the view. The data is filtered as per the given criteria. The purpose of filtering is to focus on the crucial areas of a dataset. For example, the city-wise sales data of an organization can be filtered by the location. Hence, the user can view the sales of selected cities at a given time.

A filter is necessarily required when working with a huge database. Being a widely used tool, the filter converts a comprehensive view into an easy-to-understand one. To apply filters, the dataset must contain a header row which specifies the name of every column.

Table of contents
  • What is Filter in Excel?
    • How to Filter in Excel?
      • Method 1: With Filter Option Under the Home tab
      • Method 2: With Filter Option Under the Data tab
      • Method 3: With the Shortcut key
    • How to Add Filters in Excel?
      • Example #1–“Number Filters” Option
      • Example #2–“Search Box” Option
    • Option while you Drop Down the Filter Function
    • The Techniques of Filtering in Excel
    • Frequently Asked Questions
    • Recommended Articles

How-to-Filter-in-Excel

You are free to use this image on your website, templates, etc, Please provide us with an attribution linkArticle Link to be Hyperlinked
For eg:
Source: Filter in Excel (wallstreetmojo.com)

How to Filter in Excel?

You can download this Filter Column Excel Template here – Filter Column Excel Template

It is good to work with filters because they fit our needs the way we want to. In order to filter data, select the entries to be visible and deselect the rest of the items.

The three methods to add filters in excel are listed as follows:

  1. With filter option under the Home tab
  2. With filter option under the Data tab
  3. With the shortcut key

Let us consider a dataset to go through the three methods of adding filters.

The following table shows the invoices issued to the buyers of different cities. We want to filter the data using different methods.

How to Filter in Excel Example 1

Method 1: With Filter Option Under the Home tab

In the Home tab, there is a “filter” option under the “sort and filter” drop-down of the “editing” section, as shown in the following image.

 Example 1.1

Step 1: Select the data and click “filter” under the “sort and filter” drop-down.

How to Filter in Excel Example 1.2

Step 2: The filters are added to the selected data range. The drop-down arrows, shown within the red boxes in the following image, are filters.

Example 1.3

Step 3: Click the drop-down arrow of the column “city” to view the different names of the cities.

How to Filter in Excel Example 1.4.0

Step 4: To see the invoice values of “Delhi” only, select “Delhi” and uncheck all the remaining boxes.

Example 1.5

Step 5: The data for the city “Delhi” is filtered and displayed in the following image.

How to Filter in Excel Example 1.6

Method 2: With Filter Option Under the Data tab

In the Data tab, there is a “filter” option under the “sort and filter” section, as shown in the following image.

Example 1.7

Method 3: With the Shortcut key

The keyboard shortcutsAn Excel shortcut is a technique of performing a manual task in a quicker way.read more are a good way to speed up the daily tasks. Select the data and add the filter using either of the following shortcuts:

  • Press the keys “Shift+Ctrl+L” together.

How to Filter in Excel Example 1.19

  • Press the keys “Alt+D+F+F” together.

How to Filter in Excel Example 1.18

Note: The preceding shortcuts for adding filtersUsing sorting and filtering, we can see the data category wise. With filtering data quickly you can easily navigate through menus or clicking through a mouse in less time.read more are toggle keys. Repetitive pressing helps to turn on and turn off the filters.

How to Add Filters in Excel?

We can filter numbers using advanced techniques. Let us consider some examples to understand the working of filters in Excel.

Example #1–“Number Filters” Option

Working on the data under the preceding heading (methods of filtering in Excel), we want to apply the following filters:

a. To filter column B (invoice value) for numbers greater than 10000

b. To filter column B for numbers greater than 10000 but less than 20000

Let us go through the two cases one by one.

a. Filter numbers greater than 10000

Step 1: Open the filter in column B (invoice value) by clicking on the filter symbol.

Step 2: In “number filters,” choose the “greater than” option, as shown in the following image.

How to Filter in Excel Example 1.8

Step 3: The “custom autofilter” box appears.

Example 1.9.0

Step 4: Enter the number 10000 in the box to the right of “is greater than.”

How to Filter in Excel Example 1.10

Step 5: The output displays the invoice values greater than 10000. The symbol within the red box is the filter icon. It indicates that the filter has been applied to column B.

Example 1.11

b. Filter numbers greater than 10000 but less than 20000

Step 1: In “number filters,” choose the “greater than” option.

Step 2: In the “custom autofilter” box, select “is less than” in the second box to the left-hand side. This is shown in the following image.

How to Filter in Excel Example 1.12

Step 3: Enter the number 10000 in the box to the right of “is greater than.” Enter the number 20000 in the box to the right of “is less than.”

 Example 1.13

Step 4: The output displays the invoice values greater than 10000 but less than 20000.

How to Filter in Excel Example 1.14

Example #2–“Search Box” Option

Working on the data under the preceding heading (methods of filtering in Excel), we have replaced the first column (city) with product IDs.

We want to filter the details of product ID “prd 1.”

The steps are listed as follows:

Step 1: Add filters to the columns “product ID” and “invoice value.”

Example 1.15

Step 2: In the search boxA search box in Excel finds the needed data by typing into it, then filters the data and displays only that much info. When working with large datasheets, this simple tool may save a lot of time.read more, enter the value that is to be filtered. So, enter “prd 1.”

How to Filter in Excel Example 1.16

Step 3: The output displays only the filtered value from the list, as shown in the following image. Hence, we can see the invoice value of the product ID “prd 1.”

Example 1.17

Option while you Drop Down the Filter Function

  1. Sort A to Z and Sort Z to A: If you wish to arrange your data ascending or descending order.
  2. Sort by Color: If you want to filter the data by color if a cell is filled by color.
  3. Text filter: When you want to filter a column with some exact text or number.
  4. Filter cells that begin with or end with an exact character or the text
  5. Filter cells that contain or do not contain a given character or word anywhere in the text.
  6. Filter cells that are exactly equal or not equal to a detailed character.

For example:

  • Suppose you want to use the filter for a specific item. Click on to text filter and choose equals.

example 1.7

  • It enables you the one dialogue, which includes a Custom Auto-Filter dialogue box.

example 1.8

  • Enter fruits under category and click Ok.

example 1.9

  • Now you will get the data of fruits category only as shown below.

example 1.10

The Techniques of Filtering in Excel

The following techniques must be followed while filtering data:

  • If the dataset is large, type the value to be filtered. This filters all the possible matches.
  • If numerical data has to be filtered by specifying the greater than or the less than number, use the “number filters” option.
  • If data has to be filtered by the color of specific rows, use the “filter by color” option.

Frequently Asked Questions

1. What are filters and how to add them in Excel?

Filtering is a technique which displays the required information and removes the unwanted data from the view. It helps the user focus on the relevant data at a given time.

The steps to add filters in Excel are listed as follows:
• Ensure that a header row appears on top of the data, specifying the column labels.
• Select the data on which filters are to be added.
• Add filters by any of the three given methods.
o Click the “filter” option under the “sort and filter” (editing section) drop-down of the Home tab.
o Click the “filter” option under the “sort and filter” section of the Data tab.
o Press the keys “Shift+Ctrl+L” or “Alt+D+F+F.”

Note: As soon as the filters are added, a drop-down arrow appears on the particular column header.

2. How to apply filters to one or more columns?

The steps to apply filters to one or more columns are listed as follows:
• Click the drop-down arrow of the column to be filtered.
• Uncheck the “select all” option which helps deselect all data.
• Select the boxes to be displayed.
• Click “Ok.”
The drop-down arrow changes to the filter icon as soon as a filter is applied. When filters are applied to multiple columns, the filter icon appears on each one of them. Hovering over the filter icon shows the filters that have been applied.

Note: The drop-down arrow on a column header indicates a filter is added. The filter icon indicates a filter has been applied.

3. How to use filters in Excel?

The filters can be applied to numbers, text values, and dates. These cases are discussed as follows:
Filter numbers
• Click on the “number filters.”
• Select any of the options like “equals,” “does not equals,” “greater than,” “less than,” “between,” “above average,” and so on.
• Specify the required fields in the dialog box that appears. This box may or may not be displayed.

For instance, in “equals,” enter the number against which the values should be compared. The filtered results show the matching numerical values.

Filter text and date values
• To filter text and date values, select “text filters” and “date filters” from the respective drop-down arrows.
• The “text filters” allow filtering text strings which contain specific characters or words. The “date filters” allow filtering dates for a particular year, month, week, and so on.

Note: The “plus” and the “minus” sign of the date filters are used for expanding and collapsing the various levels respectively.

Recommended Articles

This has been a guide to Filter in Excel. Here we discuss how to use/add filters in excel along with step by step examples and a downloadable template. You may learn more about Excel from the following articles –

  • VBA FilterThe VBA Filter tool is used to sort out or fetch the desired data. However, this function accepts optional arguments, and the only required argument is an expression that covers the range, such as worksheets(«Sheet1»). Range(“A1”).read more
  • How to Filter Pivot Table?By right-clicking on the pivot table, we can access the pivot table filter option. Another approach is to use the filter options available in the pivot table fields.read more
  • Advanced Filter in ExcelThe advanced filter is different from the auto filter in Excel. This feature is not like a button that one can use with a single click of the mouse. To use an advanced filter, we have to define criteria for the auto filter and then click on the “Data” tab. Then, in the advanced section for the advanced filter, we will fill our criteria for the data.read more
  • Types of Filters in Power BIThe filter function in Power BI is more commonly used to read data or reports based on multiple criteria. Visual level filters, page-level filters, report-level filters, drill-through filters, and so on are all available filters in Power Bi.read more

Filtering data in MS Excel refers to displaying only the rows that meet certain conditions. (The other rows gets hidden.) Using the store data, if you are interested in seeing data where Shoe Size is 36, then you can set filter to do this.

Contents

  • 1 What is the purpose of filtering data?
  • 2 What is Sorting and filtering Excel?
  • 3 Why is filtering important in Excel?
  • 4 What do you mean by filtering?
  • 5 What is difference between filtering and sorting?
  • 6 What is the difference between short and filter?
  • 7 What is custom filtering?
  • 8 When would you want to filter data in Excel?
  • 9 What is filter give example?
  • 10 What do you mean by filtering in computer?
  • 11 What is filtering data in computer?
  • 12 What is filter in computer class 10?
  • 13 What do you mean by filtering data Class 10?
  • 14 What is the difference between sieving from filtering?
  • 15 What are the advantages of sorting and filtering data?
  • 16 How do I copy filtered data in Excel?
  • 17 What is the difference between filtering data by selection and filtering data by form?
  • 18 What are steps to filter data in a table?
  • 19 What is Result Filter in MVC?
  • 20 What is custom filtering give one example?

What is the purpose of filtering data?

Filtering Data
When data is filtered, only rows that meet the filter criteria will display and other rows will be hidden. With filtered data, you can then copy, format, print, etc., your data, without having to sort or move it first.

What is Sorting and filtering Excel?

The filter tool gives you the ability to filter a column of data within a table to isolate the key components you need.The sorting tool allows you to sort by date, number, alphabetic order and more.

Why is filtering important in Excel?

Filtering data in a spreadsheet allows only certain data to display. This function is useful when you want to focus on specific information in a large dataset or table.

What do you mean by filtering?

1 : to subject to the action of a filter. 2 : to remove by means of a filter. intransitive verb. 1 : to pass or move through or as if through a filter. 2 : to come or go in small units over a period of time people began filtering in.

What is difference between filtering and sorting?

Essentially, sorting and filtering are tools that let you organize your data. When you sort data, you are putting it in order. Filtering data lets you hide unimportant data and focus only on the data you’re interested in.

What is the difference between short and filter?

Sorting means to arrange the give data according to a particular field, either in ascending order or in descending order. The filter feature selectively blocks out data you don’t want to see.

What is custom filtering?

Custom filter is a module that allows you to create your own filters based on regular expressions.

When would you want to filter data in Excel?

By filtering information in a worksheet, you can find values quickly. You can filter on one or more columns of data. With filtering, you can control not only what you want to see, but what you want to exclude.

What is filter give example?

The definition of a filter is something that separates solids from liquids, or eliminates impurities, or allows only certain things to pass through. A Brita that you attach to your water faucet to remove impurities from your water is an example of a water filter.

What do you mean by filtering in computer?

1) In computer programming, a filter is a program or section of code that is designed to examine each input or output request for certain qualifying criteria and then process or forward it accordingly. This term was used in UNIX systems and is now used in other operating systems.

What is filtering data in computer?

Data filtering is the task of reducing the content of noise or errors from measured process data. It is an important task because measurement noise masks the important features in the data and limits their usefulness in practice.

What is filter in computer class 10?

Filtering is a useful way to see only the data that you want displayed. You can use filters to display specific records in a form, report, query, or datasheet, or to print only certain records from a report, table, or query.

What do you mean by filtering data Class 10?

Filtering is a process where we can see only data as per defined criteria. Suppose a table has data of sales figure of 10 products for 5 years. We can select a filter for one particular product & see its data only. We can apply multiple filters.

What is the difference between sieving from filtering?

In sieving, particles that are too big to pass through the holes of the sieve are retained (see particle size distribution). In filtration, a multilayer lattice retains those particles that are unable to follow the tortuous channels of the filter.

What are the advantages of sorting and filtering data?

Benefits of sorting and filtering data –

  • Systematic representation – sorting enables users to represent the data in a very systematic manner that enables fine presentation.
  • Better understanding of data – when data is presented in a sorted and filtered manner then then data decoding and understanding becomes very easy.

How do I copy filtered data in Excel?

Follow these steps:

  1. Select the cells that you want to copy For more information, see Select cells, ranges, rows, or columns on a worksheet.
  2. Click Home > Find & Select, and pick Go To Special.
  3. Click Visible cells only > OK.
  4. Click Copy (or press Ctrl+C).

What is the difference between filtering data by selection and filtering data by form?

Filter by Selection: To filter all the rows in a table that contain a value that matches a selected value in a row by filtering the datasheet view. Filter by form: To filter on several fields in a form or datasheet, or if you are trying to find a specific record.

What are steps to filter data in a table?

Try it!

  1. Select any cell within the range.
  2. Select Data > Filter.
  3. Select the column header arrow .
  4. Select Text Filters or Number Filters, and then select a comparison, like Between.
  5. Enter the filter criteria and select OK.

What is Result Filter in MVC?

Result filters are executed before or after generating the result for an action. The Action Result type can be ViewResult, PartialViewResult, RedirectToRouteResult, which derives from the ActionResult class. Example: public interface IResultFilter.

What is custom filtering give one example?

One of the most common uses of a Custom Filter is screening transactions for fraudulent use of credit card account numbers.Use Custom Filters and the Product Watch List to hold certain products (such as computers or televisions) when a large number are found in a single order.

The Excel Filter Feature is a great tool that proves to be a lifesaver at the time when you are working with huge data in Excel. In this blog, we would unlock this filter feature in Excel. We would learn how to filter huge data in excel. We would also get into answering the following common questions – how to filter values, or numbers, or dates and time in Excel, how to use filter using wildcard characters in excel, how to filter using the search box, how to filter by text or cell color.

Sample Data – Download Sample File

In this blog, we would be using the below data. Kindly download and practice along with using the Download button.

Table of Contents

  1. Sample Data – Download Sample File
  2. What is the Purpose of Filter Feature in Excel?
  3. Adding Filter Option on Header Rows
  4. Simple Ways to Filter Your Data Set in Excel
    1. Applying Filter on Single Column
    2. Applying Filter on Multiple Columns
  5. Filter Data Using Filter Search Box in Excel
  6. Clearing Filter on Columns in Excel
  7. How to Filter Values or Text in Excel?
    1. Filter Values based on Two Criteria
  8. How to Filter Numbers in Excel?
  9. How to Filter Dates in Excel?
  10. How to Filter By Color in Excel?
    1. Quick Way to Filter By A Specific Cell’s Value, Font Color, Cell Color or Icon
  11. A Solution To – AutoFilter Does Not Work After Changing Data
  12. Copy and Paste only Filtered Data in Excel
    1. Copy and Paste Filtered Data Including Header Row
    2. Copy and Paste Filtered Data Excluding Header Row
  13. Removing Filter From Headers in Excel
Sample Data - Filter Feature in Excel

What is the Purpose of Filter Feature in Excel?

The Filter Feature (also known as AutoFilter) is a powerful tool provided by Excel that narrows down the excel data or data in excel tables to show only those data that you want to see by temporarily hiding all other data. In our sample data, for example, we can use this feature to condense the data such that it only shows the programs taken up by the ‘Female‘ applicants.

In a similar way, you can filter by dates, or values or by any other such criteria.

The filters are always added to the headers of the data set. Therefore, it is important that your excel data must contain a header row, with logical headings. In our example, row 3 is the header row with headings describing the column data.

Header Row in Data Set

Once your dataset has proper headers, you are now good to insert the AutoFilter on these headers. To add AutoFilter on the header row, click on any of the cells inside the excel data set (like C7) and use any of the below-mentioned ways:

  • Go to ‘Home‘ tab > ‘Editing‘ Group > ‘Sort & Filter‘ Option > ‘Filter‘ button.
Filter Option under Home Tab
  • Go to ‘Data‘ tab > ‘Sort & Filter‘ group > ‘Filter‘ Button.
Filter Option under Data Tab
  • Keyboard Shortcut Method : Ctrl + Shift + L

As soon as you use any of the above methods, the excel would automatically detect the header row inside the table or data set and insert filter buttons on each of the header cells. These are the downward-facing arrows, like the way shown below:

Filter on Header Row

Simple Ways to Filter Your Data Set in Excel

Once the filter option added to the headers, you are good to start filtering your data set.

With this feature, you can filter your data by a single column or by multiple columns.

Applying Filter on Single Column

To apply the filter on a single column, simply click on the filter button (downward-facing arrow) of the respective column. (Let us firstly apply the filter on the column ‘Program Name’). As a result, you would notice that all the checkboxes are checked by default.

Filter Drop Down Initial View

Uncheck the checkbox that says ‘Select All‘. This would remove the check boxes from all the values.

Now, start ticking the values that you wish to view and click on ‘OK’, like the way demonstrated in the below image.

Filter by One Column Demonstration

Consequently, the excel would view or show only the selected values in the column, rest all are hidden. Don’t worry excel has not deleted them, they are still there in the backend.

Applying Filter on Multiple Columns

In a similar way, you can apply the filter on other columns in the Excel Data Table. There is no limitation on how many columns to which you can apply the filter.

Let us now apply another filter on the column having header – ‘Gender‘.

Filter by Multiple Columns

As a result, the excel would now only display the data set rows for selected ‘Program’ and for ‘Female’ candidates. All others are temporarily hidden (not removed).

Filter Multiple Columns Result

Some Useful Points and Tips

Once a filter is applied on the header row-

  • The Downward-facing arrow on the filtered column changes its icon which denotes that there is a filter applied to this column.
  • When you take your mouse cursor over the filter button, it shows the filter values.
Hovering Mouse Cursor on Filter Button
  • To increase or decrease the width of the filter window, take your mouse cursor on the bottom-right corner of the filter window. Once the mouse cursor changes to a two-side facing arrow, click and drag right (to increase) or left (to decrease). See the below demonstration for more clarity.
Increase Decrease Width of Filter Window

Filter Data Using Filter Search Box in Excel

In the earlier section, we learned about how to filter your data set by selecting the checkboxes in the Filter window. There is yet another way to filter out a specific text or value or numbers or dates/time in Excel which is by using the ‘Filter’ search box. The Filter search box is placed just above the list of values in the Filter window.

To filter your data set using the ‘Filter’ search box, simply click on the ‘Filter’ drop-down icon on the header and type the search value in the search box. As a result, the excel would narrow down the list to show only the specified values. Finally, click on the ‘OK’ button to apply the filter.

To illustrate with an example, let us filter out the ‘Program’ column with the Bachelor’s degree.

Filter Using Search Box

Not sure about the exact text to search, then use wildcard characters in the search box for a non-exact filter search in Excel. If you are unaware of what are wildcard characters in Excel and its usage, then please click here.

Clearing Filter on Columns in Excel

When you want to clear filter from selected or all the header columns in Excel, you can use any of the below-mentioned ways:

  • Click on the ‘Filter‘ icon on the header of the column header, and click on the option that says – Clear Filter from <Column Header Name>
Clear Filter from Column Header
  • Another way is to click on the ‘Filter‘ icon of the header, and check the checkbox – ‘Select All‘.
Clear Filter from Column Header #2

When you clear the filter from the column ‘Gender’, the data set would now only have a filter on the column header ‘Program’. It has only cleared filter from the row ‘Gender’ and has not touched any other filters.

To clear multiple filter from all the headers cells, use any of the following way:

  • Click on any of the cells in the dataset and navigate to the path – Data tab > Sort & Filter Group and there click on the option that says – Clear.
Clear Filter From All Headers #1
  • Or you can even use this – Home Tab > Editing Group. Click the option Sort & Filter > Clear.
Clear Filter From All Headers #2

It is important to note that the above method only clears the filter from the header cell. It does not remove the filter icon from the header row. To learn how to remove the filter in Excel, wait until the end of this blog.

How to Filter Values or Text in Excel?

When you are working with text filters, there are many other text filter options available in addition to what we learned above. Below is the list of the same.

  • You can filter the values or text which exactly Equals or which Does Not Equal to some text.
  • Additionally, you can even filter for a non-exact match by using the Contains and Does Not Contain a text
  • Or, you can even filter the values or text that starts or Begins With or Ends With a particular text.

These advanced filter options are available under the ‘Text Filter’ section of the Filter Window as shown in the image below:

Text Filter Options #1

Let us understand this with the help of a small example: Let us, for example, get the program that contains the word ‘Business’ in it. To achieve it,

Click on the ‘Filter‘ icon on the column header – ‘Program’, and take your mouse cursor to the option – Text Filters.

In the list of options that come up, select the option that says – ‘Contains‘. As a result, the ‘Custom AutoFilter‘ dialog box would appear on your screen. In the input box besides the word ‘Contains’, write the text that you want to filter (in our case ‘Business’) and press OK.

Custom AutoFilter dialog box #1

As soon as you press OK, excel would show all the values or text that contains the word ‘Business’ and will hide all other data rows.

Note that, just like Filter search box, this ‘Custom AutoFilter’ dialog box also accepts wildcard character search.

Filter Values based on Two Criteria

The Custom AutoFilter dialog box also allows us to filter out the data rows based on two criteria. Use the And and Or operator radio buttons based on how you wish to filter.

For example: Let us filter out all the programs for Commerce and Science. In this case, as we want both the values, we shall use Or operator, like this-

Custom AutoFilter - Two Criteria Filtering

This would filter out those values which either contain the word ‘Commerceor contain the word ‘Science‘.

How to Filter Numbers in Excel?

Similar to the text filter learned above, there are many additional filter options available carry Number Filters in Excel. Below is the list of the same:

  • You can filter the exact number or amount by using Equals and Does Not Equal option under the ‘Number Filter’.
  • Similarly, the Number Filter – Greater Than and Less Than allows us to get all values that are more or less than a specific value.
  • Greater Than or Equal To and Less Than or Equal To works in a similar way.
  • Between Number Filter allows you to filter out the values lies between two values (lower and upper values both inclusive)
  • Other options are – Top 10, Above Average, Below Average
Number Filter Option #1

The filter option Top 10 does not exactly only mean Top 10 values. You can change it to any other value like Top 15, or Top 27 Values, and even Bottom 5 values and so on.

Top 10 AutoFilter Dialog Box

Filter Feature in Excel

How to Filter Dates in Excel?

Unlike the Text and Number Filter, the Dates Filters option allows us with more advanced filtering options. The below image in itself is self-explanatory.

Date Filter #1

In a nutshell, below options are available for filtering dates in Excel –

  • You can filter the dates which fall in the current month/week/quarter/year and even for previous and upcoming (i.e. next) month/week/quarter/year.
  • Additionally, you can filter out by an exact date, or date that falls before or after a particular date, or between two dates.
  • Excel provides with an option to filter all the dates in a particular month or quarter (regardless of the year in which it falls)
  • You can create a custom date filter using the ‘Custom AutoFilter’ dialog box to which you are already aware of using.

Important to notice – Excel by default groups all the dates by year, months, and then the days. You can expand or collapse the groups (year, months, and days) to filter the dates and check/uncheck it to filter accordingly.

Date Filter #2

In the above image, you can see that all the dates are grouped by years first (2020 and 2019). Within the years there are months and then the days in the month. If you clear the checkbox for 2020, then the excel would only show the dates that lie in 2019.

How to Filter By Color in Excel?

When the data set contains any text with color or any cell with a background color, you can use the ‘Filter by Color‘ option in the ‘Filter’ Window to filter the dataset by a specific text or cell background color.

Let me explain this with a small example. I am changing the background color of different cells to yellow, orange, and green. Also, I have the font color in a few of the cells as ‘Red’.

To filter the values based on color, simply click on the ‘Filter’ drop-down arrow button on the header cell and take your mouse cursor over the option that says – ‘Filter by Color’.

As a result, you would see that excel lists all the cell and font color. You can choose the color that you want to filter with.

Filter by Color

Let us, for example, filter the programs by Red font color. The result of the filter would be as below.

Filter By Font Color - Illustration

Quick Way to Filter By A Specific Cell’s Value, Font Color, Cell Color or Icon

Instead of using the ‘Filter’ drop-down icon to filter, you can even filter the dataset based on a specific cell’s value, icon, or font and cell color. To do so, follow the undermentioned steps:

  • Right-click on the cell that contains the color by which you want to filter. Let us, in this case, filter by yellow color. Therefore, I have right-clicked on C4 (as it has a yellow cell color).
  • Take your mouse cursor to the option that says – ‘Filter‘, and click on the option – ‘Filter by Selected Cell’s Color‘.

As a result, excel would filter the dataset based on the cell color – Yellow, as demonstrated in the below image:

Filter By Selected Cell's Color - Illustration

A Solution To AutoFilter Does Not Work After Changing Data

When you make any changes in the filtered data, you would notice that excel does not refresh the filter automatically. Yes, that is absolutely true. You need to reapply the filter in order to refresh the data and apply the filter on the changed data. There are a couple of ways to do the same, as listed below:

  • Using Filter Window – After making changes in the filtered data, simply click on the ‘Filter’ drop-down arrow on the header cell and click ‘OK’ in there. However, there is are exceptions to this method. This would not work when you apply ‘filter by color’ or ‘Number Filter/Text Filter/Date Filter’. This technique only applies when you use the search box to filter out the data.
Reapply Filter #1
  • Using Reapply Option – After making changes in the filtered data, simply navigate to the Data tab > Sort & Filter Group > Reapply Option. The keyboard shortcut key for the same is Ctrl + Alt + L.
Reapply Filter #2

This option is also available in the Home Tab > Editing Group > Sort & Filter Option > Reapply.

Reapply Filter #3

Copy and Paste only Filtered Data in Excel

There are two possibilities to copy and paste only filtered data in Excel.

Copy and Paste Filtered Data Including Header Row

Simply, click on any of the cell in the filtered area, and press Ctrl + A to select the entire excel table or data set. As a result, you would notice that excel selects the entire table including both data rows as well as the header row. Now, press Ctrl + C to copy the selection and use Ctrl + V at the destination location to paste the filtered data cells.

Copy and Paste Filtered Data Excluding Header Row

To copy and paste only filtered data (without header row), select the top-left cell of the data (which in our case it is C4). Press keyboard keys Ctrl + Shift + Down_Arrow and then press Ctrl + Shift + Right_Arrow (instead you can even use Ctrl + Shift + End). Any of these ways would select the entire data set (excluding headers). Now, use Ctrl + C to copy the selection and then Ctrl + V to paste the filtered data set at the destination cell.

Usually, when you copy the filtered dataset using the above methods, excel does not include the hidden rows in the copy area. The hidden rows are excluded and it only takes the visible rows while copying. However, sometimes when your data is huge, it may not work in expected behavior. In those cases, to play safe, you can use the GoTo (F5) > Special > Visible Cells Only feature to select only the visible rows. The keyboard shortcut for the same is Alt + ; (semi-colon).

Finally, let us now learn how to remove filters from the excel header row. There are multiple ways using which you can remove filters, as listed below-

  • The easiest way is to use the keyboard shortcut – Ctrl + Shift + L.
  • Another way is to use ribbon path – Data Tab > Sort & Filter Group > Filter option OR Home Tab > Editing Group > Sort & Filter Option > Filter Option.

RELATED POSTS

  • How to Make A Table In Excel – A Hidden Functionality

  • How to Sort a Table or Data in Excel

  • Text and Number Filter in Pivot Table in Excel

  • Group and Ungroup Rows in Excel

  • FILTER Function in Excel – Dynamic Filtered Range

  • Applications – FILTER Function in Excel

Содержание

  1. Функция ФИЛЬТР
  2. Примеры
  3. Дополнительные сведения
  4. FILTER function
  5. Examples
  6. Need more help?
  7. FILTER Function
  8. Related functions
  9. Summary
  10. Purpose
  11. Return value
  12. Arguments
  13. Syntax
  14. Usage notes
  15. Basic example
  16. Filter for Red group
  17. No matching data
  18. Values that contain text
  19. Filter by date
  20. Multiple criteria
  21. Complex criteria
  22. Filter data in a range or table
  23. Filter a range of data
  24. Filter data in a table
  25. Related Topics
  26. Filter data in a table
  27. Filter a range of data
  28. Filtering options for tables or ranges
  29. To clear a filter from a column
  30. To remove all the filters from a table or range
  31. Need more help?

Функция ФИЛЬТР

Функция ФИЛЬТР позволяет выполнять фильтрацию диапазона данных на основе условий, которые вы определяете.

В следующем примере мы использовали формулу =FILTER(A5:D20,C5:C20=H2,»») для возврата всех записей Для Apple, как указано в ячейке H2, и если яблок нет, возвращается пустая строка («»).

Функция ФИЛЬТР фильтрует массив с учетом массива логических значений (ИСТИНА/ЛОЖЬ).

Массив или диапазон для фильтрации

Массив логических переменных с аналогичной высотой или шириной, что и массив.

Значение, возвращаемое, если все значения во включенном массиве пустые (фильтр не возвращает ничего)

Массив может рассматриваться как ряд значений, столбец со значениями или комбинация строк и столбцов значений. В приведенном выше примере массив для нашей формулы ФИЛЬТР представляет собой диапазон A5:D20.

Функция ФИЛЬТР возвращает массив, который будет переноситься на другие ячейки, если является конечным результатом формулы. Это означает, что Excel будет динамически создавать соответствующий по размеру диапазон массива при нажатии клавиши ВВОД. Если ваши вспомогательные данные хранятся в таблице Excel, тогда массив будет автоматически изменять размер при добавлении и удалении данных из диапазона массива, если вы используете структурированные ссылки. Дополнительные сведения см. в статье о переносе массива.

Если набор данных потенциально может возвращать пустое значение, используйте третий аргумент ( [если_пусто]). В противном случае возникнет ошибка #ВЫЧИС! , так как Excel в настоящее время не поддерживает пустые массивы.

Если какое-либо значение аргумента include является ошибкой (#N/A, #VALUE и т. д.) или не может быть преобразовано в логическое значение, функция FILTER вернет ошибку.

Приложение Excel ограничило поддержку динамических массивов в операциях между книгами, и этот сценарий поддерживается, только если открыты обе книги. Если закрыть исходную книгу, все связанные формулы динамического массива вернут ошибку #ССЫЛКА! после обновления.

Примеры

Функция ФИЛЬТР, используемая для возврата нескольких условий

В данном случае мы используем оператор умножения (*) для возврата всех значений в диапазоне массива (A5:D20), содержащих текст «Яблоко» И находящихся в восточном регионе: =ФИЛЬТР(A5:D20;(C5:C20=H1)*(A5:A20=H2);»»).

Функция ФИЛЬТР, используемая для возврата нескольких условий и сортировки

В данном случае мы используем предыдущую функцию ФИЛЬТР с функцией СОРТ для возврата всех значений в диапазоне массива (A5:D20), содержащих текст «Яблоко» И находящихся в восточном регионе, а затем для сортировки единиц в порядке убывания: =СОРТ(ФИЛЬТР(A5:D20;(C5:C20=H1)*(A5:A20=H2);»»);4;-1)

В данном случае мы используем функцию ФИЛЬТР с оператором сложения (+) для возврата всех значений в диапазоне массива (A5:D20), содержащих текст «Яблоко» ИЛИ находящихся в восточном регионе, а затем для сортировки единиц в порядке убывания: =СОРТ(ФИЛЬТР(A5:D20;(C5:C20=H1)+(A5:A20=H2);»»),4;-1).

Обратите внимание на то, что ни одна из функций не требует абсолютных ссылок, так как они находятся только в одной ячейке, а их результаты переносятся в соседние ячейки.

Дополнительные сведения

Вы всегда можете задать вопрос специалисту Excel Tech Community или попросить помощи в сообществе Answers community.

Источник

FILTER function

The FILTER function allows you to filter a range of data based on criteria you define.

In the following example we used the formula =FILTER(A5:D20,C5:C20=H2,»») to return all records for Apple, as selected in cell H2, and if there are no apples, return an empty string («»).

The FILTER function filters an array based on a Boolean (True/False) array.

The array, or range to filter

A Boolean array whose height or width is the same as the array

The value to return if all values in the included array are empty (filter returns nothing)

An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. In the example above, the source array for our FILTER formula is range A5:D20.

The FILTER function will return an array, which will spill if it’s the final result of a formula. This means that Excel will dynamically create the appropriate sized array range when you press ENTER. If your supporting data is in an Excel table, then the array will automatically resize as you add or remove data from your array range if you’re using structured references. For more details, see this article on spilled array behavior.

If your dataset has the potential of returning an empty value, then use the 3rd argument ( [if_empty]). Otherwise, a #CALC! error will result, as Excel does not currently support empty arrays.

If any value of the include argument is an error (#N/A, #VALUE, etc.) or cannot be converted to a Boolean, the FILTER function will return an error.

Excel has limited support for dynamic arrays between workbooks, and this scenario is only supported when both workbooks are open. If you close the source workbook, any linked dynamic array formulas will return a #REF! error when they are refreshed.

Examples

FILTER used to return multiple criteria

In this case, we’re using the multiplication operator (*) to return all values in our array range (A5:D20) that have Apples AND are in the East region: =FILTER(A5:D20,(C5:C20=H1)*(A5:A20=H2),»»).

FILTER used to return multiple criteria and sort

In this case, we’re using the previous FILTER function with the SORT function to return all values in our array range (A5:D20) that have Apples AND are in the East region, and then sort Units in descending order: =SORT(FILTER(A5:D20,(C5:C20=H1)*(A5:A20=H2),»»),4,-1)

In this case, we’re using the FILTER function with the addition operator (+) to return all values in our array range (A5:D20) that have Apples OR are in the East region, and then sort Units in descending order: =SORT(FILTER(A5:D20,(C5:C20=H1)+(A5:A20=H2),»»),4,-1).

Notice that none of the functions require absolute references, since they only exist in one cell, and spill their results to neighboring cells.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

FILTER Function

Summary

The Excel FILTER function filters a range of data based on supplied criteria, and extracts matching records.

Purpose

Return value

Arguments

  • array — Range or array to filter.
  • include — Boolean array, supplied as criteria.
  • if_empty — [optional] Value to return when no results are returned.

Syntax

Usage notes

The FILTER function «filters» a range of data based on supplied criteria. The result is an array of matching values from the original range. In plain language, the FILTER function will extract matching records from a set of data by applying one or more logical tests. Logical tests are supplied as the include argument and can include many kinds of formula criteria. For example, FILTER can match data in a certain year or month, data that contains specific text, or values greater than a certain threshold.

The FILTER function takes three arguments: array, include, and if_empty. Array is the range or array to filter. The include argument should consist of one or more logical tests. These tests should return TRUE or FALSE based on the evaluation of values from array. The last argument, if_empty, is the result to return when FILTER finds no matching values. Typically this is a message like «No records found», but other values can be returned as well. Supply an empty string («») to display nothing.

The results from FILTER are dynamic. When values in the source data change, or the source data array is resized, the results from FILTER will update automatically. Results from FILTER will «spill» onto the worksheet into multiple cells.

Basic example

To extract values in A1:A10 that are greater than 100:

To extract rows in A1:C5 where the value in A1:A5 is greater than 100:

Notice the only difference in the above formulas is that the second formula provides a multi-column range for array. The logical test used for the include argument is the same.

Note: FILTER will return a #CALC! error if no matching data is found

Filter for Red group

In the example shown above, the formula in F5 is:

Since the value in H2 is «red», the FILTER function extracts data from array where the Group column contains «red». All matching records are returned to the worksheet starting from cell F5, where the formula exists.

Values can be hardcoded as well. The formula below has the same result as above with «red» hardcoded into the criteria:

No matching data

The value for is_empty is returned when FILTER does not find matching results. If a value for if_empty is not provided, FILTER will return a #CALC! error if no matching data is found:

Often, is_empty is configured to provide a text message to the user:

To display nothing when no matching data is found, supply an empty string («») for if_empty:

Values that contain text

To extract data based on a logical test for values that contain specific text, you can use a formula like this:

In this formula, the SEARCH function is used to look for «txt» in rng2, which would typically be a column in rng1. The ISNUMBER function is used to convert the result from SEARCH into TRUE or FALSE. Read a full explanation here.

Filter by date

FILTER can be used with dates by constructing logical tests appropriate for Excel dates. For example, to extract records from rng1 where the date in rng2 is in July you can use a generic formula like this:

This formula relies on the MONTH function to compare the month of dates in rng2 to 7. See full explanation here.

Multiple criteria

At first glance, it’s not obvious how to apply multiple criteria with the FILTER function. Unlike older functions like COUNTIFS and SUMIFS, which provide multiple arguments for entering multiple conditions, the FILTER function only provides a single argument, include, to target data. The trick is to create logical expressions that use Boolean algebra to target the data of interest and supply these expressions as the include argument. For example, to extract only data where one value is «A» and another is greater than 80, you can use a formula like this:

The math operation of addition (*) joins the two conditions with AND logic: both conditions must be TRUE in order for FILTER to retrieve the data. See a detailed explanation here.

Complex criteria

To filter and extract data based on multiple complex criteria, you can use the FILTER function with a chain of expressions that use boolean logic. For example, the generic formula below filters based on three separate conditions: account begins with «x» AND region is «east», and month is NOT April.

See this page for a full explanation. Building criteria with logical expressions is an elegant and flexible approach that can be extended to handle many complex scenarios. See below for more examples.

Источник

Filter data in a range or table

Use AutoFilter or built-in comparison operators like «greater than» and “top 10” in Excel to show the data you want and hide the rest. Once you filter data in a range of cells or table, you can either reapply a filter to get up-to-date results, or clear a filter to redisplay all of the data.

Use filters to temporarily hide some of the data in a table, so you can focus on the data you want to see.

Filter a range of data

Select any cell within the range.

Select Data > Filter.

Select the column header arrow .

Select Text Filters or Number Filters, and then select a comparison, like Between.

Enter the filter criteria and select OK.

Filter data in a table

When you put your data in a table, filter controls are automatically added to the table headers.

Select the column header arrow for the column you want to filter.

Uncheck (Select All) and select the boxes you want to show.

The column header arrow changes to a Filter icon. Select this icon to change or clear the filter.

Filtered data displays only the rows that meet criteria that you specify and hides rows that you do not want displayed. After you filter data, you can copy, find, edit, format, chart, and print the subset of filtered data without rearranging or moving it.

You can also filter by more than one column. Filters are additive, which means that each additional filter is based on the current filter and further reduces the subset of data.

Note: When you use the Find dialog box to search filtered data, only the data that is displayed is searched; data that is not displayed is not searched. To search all the data, clear all filters.

The two types of filters

Using AutoFilter, you can create two types of filters: by a list value or by criteria. Each of these filter types is mutually exclusive for each range of cells or column table. For example, you can filter by a list of numbers, or a criteria, but not by both; you can filter by icon or by a custom filter, but not by both.

Reapplying a filter

To determine if a filter is applied, note the icon in the column heading:

A drop-down arrow means that filtering is enabled but not applied.

When you hover over the heading of a column with filtering enabled but not applied, a screen tip displays «(Showing All)».

A Filter button means that a filter is applied.

When you hover over the heading of a filtered column, a screen tip displays the filter applied to that column, such as «Equals a red cell color» or «Larger than 150».

When you reapply a filter, different results appear for the following reasons:

Data has been added, modified, or deleted to the range of cells or table column.

Values returned by a formula have changed and the worksheet has been recalculated.

Do not mix data types

For best results, do not mix data types, such as text and number, or number and date in the same column, because only one type of filter command is available for each column. If there is a mix of data types, the command that is displayed is the data type that occurs the most. For example, if the column contains three values stored as number and four as text, the Text Filters command is displayed .

Filter data in a table

When you put your data in a table, filtering controls are added to the table headers automatically.

Select the data you want to filter. On the Home tab, click Format as Table, and then pick Format as Table.

In the Create Table dialog box, you can choose whether your table has headers.

Select My table has headers to turn the top row of your data into table headers. The data in this row won’t be filtered.

Don’t select the check box if you want Excel for the web to add placeholder headers (that you can rename) above your table data.

To apply a filter, click the arrow in the column header, and pick a filter option.

Filter a range of data

If you don’t want to format your data as a table, you can also apply filters to a range of data.

Select the data you want to filter. For best results, the columns should have headings.

On the Data tab, choose Filter.

Filtering options for tables or ranges

You can either apply a general Filter option or a custom filter specific to the data type. For example, when filtering numbers, you’ll see Number Filters, for dates you’ll see Date Filters, and for text you’ll see Text Filters. The general filter option lets you select the data you want to see from a list of existing data like this:

Number Filters lets you apply a custom filter:

In this example, if you want to see the regions that had sales below $6,000 in March, you can apply a custom filter:

Click the filter arrow next to March > Number Filters > Less Than and enter 6000.

Excel for the web applies the filter and shows only the regions with sales below $6000.

You can apply custom Date Filters and Text Filters in a similar manner.

To clear a filter from a column

Click the Filter button next to the column heading, and then click Clear Filter from .

To remove all the filters from a table or range

Select any cell inside your table or range and, on the Data tab, click the Filter button.

This will remove the filters from all the columns in your table or range and show all your data.

Click a cell in the range or table that you want to filter.

On the Data tab, click Filter.

Click the arrow in the column that contains the content that you want to filter.

Under Filter, click Choose One, and then enter your filter criteria.

You can apply filters to only one range of cells on a sheet at a time.

When you apply a filter to a column, the only filters available for other columns are the values visible in the currently filtered range.

Only the first 10,000 unique entries in a list appear in the filter window.

Click a cell in the range or table that you want to filter.

On the Data tab, click Filter.

Click the arrow in the column that contains the content that you want to filter.

Under Filter, click Choose One, and then enter your filter criteria.

In the box next to the pop-up menu, enter the number that you want to use.

Depending on your choice, you may be offered additional criteria to select:

You can apply filters to only one range of cells on a sheet at a time.

When you apply a filter to a column, the only filters available for other columns are the values visible in the currently filtered range.

Only the first 10,000 unique entries in a list appear in the filter window.

Instead of filtering, you can use conditional formatting to make the top or bottom numbers stand out clearly in your data.

You can quickly filter data based on visual criteria, such as font color, cell color, or icon sets. And you can filter whether you have formatted cells, applied cell styles, or used conditional formatting.

In a range of cells or a table column, click a cell that contains the cell color, font color, or icon that you want to filter by.

On the Data tab, click Filter .

Click the arrow in the column that contains the content that you want to filter.

Under Filter, in the By color pop-up menu, select Cell Color, Font Color, or Cell Icon, and then click a color.

This option is available only if the column that you want to filter contains a blank cell.

Click a cell in the range or table that you want to filter.

On the Data toolbar, click Filter.

Click the arrow in the column that contains the content that you want to filter.

In the (Select All) area, scroll down and select the (Blanks) check box.

You can apply filters to only one range of cells on a sheet at a time.

When you apply a filter to a column, the only filters available for other columns are the values visible in the currently filtered range.

Only the first 10,000 unique entries in a list appear in the filter window.

Click a cell in the range or table that you want to filter.

On the Data tab, click Filter .

Click the arrow in the column that contains the content that you want to filter.

Under Filter, click Choose One, and then in the pop-up menu, do one of the following:

To filter the range for

Rows that contain specific text

Contains or Equals.

Rows that do not contain specific text

Does Not Contain or Does Not Equal.

In the box next to the pop-up menu, enter the text that you want to use.

Depending on your choice, you may be offered additional criteria to select:

Filter the table column or selection so that both criteria must be true

Filter the table column or selection so that either or both criteria can be true

Click a cell in the range or table that you want to filter.

On the Data toolbar, click Filter .

Click the arrow in the column that contains the content that you want to filter.

Under Filter, click Choose One, and then in the pop-up menu, do one of the following:

The beginning of a line of text

The end of a line of text

Cells that contain text but do not begin with letters

Does Not Begin With.

Cells that contain text but do not end with letters

Does Not End With.

In the box next to the pop-up menu, enter the text that you want to use.

Depending on your choice, you may be offered additional criteria to select:

Filter the table column or selection so that both criteria must be true

Filter the table column or selection so that either or both criteria can be true

Wildcard characters can be used to help you build criteria.

Click a cell in the range or table that you want to filter.

On the Data toolbar, click Filter.

Click the arrow in the column that contains the content that you want to filter.

Under Filter, click Choose One, and select any option.

In the text box, type your criteria and include a wildcard character.

For example, if you wanted your filter to catch both the word «seat» and «seam», type sea?.

Do one of the following:

Any single character

For example, sm?th finds «smith» and «smyth»

Any number of characters

For example, *east finds «Northeast» and «Southeast»

A question mark or an asterisk

For example, there

Do any of the following:

Remove specific filter criteria for a filter

Click the arrow in a column that includes a filter, and then click Clear Filter.

Remove all filters that are applied to a range or table

Select the columns of the range or table that have filters applied, and then on the Data tab, click Filter.

Remove filter arrows from or reapply filter arrows to a range or table

Select the columns of the range or table that have filters applied, and then on the Data tab, click Filter.

When you filter data, only the data that meets your criteria appears. The data that doesn’t meet that criteria is hidden. After you filter data, you can copy, find, edit, format, chart, and print the subset of filtered data.

Table with Top 4 Items filter applied

Filters are additive. This means that each additional filter is based on the current filter and further reduces the subset of data. You can make complex filters by filtering on more than one value, more than one format, or more than one criteria. For example, you can filter on all numbers greater than 5 that are also below average. But some filters (top and bottom ten, above and below average) are based on the original range of cells. For example, when you filter the top ten values, you’ll see the top ten values of the whole list, not the top ten values of the subset of the last filter.

In Excel, you can create three kinds of filters: by values, by a format, or by criteria. But each of these filter types is mutually exclusive. For example, you can filter by cell color or by a list of numbers, but not by both. You can filter by icon or by a custom filter, but not by both.

Filters hide extraneous data. In this manner, you can concentrate on just what you want to see. In contrast, when you sort data, the data is rearranged into some order. For more information about sorting, see Sort a list of data.

When you filter, consider the following guidelines:

Only the first 10,000 unique entries in a list appear in the filter window.

You can filter by more than one column. When you apply a filter to a column, the only filters available for other columns are the values visible in the currently filtered range.

You can apply filters to only one range of cells on a sheet at a time.

Note: When you use Find to search filtered data, only the data that is displayed is searched; data that is not displayed is not searched. To search all the data, clear all filters.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

Понравилась статья? Поделить с друзьями:
  • What are excel spreadsheets used for
  • What are excel sheets used for
  • What are excel services
  • What are excel macros for
  • What are excel formulas and functions