Good day!
I would like to create a loop in VBA that would copy every two rows to a cell below.
__________________________________
i.e. copy row a1 and a2 to b1
copy row a3 and a4 to b2
copy row a5 and a6 to b3
etc...
until end of row
__________________________________
So far this is what I found in my google search.
Sub Concatenate_Cells()
Dim i As Long
Dim Lastrow As String
Dim TotalStrings As String
Dim first10row As String
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To Lastrow
TotalStrings = TotalStrings & Cells(i, 1) & ","
Next i
TotalStrings = Left(TotalStrings, Len(TotalStrings) - 1)
Range("lastcell") = TotalStrings
End Sub
I would like to create a loop in VBA that would copy every two rows to a cell below.
__________________________________
i.e. copy row a1 and a2 to b1
copy row a3 and a4 to b2
copy row a5 and a6 to b3
etc...
until end of row
__________________________________
So far this is what I found in my google search.
Sub Concatenate_Cells()
Dim i As Long
Dim Lastrow As String
Dim TotalStrings As String
Dim first10row As String
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To Lastrow
TotalStrings = TotalStrings & Cells(i, 1) & ","
Next i
TotalStrings = Left(TotalStrings, Len(TotalStrings) - 1)
Range("lastcell") = TotalStrings
End Sub