Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Toggling AutoFilter.

Toggling AutoFilter

Written by Allen Wyatt (last updated April 20, 2021)
This tip applies to Excel 2007, 2010, 2013, and 2016


8

One of the handy features of Excel is AutoFilter. It allows you to quickly filter any list by the contents of a particular column. You can add, to the Quick Access Toolbar, an AutoFilter tool. This tool uses an image of a funnel and an equal sign.

The tool is a bit deceptive, however; it is not the same as the Filter option on the Data tab of the ribbon. The ribbon option is a toggle condition. If you have a cell selected in a list and you click the ribbon tool, then the AutoFilter controls appear at the top of each column in the list—there are no other changes to the list. If you use the AutoFilter tool (the one you can add to the Quick Access Toolbar), not only do the controls appear, but Excel filters the list based on the cell you had selected when you used the tool.

Another difference between the two is that the Filter ribbon tool functions like a toggle—choose it once, and the AutoFilter is applied; choose it again and it is removed. The AutoFilter tool that you can add to the QAT doesn't do that; it only applies the AutoFilter.

What if you want a QAT option that is a real toggle, just like the tool on the ribbon? There are two approaches you can use to solve this problem. The first involves the use of a simple macro:

Sub ToggleAutoFilter()
    On Error GoTo errMessage
    Selection.AutoFilter
    Exit Sub

errMessage:
    MsgBox "Select a cell in the range to be filtered.", vbOKOnly
End Sub

All you need to do is assign the macro to the Quick Access Toolbar or to a shortcut key and you can turn AutoFilter on and off, just as if you used the tool from the ribbon.

The second option may be even simpler. Just follow these steps:

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010, 2013, or 2016, display the File tab of the ribbon and then click Options.)
  2. At the left of the dialog box, click Customize (Excel 2007) or Quick Access Toolbar (Excel 2010 and later versions).
  3. Using the Choose Commands From drop-down list, choose Data Tab.
  4. In the list of commands, select Filter (or Sort & Filter if you're using Excel 2016).
  5. Click the Add button. The icon for the command appears at the right of the dialog box.
  6. Click OK.

It is interesting that the icon for the Filter command (step 4) looks exactly the same as the icon for the AutoFilter command. Regardless, they are not the same, as already discussed. These steps add the tool to the Quick Access Toolbar, and it works exactly the same as the Filter tool on the Data tab of the ribbon.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6288) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Toggling AutoFilter.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Controlling the Display of Toolbars

The various toolbars available in Excel are indispensable when it comes to easily accomplishing tasks. Here is a concise ...

Discover More

Expanding a Custom Dictionary

Does Word tell you that your custom dictionary is full? It might not actually be full, but even if it is you can add ...

Discover More

Placing Formula Results in a Comment

Excel won't allow you to directly or automatically insert the results of a formula into a cell's comment. You can, ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Setting Up Custom AutoFiltering

The filtering capabilities of Excel are very helpful when you are working with large sets of data. You can create a ...

Discover More

Getting a Count of Unique Names

When you have a column full of names, you may want to get a count of how many of those names are unique. You can make ...

Discover More

Dealing with Text Length Limits and AutoFilter Drop-Down Lists

Excel has some built-in limits on what you can do with the program. When you run into those limits, it can be frustrating ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three less than 3?

2021-04-21 09:17:30

Mike

@Philip

You don't mention which Windows version you are using, but in Excel 2010 you can find the Autofilter button by going File/Options/Quick_Access_Toolbar and then, at the top of the pop-up, 'Choose_commands_from' and select 'Commands Not In The Ribbon'. This version is not a toggle, but filters on the value selected.


2021-04-21 04:42:55

Willy Vanhaelen

@Philip
What I explained in my post works for excel 2007 and 2019. As for Office 365 for Mac, it seems there are a lot of differences compared to the regular Windpws versions.


2021-04-20 22:41:49

Philip

@Willy, not sure if it has to do with updates of versions, but that's not what happens on my Excel (MS Office 365 for Mac - but I also see it on my work Windows machine). The QAT tool I have is called "Add or remove filters" and does exactly what the ribbon tool does (toggle on or off the auto-filter buttons on the top row of my table) ... and in the toolset to customise the QAT I can't see any tool called "Autofilter".

The icon of the tool is actually just a funnel, no equal sign.

Am I missing something ? Or is the tip described here (and your description of what should be happening) specific to a version of Excel or an OS ?


2019-01-10 11:31:25

Willy Vanhaelen

@Hgrm
The AutoFilter button in the QAT is not a toggle to turn Filter on and off. I does something else: it auto filters the table using the value of the cell the pointer is on.
- When Filter is off then clicking the AutoFilter button in the QAT turns Filter on and automtically filters the table on the value the cell pointer is on.
- When Filter is already on then clicking the QAT button directly filters the table using the value the cell pointer is on.


2019-01-09 08:46:54

Higrm

Thank you for this tip. In the previous version of Excel I had used the macro option, but this way is much better. It was really bothersome that the Autofilter button didn't work as a toggle as I thought it should. The keyboard shortcut described by the other commenters works great, but you need two hands or just your right hand to press it, (or be really good at it), which for an avid mouse user as myself, is a productivity hit.


2016-05-31 04:59:08

Terence

I hadn't ever used auto filter before.
Extremely useful, now have it in my QAT.
I also have the clear filter on the QAT so I'm using alt-5 to auto filter and alt-8 to clear filter.


2016-05-29 06:02:49

Roy

I stand in the upper left cell and press Ctrl + shift + End and then l. Then I have filter for the hole sheet.


2016-05-28 10:51:04

Brian Lair

Alternative: I frequently just use Control + Shift + L to toggle AutoFilter on/off.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.