Transpose Data

Blessy Clara

Board Regular
Joined
Mar 28, 2010
Messages
204
Office Version
  1. 365
Platform
  1. Windows
Hi,

Could someone let me know how to transpose Rows to columns using VBA.

Paste Special "Transpose" in excel may not be helpful for the type of data i have.

I have the details of 100 people in A Column

1.Sam Meyer
Unilever R&D
Colworth, Sharnbrook
Bedford MK44 1LQ
UK

2.George Geffrey
IRIT-UT1
Université Toulouse 1 Sciences Sociales
2, rue du Doyen Gabriel Marty
31 042 Toulouse Cedex 9
France

3.Lambert Lucy
GUESS
Dept. Informática, c6.3.18
Faculdade de Ciências da Universidade de Lisboa
Campo Grande
1749-016 Lisboa
Portugal

Hint -
Each individual's detail is separated with a blank row (could this used as the criteria to transpose!!!)

Also please note - the number of rows may vary (for example Lambert Lucy has details in 7 rows and George Geffrey in 5 rows)

Desired output to be like

HTML:
Iqbal Adjali	Unilever R&D Colworth, Sharnbrook 	Bedford MK44 1LQ	UK

Ie - Each Individual's data in rows to be transposed to cloumns

I hope it is understandable

Thank you
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try this with a copy of your sheet

Code:
Sub Addrs()
Dim Area As Range
For Each Area In Columns("A").SpecialCells(xlCellTypeConstants).Areas
    Area(1).Offset(, 1).Resize(, Area.Rows.Count).Value = Application.Transpose(Area)
Next Area
Columns("A").Delete
Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

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