| |
msalonen
Posts: 1
Score: 0
Joined: 5/18/2008
Status: offline
|
Hi I am trying to create a macro that reads in two sets of dates and then selects certain data based on a condition. used record a macro to get the following code, but when attempting to run the macro (before and after editing it) all i get is an empty sheet. code: Sub Macro5() 'Activate the STATS sheet Windows("STATISTICS-003.xlsm").Activate Worksheets(3).Select Date1 = "='[STATISTICS-003.xlsm]Analysis'!E3" Date2 = "='[STATISTICS-003.xlsm]Analysis'!E4" Columns("B:B").Select ActiveSheet.Range("$A$1:$AS$501").AutoFilter Field:=2, Criteria1:= >=Date1, Operator:=xlAnd, Criteria2:= <=Date2 End Sub My complete objective is to look at data between two given dates, and from that look at a particular column and count how many items there are of a particular kind. Any help is greatly appreciated, THANKS!
_____________________________
/marko
|
|