Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try
Sheets("Data 1").AutoFilter Field:=7, Criteria1:=Sheets("Report").Range("A1").Text, Operator:=xlAnd -- HTH Bob Phillips (remove nothere from email address if mailing direct) wrote in message ps.com... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula to find the filter criteria | Excel Worksheet Functions | |||
count records which meet filter criteria | Excel Discussion (Misc queries) | |||
How can I DISPLAY Filter Criteria | Excel Worksheet Functions | |||
How do I filter a list using a greater than todays date function? | Excel Worksheet Functions | |||
Need to filter more than one date | New Users to Excel |