Hello everyone....
I'm using this command below to insert a row.
But instead of copying the entire row, I only want to copy from A to Q only.
How should I change the command?
Thank you in advance.
I'm using this command below to insert a row.
But instead of copying the entire row, I only want to copy from A to Q only.
How should I change the command?
VBA Code:
Dim i As Integer
Dim j As Integer
For i = 1 To 10
j = InStr(1, Cells(i, 18), "Freight", vbTextCompare)
If j = 1 Then
Cells(i, 1).EntireRow.Copy
Cells(i + 1, 1).EntireRow.Insert
Application.CutCopyMode = False
Cells(i + 1, 7).Value = "Z001"
Cells(i + 1, 10).Value = Cells(i, 16)
i = i + 1
Else
End If
Next i
Thank you in advance.