Excel  - Filter to all Sheets

Posted on 2011-02-22
Medium Priority
Last Modified: 2012-05-11

In an open workbook with multiple sheets, is there a way to select all sheets, and add a filter (Data - Fileter) at one time?

I am only able to one sheet at a time.

Question by:tahirih
LVL 24

Accepted Solution

Tracy earned 2000 total points
ID: 34953554
No, the option is greyed out when you select multiple sheets.  You can do it through code though, with one click.

The below will add the autofilter to every sheet in the workbook for row 1.  If the autofilter is already applied it removes it.  So it's like a toggle on and off.
Sub ToggleAutoFilter()

    For Each wksht In ThisWorkbook.Worksheets
End Sub

Open in new window


Author Closing Comment

ID: 34953642
Thank you

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article describes a serious pitfall that can happen when deleting shapes using VBA.
I tried to use the SharePoint app to Import a Spreadsheet and import an Excel sheet into a Team site made in SharePoint 2016. But that just resulted in getting an error message 'Unknown Error'...
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question