I assummed employee names were in column A and the shift was in column B:
Sub RunMe()
Dim ws1 As Worksheet: Set ws1 = Sheets("Sheet1") 'primary sheet
Dim ws2 As Worksheet: Set ws2 = Sheets("Sheet2") 'output sheet
Dim str As String
str = "DS" 'you can change this if needed
With ws1
.AutoFilterMode = False
.Range("B1:B" & .Range("B" & Rows.Count).End(xlUp).Row).AutoFilter Field:=1, Criteria1:=str
.AutoFilter.Range.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Copy Destination:=ws2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
.AutoFilterMode = False
End With
End Sub
Bookmarks