how do I rearrange a column into a series of columns?
Hi,
This assumes Column A contains your list, starting row 1, and
tranposes data to Columns B to H, starting Row 1. When completed you can
delete Column A.
Sub TranposeRows()
Dim inrow As Long, lastrow As Long
Application.ScreenUpdating = False
With Worksheets("sheet1")
lastrow = .Cells(Rows.Count, "A").End(xlUp).Rows
Set outrng = .Range("B1")
For inrow = 1 To lastrow Step 7
.Range("A" & inrow).Resize(7, 1).Copy
outrng.Resize(1, 7).PasteSpecial Paste:=xlPasteAll,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Set outrng = outrng.Offset(1, 0)
Next inrow
End With
Application.ScreenUpdating = True
End Sub
HTH
"RMorahn" wrote:
some one sent ma large file with seven recurring fields all in one single
column. Is there some macro that will move each of seven rows to a separate
column and then restart the process with each seventh line to the end of the
file. There are too many items to do this manually? Each field item recurs
every seven lines.
|