S M Morrow
New Member
- Joined
- May 15, 2018
- Messages
- 1
Hi, I need to select non-contiguous cells in a sheet and paste them to specific columns on the next blank row of another sheet. The code below can copy non-contiguous cells and paste to specific cells on the required sheet, but I cannot adapt to get it to copy to the next blank row.
Sub Copycell()
Dim rng1 As Range
Set rng1 = Range("B2,B4,B6")
Dim rng2 As Range
Set rng2 = Sheets("list").Range("A2,B2,D2")
Dim i As Long
For Each cel In rng2
cel.Value = rng1.Cells(i + 1)
i = i + 1
Next
End Sub
Sub Copycell()
Dim rng1 As Range
Set rng1 = Range("B2,B4,B6")
Dim rng2 As Range
Set rng2 = Sheets("list").Range("A2,B2,D2")
Dim i As Long
For Each cel In rng2
cel.Value = rng1.Cells(i + 1)
i = i + 1
Next
End Sub