Hi
Total noob here, I'm teaching myself the basics and just playing around with moving data between spreadsheets.
I've got two Workbooks open, I'm creating a Macro to filter the data on one of the Workbooks, copy that data and paste it into another Workbook, the macro works:
Windows("Timesheets Week 1 - TEST.xlsx").Activate
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Q$85").AutoFilter Field:=11, Criteria1:= _
"Region 11"
But the problem is if the data is longer than 85 rows this data will get missed off.
I got around this problem to just changing the macro to a really high number of rows
Windows("Timesheets Week 1 - TEST.xlsx").Activate
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Q$20000").AutoFilter Field:=11, Criteria1:= _
"Region 11"
What is the simplest method around this?
Remember I want to copy the filtered data afterwards
Total noob here, I'm teaching myself the basics and just playing around with moving data between spreadsheets.
I've got two Workbooks open, I'm creating a Macro to filter the data on one of the Workbooks, copy that data and paste it into another Workbook, the macro works:
Windows("Timesheets Week 1 - TEST.xlsx").Activate
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Q$85").AutoFilter Field:=11, Criteria1:= _
"Region 11"
But the problem is if the data is longer than 85 rows this data will get missed off.
I got around this problem to just changing the macro to a really high number of rows
Windows("Timesheets Week 1 - TEST.xlsx").Activate
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Q$20000").AutoFilter Field:=11, Criteria1:= _
"Region 11"
What is the simplest method around this?
Remember I want to copy the filtered data afterwards