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

by Allen Wyatt
(last updated May 28, 2016)

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.

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

The Line that Won't Go Away

Have you ever had a line appear on your document that you can't seem to get rid of? It could be due to a built-in ...

Discover More

Stubborn Thumbnails

One of the tools that Word provides is to display thumbnails of your document pages at the left side of the program window ...

Discover More

Keeping Callouts Positioned

Using graphics to add callouts to your graphics is a common occurrence in Word. Here's how to stop all those graphics from ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

MORE EXCELTIPS (RIBBON)

Getting a Count of Unique Names

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

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 to ...

Discover More

Using AutoFiltering

Excel's AutoFilter tool is a great way to make a long list of items much more manageable. This tip explains how to set up an ...

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 for this tip:

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

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.

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.

Links and Sharing
Share