Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default transpose rows to column (cell)

Hello,

I have the below table:

A B C D E F G H I J K L
x y z 1 2 3 4 5 6 7 8 9
c b d 2 3 4 5 6 7 8 9 2

I need to transpose as follows:

X y z 1
x y z 2
X y z 3
x y z 4
x y z 5
x y z 6
x y z 7
x y z 8
x y z 9
c b d 2
c b d 3

....etc

I really apprecite if a help can be sent to me

Thx
Ghaleb



Submitted via EggHeadCafe - Software Developer Portal of Choice
Word HTML Cleaner
http://www.eggheadcafe.com/tutorials...l-cleaner.aspx
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,494
Default transpose rows to column (cell)

are they supposed to be all in column A or in columns A-D?


--


Gary Keramidas
Excel 2003


"Ghaleb Bakri" wrote in message ...
Hello,

I have the below table:

A B C D E F G H I J K L
x y z 1 2 3 4 5 6 7 8 9
c b d 2 3 4 5 6 7 8 9 2

I need to transpose as follows:

X y z 1
x y z 2
X y z 3
x y z 4
x y z 5
x y z 6
x y z 7
x y z 8
x y z 9
c b d 2
c b d 3

...etc

I really apprecite if a help can be sent to me

Thx
Ghaleb



Submitted via EggHeadCafe - Software Developer Portal of Choice
Word HTML Cleaner
http://www.eggheadcafe.com/tutorials...l-cleaner.aspx


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,494
Default transpose rows to column (cell)

you can give this code a try, it puts the results on a separate sheet. didn't
have a lot of time to test it.

Sub test()
Dim ws As Worksheet
Dim ws2 As Worksheet
Dim lastrow As Long
Dim lastcol As Long
Dim i As Long
Dim y As Long
Dim z As Long

y = 1
Set ws = Worksheets("sheet1")
Set ws2 = Worksheets("sheet2")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
lastcol = ws.Cells(1, Columns.Count).End(xlToLeft).Column
ws2.Cells.Clear
With ws
For i = 1 To lastrow
For z = 4 To lastcol
ws2.Range("A" & y & ":C" & y).Value = ws.Range("A" & i &
":C" & i).Value
ws2.Cells(y, 4).Value = ws.Cells(i, z).Value
y = y + 1
Next
Next
End With
End Sub


--


Gary Keramidas
Excel 2003


"Ghaleb Bakri" wrote in message ...
Hello,

I have the below table:

A B C D E F G H I J K L
x y z 1 2 3 4 5 6 7 8 9
c b d 2 3 4 5 6 7 8 9 2

I need to transpose as follows:

X y z 1
x y z 2
X y z 3
x y z 4
x y z 5
x y z 6
x y z 7
x y z 8
x y z 9
c b d 2
c b d 3

...etc

I really apprecite if a help can be sent to me

Thx
Ghaleb



Submitted via EggHeadCafe - Software Developer Portal of Choice
Word HTML Cleaner
http://www.eggheadcafe.com/tutorials...l-cleaner.aspx


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default transpose rows to column (cell)

The green range was named "DATA".
Assuming you want the results in 4 columns [A<--D] - try this:
http://img85.imageshack.us/img85/5950/nonameqx.png
Micky


"Ghaleb Bakri" wrote:

Hello,

I have the below table:

A B C D E F G H I J K L
x y z 1 2 3 4 5 6 7 8 9
c b d 2 3 4 5 6 7 8 9 2

I need to transpose as follows:

X y z 1
x y z 2
X y z 3
x y z 4
x y z 5
x y z 6
x y z 7
x y z 8
x y z 9
c b d 2
c b d 3

....etc

I really apprecite if a help can be sent to me

Thx
Ghaleb



Submitted via EggHeadCafe - Software Developer Portal of Choice
Word HTML Cleaner
http://www.eggheadcafe.com/tutorials...l-cleaner.aspx
.

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
how to transpose multiple rows into one column with row labeling? pemt Excel Discussion (Misc queries) 2 November 5th 09 10:03 PM
transpose multiple rows into one column pemt Excel Discussion (Misc queries) 2 October 23rd 09 10:27 PM
Transpose Column to Rows Pai Excel Discussion (Misc queries) 3 December 10th 08 03:24 PM
Transpose Data from a column to several rows stansdl Excel Worksheet Functions 5 July 30th 06 10:40 PM
transpose a column into many rows GMed Excel Discussion (Misc queries) 1 January 21st 05 07:15 PM


All times are GMT +1. The time now is 03:53 AM.

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

About Us

"It's about Microsoft Excel"