thedeadzeds
Active Member
- Joined
- Aug 16, 2011
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
Hi Guys,
I have a list of data with a persons name in column N. For each person i have created a tab which is identical to their name in column N. Is there a way to filter by that person and copy all of the data to the relevant named tab as values. At the moment i am doing the below but there must be an easier way? Many thanks
I have a list of data with a persons name in column N. For each person i have created a tab which is identical to their name in column N. Is there a way to filter by that person and copy all of the data to the relevant named tab as values. At the moment i am doing the below but there must be an easier way? Many thanks
Code:
Sub Copy_to_all_staff_sheets()
'Bethan
Sheets("Bethan").Select
Cells.Select
Selection.ClearContents
Sheets("Blue Allocated").Select
ActiveSheet.ShowAllData
Range("A1").Select
Selection.AutoFilter
ActiveSheet.Range("$A:$N").AutoFilter Field:=14, Criteria1:= _
"Bethan"
Columns("A:N").Select
Selection.Copy
Sheets("Bethan").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Hannah
Sheets("Hannah").Select
Cells.Select
Selection.ClearContents
Sheets("Blue Allocated").Select
ActiveSheet.ShowAllData
Range("A1").Select
Selection.AutoFilter
ActiveSheet.Range("$A:$N").AutoFilter Field:=14, Criteria1:= _
"Hannah"
Columns("A:N").Select
Selection.Copy
Sheets("Hannah").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub