Solved

Excel  - Filter to all Sheets

Posted on 2011-02-22
2
224 Views
Last Modified: 2012-05-11
Hi,

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.

Thanks
0
Comment
Question by:tahirih
2 Comments
 
LVL 24

Accepted Solution

by:
broomee9 earned 500 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
        wksht.Rows("1:1").AutoFilter
    Next
    
End Sub

Open in new window

Book1.xls
0
 

Author Closing Comment

by:tahirih
ID: 34953642
Thank you
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now