Transpose Columns to Rows and Repeat with each Row

sushias

New Member
Joined
Oct 1, 2019
Messages
2
Hi,

I have a table of names as columns and skills matrix as rows for each name. However, I am now trying to move each column (name) to row and repeat all of the skills matrix for each name eg shown below. I have Names listed from Col B to Col W and may keep on increasing and changing and have skills listed in Row 2 to Row 13 for Each name and may increase

Is there a macro that can be created which looks at the total number of rows and columns as the table can be dynamic and can change the number of names.

Current
TonyRonKumar
Training14147
Test549

<tbody>
</tbody>

To

NameSkillScore
TonyTraining14
TonyTest5
RonTraining14
RonTest4
Kumar
Training7
KumarTest9

<tbody>
</tbody>
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
with Power Query (Get&Transform)

SkillsTonyRonKumarSkillsNameScore
Training
14​
14​
7​
TestKumar
9​
Test
5​
4​
9​
TrainingKumar
7​
TestRon
4​
TrainingRon
14​
TrainingTony
14​
TestTony
5​

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Unpivot = Table.UnpivotOtherColumns(Source, {"Skills"}, "Attribute", "Value"),
    Sort = Table.Sort(Unpivot,{{"Attribute", Order.Ascending}}),
    Rename = Table.RenameColumns(Sort,{{"Attribute", "Name"}, {"Value", "Score"}})
in
    Rename[/SIZE]
 
Upvote 0

Forum statistics

Threads
1,214,608
Messages
6,120,500
Members
448,968
Latest member
screechyboy79

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