Thread: Filter Problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default Filter Problem

try:

Sub Filter2006()

Dim sh As Worksheet

With ActiveWorkbook
For Each sh In Worksheets

If sh.Name < "IS Time Q1_06" Then

Range("A1:L1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=9, Criteria1:="2006"

End If

Next sh

End With

End Sub
-----------------------------------------------------


"GregR" skrev:

I have this code where I am trying to filter each sheet in the workbook
on column "I" for 2006, except the first sheet. I am not quite there.
Need help. TIA

Sub Filter2006()
Dim sh As Worksheet

With ActiveWorkbook
For Each sh In Worksheets

If sh.Name = "IS Time Q1_06" Then

Else

Range("A1:L1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=9, Criteria1:="2006"

End If

Next sh

End With

End Sub

Greg