Smithsat34
Board Regular
- Joined
- Jan 20, 2014
- Messages
- 54
Hi board,
I recorded the following macro:
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.Range("$A$1:$Q$2975").AutoFilter Field:=2, Criteria1:="2014"
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Paste
Sheets("Bord Dec. 18").Select
Range("B1").Select
End Sub
What would be great would be if I could somehow loop through a list of values for criteria1. i.e. 2018, 2017, 2016, 2015, 2014.
If I could then define the name of each 'new' sheet with the criteria1 selection.
Any suggestions gratefully received
Regards
Smith
I recorded the following macro:
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.Range("$A$1:$Q$2975").AutoFilter Field:=2, Criteria1:="2014"
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Paste
Sheets("Bord Dec. 18").Select
Range("B1").Select
End Sub
What would be great would be if I could somehow loop through a list of values for criteria1. i.e. 2018, 2017, 2016, 2015, 2014.
If I could then define the name of each 'new' sheet with the criteria1 selection.
Any suggestions gratefully received
Regards
Smith