Thread: Transpose macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
CoRrRan CoRrRan is offline
external usenet poster
 
Posts: 19
Default Transpose macro

bamf wrote:
Hi, I have a workbook that has data arranged into columns (each column refers
to one client) and are linked across a number of worksheets.

I need to write a macro that will copy the data from multiple columns to one
row. eg:
a1 b1 c1
a2 b2 c2
a3 b3 c3

into
a1 a2 a3
b1 b2 b3
c1 c2 c3

Any guidance would be great!
Thanks
Jo


Just use the "Transpose"-function of Excel in your code:

*********************
Dim rng As Range

Set rng = Range("A1:C3")

Range("A4:C6") = Application.WorksheetFunction.Transpose(rng)
*********************

CoRrRan