Transpose data?

Gids007

New Member
Joined
Feb 12, 2019
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hi There,

I need a way of transposing this data...12 columns, there will be about 200 rows of data...

First NameLast NameRegionManager Patch Q1 Q2 Q3 Q4 Q5 Q6 Q7
gideonclewlowNITodd Stocker Rotorua1110100
janebriceSIAlex Moore Timaru1100100

<colgroup><col><col><col><col><col><col span="7"></colgroup><tbody>
</tbody>

to...

First NameLast NameRegionManagerPatchQuestion Score
gideonclewlowNITodd StockerRotoruaQ11
gideonclewlowNITodd StockerRotoruaQ21
gideonclewlowNITodd StockerRotoruaQ31
gideonclewlowNITodd StockerRotoruaQ40
gideonclewlowNITodd StockerRotoruaQ51
gideonclewlowNITodd StockerRotoruaQ60
gideonclewlowNITodd StockerRotoruaQ70
janebriceSIAlex MooreTimaruQ11
janebriceSIAlex MooreTimaruQ21
janebriceSIAlex MooreTimaruQ30
janebriceSIAlex MooreTimaruQ40
janebriceSIAlex MooreTimaruQ51
janebriceSIAlex MooreTimaruQ60
janebriceSIAlex MooreTimaruQ70

<colgroup><col><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>

Thank you
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
with PowerQuery (Get&Transform) UnPivot selected columns (in this case Q columns)
(or UnPivot Other Columns - select all except Q columns)
First NameLast NameRegionManagerPatchQ1Q2Q3Q4Q5Q6Q7
gideonclewlowNITodd StockerRotorua
1​
1​
1​
0​
1​
0​
0​
janebriceSIAlex MooreTimaru
1​
1​
0​
0​
1​
0​
0​
First NameLast NameRegionManagerPatchQuestionScore
gideonclewlowNITodd StockerRotoruaQ1
1​
gideonclewlowNITodd StockerRotoruaQ2
1​
gideonclewlowNITodd StockerRotoruaQ3
1​
gideonclewlowNITodd StockerRotoruaQ4
0​
gideonclewlowNITodd StockerRotoruaQ5
1​
gideonclewlowNITodd StockerRotoruaQ6
0​
gideonclewlowNITodd StockerRotoruaQ7
0​
janebriceSIAlex MooreTimaruQ1
1​
janebriceSIAlex MooreTimaruQ2
1​
janebriceSIAlex MooreTimaruQ3
0​
janebriceSIAlex MooreTimaruQ4
0​
janebriceSIAlex MooreTimaruQ5
1​
janebriceSIAlex MooreTimaruQ6
0​
janebriceSIAlex MooreTimaruQ7
0​

Code:
[SIZE=1]
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Only Selected Columns" = Table.Unpivot(Source, {"Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7"}, "Question", "Score")
in
    #"Unpivoted Only Selected Columns"[/SIZE]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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