Converting a grid of data to linear
Hi Patrick
Thanks, this is a good start; but at the moment it is moving everything to
column A
I need list the entries in Row1 one below the other, then take Row 2 and
list them below the Row1 data one after the other.
Regards
Charles
"Patrick Molloy" wrote:
something quite simple like this to get you started....
Option Explicit
Sub Rearrange()
Dim lastRow As Long
Dim cl As Long
'get depth of column
lastRow = Range("A1").End(xlDown).Row
For cl = 2 To 20
Range("A1").End(xlDown).Offset(1).Select
Range(Cells(1, cl), Cells(lastRow, cl)).Cut
ActiveSheet.Paste
Next
End Sub
"Charles" wrote in message
...
I need to transpose a grid of data into a linear format, a cut of the
existing data looks like this:
B C D E
1 35714.57 0 0 34365.98
2 23874.54 0 23843.06 22860.84
And I want it to look like this:
1 35714.57
1 0
1 0
1 34365.98
2 23874.54
2 0
2 23843.06
2 22860.84
The existing data extend to 20 or more columns and there will be 9000
rows.
Any suggestions gratefully received.
Thanks
|