this macro copy to worksheets "WIP" and "Finished Jobs"
Sub a()
Set sh1 = Sheets(1)
Set shWIP = Sheets("WIP")
Set shFIN = Sheets("Finished Jobs")
LR = sh1.Range("A" & Rows.Count).End(xlUp).Row
WIPstartrow = 2
FINstartrow = 2
With sh1
For j = 2 To LR
If .Cells(j, 11).Value = 1 Then
.Range(.Cells(j, 1), .Cells(j, 10)).Copy shWIP.Cells(WIPstartrow, 1)
WIPstartrow = WIPstartrow + 1
End If
If .Cells(j, 11).Value = 2 Then
.Range(.Cells(j, 1), .Cells(j, 10)).Copy shFIN.Cells(FINstartrow, 1)
FINstartrow = FINstartrow + 1
End If
Next
End With
End Sub
Bookmarks