?
Solved

Excel  - Filter to all Sheets

Posted on 2011-02-22
2
Medium Priority
?
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
broomee9 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
        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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

770 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