Transpose one row in two columns.

Tom.Jones

Well-known Member
Joined
Sep 20, 2011
Messages
506
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. Mobile
Hi,

Please help me in the next problem.
In A1: ZL1 are texts. How could I do that, starting with A2, to transpose the data from the odd cells (A1, C1, E1, ..... ZK1) into A2: A345,
and the data from the even cells (B1, D1, F1, ..... ZL1), from the range A1: ZL1 to be transposed into B2: B345.

Thank you.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about
In A2 copied down
=INDEX($1:$1,2*ROW(A1)-1)
In B2 copied down
=INDEX($1:$1,2*ROW(B1))
 
Upvote 0
Solution
Glad to help & thanks for the feedback
 
Upvote 0
Power Query is an alternate means to achieve this:

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
    #"Added Index" = Table.AddIndexColumn(#"Unpivoted Columns", "Index", 0, 1),
    #"Inserted Modulo" = Table.AddColumn(#"Added Index", "Modulo", each Number.Mod([Index], 2), type number),
    #"Added Custom" = Table.AddColumn(#"Inserted Modulo", "Odd", each if([Modulo]=0) then [Value] else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Even", each if([Modulo]=1) then [Value] else null),
    #"Filled Up" = Table.FillUp(#"Added Custom1",{"Even"}),
    #"Removed Columns" = Table.RemoveColumns(#"Filled Up",{"Attribute", "Value", "Index", "Modulo"}),
    #"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([Odd] <> null))
in
    #"Filtered Rows
 
Upvote 0
Thank you Alan.

I haven't worked with Power Query before.
Can you guide me a little ...
I do not know the steps to introduce this M-code.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,239
Members
448,555
Latest member
RobertJones1986

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