Option Explicit
Sub PopulateSheet2()
Dim wsh As Worksheet
Dim wsh2 As Worksheet
Dim i As Long
Dim Lr As Long
Dim Table2 As Object
' Initalize variables
Set wsh = Sheets("Sheet1")
Set wsh2 = Sheets("Sheet2")
With Sheets("Sheet1")
Lr = .Range("B2").End(xlDown).Row
For i = 2 To Lr
If .Cells(i, "D") = "Master" And .Cells(i, "E") Like "*Active*" Then
' wsh.Range("Table1").AdvancedFilter Action:=xlFilterCopy, _
' CriteriaRange:=wsh.Rows(i), CopytoRange:=wsh2.Range("B2:R2"), Unique:=False
wsh.Rows(i).Copy Destination:=wsh2.Rows(2)
End If
If .Cells(i, "D") Like "*Chief Mate*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy Destination:=wsh2.Rows(3)
End If
If .Cells(i, "D") Like "*Second Mate*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(4)
End If
If .Cells(i, "D") = "Third Mate" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(5)
End If
If .Cells(i, "D") = "Third Mate RO" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(6)
End If
If .Cells(i, "D") Like "*Bosun AB*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(7)
End If
If .Cells(i, "D") Like "*AB Deck Maintenance (1)*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(8)
End If
If .Cells(i, "D") Like "*AB Deck Maintenance (2)*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(9)
End If
If .Cells(i, "D") Like "*AB Watch 8X12*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(10)
End If
If .Cells(i, "D") Like "*AB Watch 12x4*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(11)
End If
If .Cells(i, "D") Like "*AB Watch 4x8*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(12)
End If
If .Cells(i, "D") Like "*Chief Engineer*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(13)
End If
If .Cells(i, "D") Like "*First Engineer*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(14)
End If
If .Cells(i, "D") Like "*Second Engineer*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(15)
End If
If .Cells(i, "D") Like "*Third Engineer*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(16)
End If
If .Cells(i, "D") Like "*Deck Engine Utility (1)*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(17)
End If
If .Cells(i, "D") Like "*Deck Engine Utility (2)*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(18)
End If
If .Cells(i, "D") Like "*Steward Baker*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(19)
End If
If .Cells(i, "D") Like "*Chief Cook*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(20)
End If
If .Cells(i, "D") Like "*Steward Assistant*" And .Cells(i, "E") Like "*Active*" Then
wsh.Rows(i).Copy wsh2.Rows(21)
End If
' Seems very inefficient, slow and sloppy...
Next i
End With
End Sub