stephen antoine
Board Regular
- Joined
- Jun 4, 2008
- Messages
- 128
Good morning all,
Can someone tell me how to filter records in VBA based on a formula? I tried the following code but it doesn't work:
I just want to be able to filter my data for all records older than one year and then copy the data to a new tab...
Please help
Can someone tell me how to filter records in VBA based on a formula? I tried the following code but it doesn't work:
Code:
Sheets("NE-SE All Open Orders").Select
Selection.AutoFilter
Selection.AutoFilter Field:=10, Criteria1:="<=(today()-365)"
'The line above is attempting to show only those records
'that are over 1 year older than today
Cells.Copy
Sheets.Add.Name = "NE-SE Orders Older Than 1 Yr"
ActiveSheet.Paste
I just want to be able to filter my data for all records older than one year and then copy the data to a new tab...
Please help