View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kassie kassie is offline
external usenet poster
 
Posts: 80
Default How to convert vertical blocked list to horizontal list?

If you need code to do the job, and if it is true that each record contains
10 rows, then click on <Alt<F11 while in your spreadsheet. Click on
Insert, Module.
In the right hand pane, paste the following code:

Sub Swing()
Do While ActiveCell < ""
ActiveCell.Offset.Range("A1:A10").Copy
ActiveCell.Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
ActiveCell.Offset(1, -1).Select
ActiveCell.Offset.Range("A1:A9").Select
Selection.EntireRow.Delete
Loop
End Sub

Return to your worksheet, select the first cell, (I presume it is A1), press
<Alt<F8, select Swing and OK out. I did not set screen updating to false,
so you will see a lot of action as it loops through the code, but not to
worry! Once the macro has run, make sure that you are happy with the result
before saving, or ideally, save the file with a different name, eg by
suffixing UPD to the filename -
List.xls would become ListUPD.xls.
--
Hth

Kassie Kasselman


"G Lykos" wrote:

Greetings! Have an Excel database that has ten lines per entry in one
column in a symmetric structure - first line is name, second line is
address, etc. Would like to rotate the data so each entry is one row, with
the lines in successive columns 1, 2, etc. Can this be accomplished using
standard worksheet functions? If not, is there some code available?

Thanks,
George