Thread: Macro Problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Carl Carl is offline
external usenet poster
 
Posts: 361
Default Macro Problem

I am trying to build a macro to automate some of my worksheet filtering.
Here's what I have been trying to use:

Sub StrikeCheck()
For i = 3 To 3
Range("B" & i).Select
Dim A As String
A = "=" & Range("B" & i).Value
Dim B As String
B = "=" & Range("D" & i).Value
Dim C As String
C = "<=" & Range("E" & i).Value
Dim D As String
D = "=" & Range("F" & i).Value
Dim E As String
E = "=" & Range("G" & i).Value
Sheets("configman").Select

Selection.AutoFilter Field:=4, Criteria1:=A, Operator:=xlAnd

Selection.AutoFilter Field:=6, Criteria1:=B, Operator:=xlAnd, _

Criteria2:=C

Selection.AutoFilter Field:=5, Criteria1:=D, Operator:=xlAnd

Next i

End Sub

The Macro does not preform the last Filter, For Criteria=D correctly. The
values in theat column are dates. The value that is being put into the filter
is a formated date and is a result of a formula.

Are there some suggestions on how I can get this to work ?

Thank you in advance.