I am getting ready to copy this code for another process but now I need to set it up to either use the different criteria in a column or to some how only copy the data until the blank three rows. The worksheet as for an example has 10 rows of information with header then 3 blank rows then a new set of data below without headers but is the same as the data above the 3 blank rows with the only difference in the column criteria.
The first set of data is by rate code MUSL the rest below is MUSOPSS. Not sure how to make this column M as the criteria to copy only the columns listed below for MUSL. Then I need to copy the same columns listed below for the MUSOPSS and past to a different worksheet. Could you give me some advice where to go from here?
[/CODE] Sub Mode2Delivery()
' Copy Selected columns to script ADD & END Operand Mode 2 Delivery tab
The first set of data is by rate code MUSL the rest below is MUSOPSS. Not sure how to make this column M as the criteria to copy only the columns listed below for MUSL. Then I need to copy the same columns listed below for the MUSOPSS and past to a different worksheet. Could you give me some advice where to go from here?
[/CODE] Sub Mode2Delivery()
' Copy Selected columns to script ADD & END Operand Mode 2 Delivery tab
VBA Code:
Sub Mode2Delivery()
' Copy Selected columns to script ADD & END Operand Mode 2 Delivery tab
Dim LastRow As Long
LastRow = Sheets("Installation wkg").Cells(Rows.Count, 2).End(xlUp).Row
Application.ScreenUpdating = False
With Sheets("ADD & END Operand Mode2 Delivry")
Sheets("Installation wkg").Range("H2:H" & LastRow).Copy Destination:=.Range("B3")
Sheets("Installation wkg").Range("I2:I" & LastRow).Copy Destination:=.Range("C3")
Sheets("Installation wkg").Range("K2:K" & LastRow).Copy Destination:=.Range("D3")
Sheets("Installation wkg").Range("W2:W" & LastRow).Copy Destination:=.Range("I3")
Sheets("Installation wkg").Range("AA2:AA" & LastRow).Copy Destination:=.Range("M3")
Sheets("Installation wkg").Range("X2:X" & LastRow).Copy Destination:=.Range("J3")
.Columns("J:J").NumberFormat = "mm/dd/yyyy"
.Columns("E:E").NumberFormat = "mm/dd/yyyy"
.Range("A2").AutoFill .Range("A2:A" & LastRow + 1)
.Range("F2").AutoFill .Range("F2:F" & LastRow + 1)
End With
End Sub