View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default how do i convert vertical data into horizontal data

Give this macro a shot on a copy of your sheet.

May be close to your needs.

Sub ColtoRows()
Dim rng As Range
Dim I As Long
Dim J As Long
Set rng = Cells(Rows.Count, 1).End(xlUp)
J = 1
On Error Resume Next
nocols = InputBox("Enter Number of Columns Desired")
For I = 1 To rng.Row Step nocols
Cells(J, "A").Resize(1, nocols).Value = _
Application.Transpose(Cells(I, "A").Resize(nocols, 1))
J = J + 1
Next
Range(Cells(J, "A"), Cells(rng.Row, "A")).ClearContents
Exit Sub
End Sub



Gord Dibben MS Excel MVP

On Wed, 27 Feb 2008 08:38:03 -0800, Rod Dakan <Rod
wrote:

I am not sure that this can be done but I am scanning a list of people,
address, city state and zip
I can get it into excel but haven't figured out how to get into a format
that will allow me to import it into a database.

The data looks like this in the spreadsheet.

Name first name other name
Company
Address (streee city st zip)
Phone
email
other info
even more info

I will have about 4000 names to deal with so some method of transposing all
of this would be a real help.

Even some suggestions as to software that will help would great.