Most of our orders go through our original packing team who use this consolidated format for packing orders per customer.
A new team requires each item to be on a separate line, so each Sales Order needs five rows, one for each type of widget we sell. They need it to look like this:
I recorded a macro of the copy/paste commands to log the first order:
Sub GrabOrders()
'
' GrabOrders Macro
'
'
Sheets("Raw Data").Select
Range("B2").Select
Selection.Copy
Sheets("Ship Sheet").Select
Range("A2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("A2:A6"), Type:=xlFillDefault
Range("A2:A6").Select
Sheets("Raw Data").Select
Range("F1:J1").Select
Selection.Copy
Sheets("Ship Sheet").Select
Range("G2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Raw Data").Select
Range("F2:J2").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Ship Sheet").Select
Range("H2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End Sub
I now need the cell-to-be-copied (on the original format tab) to move down one row to the next order and for the pasting on the new format tab to begin five rows down so as not to overwrite data from the previous order.
The Item Name will remain fixed (in F1, G1, etc. on the original tab) while the other cells-to-be-copied will be moving. I need this to loop until it reaches a blank Sales Order cell.