Forum Discussion
ESCHOENN
Jun 07, 2022Copper Contributor
Copy paste format- column to row by 3
Hello! I have a large column of cells I need to have in rows of 3. I've been using transpose to do 3 at a time but for longer columns this gets a little tedious. Is there a way to copy and paste ...
- Jun 07, 2022
Sub rowsof3() Dim i As Integer Dim j As Integer Dim z As Integer z = 4 i = 1 For j = 6 To 215 Cells(z, i).Value = Cells(j, 8).Value i = i + 1 If i = 4 Then z = z + 1 i = 1 Else End If Next j End Sub
Maybe with this code. In the attached file you can click the button in cell E2 to start the macro.
OliverScheurich
Jun 07, 2022Gold Contributor
Sub rowsof3()
Dim i As Integer
Dim j As Integer
Dim z As Integer
z = 4
i = 1
For j = 6 To 215
Cells(z, i).Value = Cells(j, 8).Value
i = i + 1
If i = 4 Then
z = z + 1
i = 1
Else
End If
Next j
End Sub
Maybe with this code. In the attached file you can click the button in cell E2 to start the macro.