Five Lines of Text to Five Columns

hl2qs

New Member
Joined
Aug 5, 2011
Messages
7
I have a number of contacts with their details on individual lines in Column A like this in Excel 2010, Windows 7:

Grounds Maintenance
Helper
Bob Smith

165 Cresap
Charlottesville, VA 22903
E bob@virginia.edu

Sports Management
Director
Jane Woodard
119 Stadium Road
Scottsville, VA 22605
434-924-5564
E jane@jmu.edu

I was hoping to convert the first five cells after each blank cell to five columns, the first cell after the blank one in column B, the second cell in column C, etc. Any ideas on how to do this in a couple steps?

Much obliged
Hamilton
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi,
try using the macro of the form:
Code:
Sub Transposing()
Dim i&, ran As Range
    
For Each ran In Columns("A").SpecialCells(xlConstants).Areas
  i = i + 1
  Cells(i, 2).Resize(, ran.Rows.Count).Value = Application.Transpose(ran)
Next ran
End Sub
I find this Solution in this forum :) I don't remember who is the Author. Best regards.
 
Upvote 0
Assuming the data in Column A are constants (that is, not formulas), then this code should do what you want...

Code:
Sub ColumnsToRowsByAreas()
  Dim Ar As Range
  For Each Ar In Columns("A").SpecialCells(xlConstants).Areas
    Ar(1).Offset(, 1).Resize(, Ar.Rows.Count) = WorksheetFunction.Transpose(Ar)
  Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top