Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to transpose multiple rows into one column with row labeling? | Excel Discussion (Misc queries) | |||
transpose multiple rows into one column | Excel Discussion (Misc queries) | |||
Transpose Column to Rows | Excel Discussion (Misc queries) | |||
Transpose Data from a column to several rows | Excel Worksheet Functions | |||
transpose a column into many rows | Excel Discussion (Misc queries) |