Hello,
I am stuck on finishing this code. The Input sheet is "Qlik_VT11 that has job numbers in column A. There are 4 output sheets defined below in the code with each having 2 conditions on the inout sheet that determine where the job number will get copied and pasted to. The primary sheet should loop until complete based on Column A. All output sheets will get pasted into Column A with each entry placed under the last. I started code from parts I found online and added the conditions into If & IfElse statements. I'm not sure I have the code correct for looping through the primary sheet and do not have code to place each entry in the output shttes into the next row down. Need some help
Sub Shipments()
Dim LR As Long, i As Long
With Sheets("Qlik_VT11")
LR = .Range("A" & Rows.Count).End(xlUp).Row
'erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
For i = 1 To LR
With .Range("A" & i)
If Cells(i, 3).Value = "NW" And Cells(i, 9).Value = "Performance Plastics" Then
Sheets("Qlik_VT11").Range("A1:A1").Copy Destination:=Sheets("Performance Plastics").Range("A2:A2")
ElseIf Cells(i, 3).Value = "NW" And Cells(i, 9).Value = "Specialty Products" Then
Sheets("Qlik_VT11").Range("A1:A1").Copy Destination:=Sheets("Specialty Products").Range("A2:A2")
ElseIf Cells(i, 3).Value = "NW" And Cells(i, 9).Value = "Material Sciences" Then
Sheets("Qlik_VT11").Range("A1:A1").Copy Destination:=Sheets("Material Sciences").Range("A2:A2")
ElseIf Cells(i, 3).Value = "NW" And Cells(i, 9).Value = "Corteva & Performance Materials" Then
Sheets("Qlik_VT11").Range("A1:A1").Copy Destination:=Sheets("Corteva & Perf Materials").Range("A2:A2")
End If
End With
Next i
End With
Bookmarks