This one has me puzzled...
In previous macros I've used this code if I wanted the criteria value
to = a value in a cell somewhere else.
Sheets("Data 1").Select
Selection.AutoFilter Field:=7, Criteria1:=Sheets("Report").Range("A1"),
Operator:=xlAnd
In this case for example, cell A1 in Report worksheet has a value of
"test". So in the Data 1 worksheet, it would find all rows with "test"
in Column G (pretty simple).
I seem to be having difficulty using the same method above when
instead of using a word like "test", I'm using a date, like 12/11/05 in
my Report worksheet, cell A1. There are plenty of dates with 12/11/05
in the Data 1 sheet so I'm puzzled.
I've double checked the format of the cell in A1 to make sure it's the
same format as the dates in Column G in Data 1 and everthing is in
synch.
Any ideas?
Bob Phillips - 14 Dec 2005 19:31 GMT
Try
Sheets("Data 1").AutoFilter Field:=7,
Criteria1:=Sheets("Report").Range("A1").Text, Operator:=xlAnd

Signature
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
> This one has me puzzled...
>
[quoted text clipped - 19 lines]
>
> Any ideas?