ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofilter across Worksheets (https://www.excelbanter.com/excel-programming/285678-autofilter-across-worksheets.html)

Talon[_2_]

Autofilter across Worksheets
 
I would like to be to able apply an autofilter across multiple
worksheets. My file contains about 20 worksheets that all require the
same autofilter. I tried recording a macro but it will only work for
the active sheet:

Sub Autofilter_no_zeros()
Selection.AutoFilter
ActiveWindow.LargeScroll ToRight:=1
Selection.AutoFilter Field:=14, Criteria1:="<0", Operator:=xlAnd
End Sub

Thanks in advance for any help.


---
Message posted from http://www.ExcelForum.com/


Debra Dalgleish

Autofilter across Worksheets
 
Tom Ogilvy posted some code for this in the following thread:


http://groups.google.com/groups?&thr...upernews.co m

Talon wrote:
I would like to be to able apply an autofilter across multiple
worksheets. My file contains about 20 worksheets that all require the
same autofilter. I tried recording a macro but it will only work for
the active sheet:

Sub Autofilter_no_zeros()
Selection.AutoFilter
ActiveWindow.LargeScroll ToRight:=1
Selection.AutoFilter Field:=14, Criteria1:="<0", Operator:=xlAnd
End Sub



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 12:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com