krazyderek
Board Regular
- Joined
- Feb 17, 2005
- Messages
- 60
i had a macro for taking a database and applying an advanced filter to get info on an employee for each month with the following macro
Range("J14").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Sheets("Database").Cells.AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("D11:F12"), CopyToRange:=Range("A13:J13"), Unique:=False
where D11:D12 is the employee name criteria, and E11:F12 is the date range, everything worked fine in excel 2003, but it doesn't work in 2010. If i back out the criteria to just be D11:D12 it works, but then i don't have a specific date range....
here's the real twist, if i do everything manually by clearing the data, going to advanced filter, it works with the date range, but the macro for the exact same steps, won't, kinda stumped...
the macro is just a module, maybe it needs to be somewhere else for 2007/2010?
Range("J14").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Sheets("Database").Cells.AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("D11:F12"), CopyToRange:=Range("A13:J13"), Unique:=False
where D11:D12 is the employee name criteria, and E11:F12 is the date range, everything worked fine in excel 2003, but it doesn't work in 2010. If i back out the criteria to just be D11:D12 it works, but then i don't have a specific date range....
here's the real twist, if i do everything manually by clearing the data, going to advanced filter, it works with the date range, but the macro for the exact same steps, won't, kinda stumped...
the macro is just a module, maybe it needs to be somewhere else for 2007/2010?