Transpose every 2 columns into new row, moving to new row after last column

prshntmv

New Member
Joined
Jul 18, 2019
Messages
2
Hi there,
I have a sheet in the following format[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Key1[/TD]
[TD]Attr1[/TD]
[TD]Key2[/TD]
[TD]Attr2[/TD]
[TD]Key3[/TD]
[TD]Attr3[/TD]
[TD]Key4[/TD]
[TD]Attr4[/TD]
[/TR]
[TR]
[TD]1 Jan 2019[/TD]
[TD]1[/TD]
[TD]23[/TD]
[TD]3[/TD]
[TD]43[/TD]
[TD]3[/TD]
[TD]25[/TD]
[TD]1[/TD]
[TD]54[/TD]
[/TR]
[TR]
[TD]2 Jan 2019[/TD]
[TD]2[/TD]
[TD]23[/TD]
[TD]2[/TD]
[TD]23[/TD]
[TD]2[/TD]
[TD]54[/TD]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]3 Jan 2019[/TD]
[TD]4[/TD]
[TD]25[/TD]
[TD]1[/TD]
[TD]54[/TD]
[TD]4[/TD]
[TD]43[/TD]
[TD]2[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]4 Jan 2019[/TD]
[TD]3[/TD]
[TD]23[/TD]
[TD]4[/TD]
[TD]23[/TD]
[TD]2[/TD]
[TD]32[/TD]
[TD]4[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]5 Jan 2019[/TD]
[TD]1[/TD]
[TD]27[/TD]
[TD]1[/TD]
[TD]24[/TD]
[TD]1[/TD]
[TD]14[/TD]
[TD]2[/TD]
[TD]44[/TD]
[/TR]
</tbody>[/TABLE]

which I want to convert into the below format.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Key[/TD]
[TD]Attr[/TD]
[/TR]
[TR]
[TD]1 Jan 2019[/TD]
[TD]1[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]1 Jan 2019[/TD]
[TD]3[/TD]
[TD]43[/TD]
[/TR]
[TR]
[TD]1 Jan 2019[/TD]
[TD]2[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]1 Jan 2019[/TD]
[TD]1[/TD]
[TD]54[/TD]
[/TR]
[TR]
[TD]2 Jan 2019[/TD]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]2 Jan 2019[/TD]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]2 Jan 2019[/TD]
[TD]2[/TD]
[TD]54[/TD]
[/TR]
[TR]
[TD]2 Jan 2019[/TD]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
</tbody>[/TABLE]
And so on. This is essentially transposing every 2 columns (starting from Key1) into rows, until the last set of columns and then starting again with second row of Key1 column and so on.

Can any one please help?

Cheers
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
With PowerQuery (Get&Transform) try UnPivot Selected Columns for Keys then the same for Attr
 
Upvote 0
I don't know, maybe someone else will give you formula(s) solution

Have a nice day
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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