Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Filter all worksheets in workbook

I have a workbook with 100 sheets in it. I have a macro that goes
through each sheet and call
a procedure that filters a specific column. The macro works fine, but I
like to know if any one knows a faster and more efficent way to do the
same macro. Maybe without using a Select method. Here is a sample of
my macro:

Sheets("1").Select
Selection.AutoFilter Field:=3, Criteria1:="=1", Operator:=xlAnd
Call filtercopy
Selection.AutoFilter Field:=3
Sheets("2").Select
Selection.AutoFilter Field:=3, Criteria1:="=1", Operator:=xlAnd
Call filtercopy
Selection.AutoFilter Field:=3
Sheets("3").Select
Selection.AutoFilter Field:=3, Criteria1:="=1", Operator:=xlAnd
Call filtercopy

And the Call Filtercopy procedure is as follows:


Selection.copy
Windows("filterresults.xls").activate
Cells(Rows.Count, "a").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Windows("results.xls").activate


Thank you for any help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine worksheets in multiple workbook in one workbook with a macro Sam Commar Excel Discussion (Misc queries) 2 April 2nd 09 01:09 PM
HELP: Use the autofilter result on one workbook to filter the next list on another workbook Kathy Houtami Excel Worksheet Functions 6 September 11th 07 05:29 AM
use "Filter" to filter one range in many worksheets at a time arrowofsun Excel Worksheet Functions 0 July 31st 07 12:56 PM
How do I import and filter worksheets into a template? fab Excel Discussion (Misc queries) 1 October 15th 06 08:06 PM
filter 15 worksheets so i can print all on one page kristie626 Excel Worksheet Functions 1 August 16th 05 10:22 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"