hunna
12-17-2011, 01:44 AM
I have a code to copy data from cells(i, xx) to different column but same row.
I would like to copy and always paste the data starting from row 2.
any help would be appreciated.
Sub test()
Dim i As Long
For i = 1 To 30
If Not Cells(i, 11) = "" Then
Cells(i, 1) = Cells(i, 11).Value
Cells(i, 2) = Cells(i, 12).Value
Cells(i, 3) = Cells(i, 13).Value
Cells(i, 4) = Cells(i, 14).Value
Cells(i, 5) = Cells(i, 15).Value
Cells(i, 6) = Cells(i, 16).Value
Cells(i, 7) = Cells(i, 17).Value
Else
End If
Next i
End Sub
I would like to copy and always paste the data starting from row 2.
any help would be appreciated.
Sub test()
Dim i As Long
For i = 1 To 30
If Not Cells(i, 11) = "" Then
Cells(i, 1) = Cells(i, 11).Value
Cells(i, 2) = Cells(i, 12).Value
Cells(i, 3) = Cells(i, 13).Value
Cells(i, 4) = Cells(i, 14).Value
Cells(i, 5) = Cells(i, 15).Value
Cells(i, 6) = Cells(i, 16).Value
Cells(i, 7) = Cells(i, 17).Value
Else
End If
Next i
End Sub