Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default From clumns to rows

Hello everyone,

I have a table. There are headers and below them is data. 3 rows and 10
columns. I need to get this table to change it's format.

from:
a1 b1 c1 d1
a2 b2 c2 d2
a3 b3 c3 d3

to:
a1 a2 a3
b1 b2 b3
c1 c2 c3
d1 d2 d3

Thanks to everyone.

Juuljus

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default From clumns to rows

Select the cells, then Copy

Select first target cell, EditPasteSpecial and select Transpose

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Juuljus" wrote in message
ups.com...
Hello everyone,

I have a table. There are headers and below them is data. 3 rows and 10
columns. I need to get this table to change it's format.

from:
a1 b1 c1 d1
a2 b2 c2 d2
a3 b3 c3 d3

to:
a1 a2 a3
b1 b2 b3
c1 c2 c3
d1 d2 d3

Thanks to everyone.

Juuljus



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default From clumns to rows

There are several ways to do so.
The first one:
1 - Copy the cells.
2 - Select the first cell where you want to copy to.
3 - Next to the paste icon on the toolbar, there is an arrow. Press it
and select Transpose.

the second one:
1 - Select the area where you want to copy the data.
2 - Write the following: =TRANSPOSE([in here put the are of the data
you cpy from]), and press Ctrl+Shift+Enter.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default From clumns to rows

Juuljus,
Select your range and do "Edit--Copy" or right-click,
Copy). Select cell where you want to paste and highlight three (3) cells
across and ten (10) down. Right click, Paste Special and Transpose.

Code below will do the same

HTH

Sub ColumnsTtoRows()

Dim r As Long, c As Integer
Dim lastrow As Long, lastcol As Integer
Set ws1 = Worksheets("Sheet1")
Set ws2 = Worksheets("Sheet2")
With ws1
r = 2
lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
lastcol = .Cells(2, Columns.Count).End(xlToLeft).Column
For c = 1 To lastcol
.Range(.Cells(2, c), Cells(lastrow, c)).Copy
ws2.Cells(r, 1).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
r = r + 1
Next c
End With
End Sub


"Juuljus" wrote:

Hello everyone,

I have a table. There are headers and below them is data. 3 rows and 10
columns. I need to get this table to change it's format.

from:
a1 b1 c1 d1
a2 b2 c2 d2
a3 b3 c3 d3

to:
a1 a2 a3
b1 b2 b3
c1 c2 c3
d1 d2 d3

Thanks to everyone.

Juuljus


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default From clumns to rows

Big thanks to Bob and princeof...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
colating multi rows of data into single rows - no to pivot tables! UKMAN Excel Worksheet Functions 4 March 12th 10 04:11 PM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
Counting characters in multiple rows when rows meet specific criteria news.virginmedia.com Excel Worksheet Functions 3 June 28th 08 09:03 PM
how do i transpose rows to clumns? berkin benli Excel Worksheet Functions 1 April 29th 05 04:01 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"