Getting values from Rows to Columns

purplelily

New Member
Joined
Sep 25, 2005
Messages
23
Hi! I have table here which I need to convert

From this:

PersonRating YearRating
A
2017​
2​
A
2018​
3​
A
2019​
5​
B
2017​
1​
B
2018​
2​
B
2019​
4​
C
2017​
2​
C
2018​
3​
C
2019​
1​

to this:
Person
2017​
2018​
2019​
A
B
C

I tried Pivot Table but could not pick up just the value. What formula would I need to get the values in?

Thanks so much!!

purplelily
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Pivot should work. As long as Rating contains Values. Did you try this?


1599184778013.png



Another option (again, relies on Values)

1599184910767.png
 
Upvote 0
Ah ok, of course! - the pivot table. I always overthink it when it is so simple :)
My problem was I didn't realise the what I had in the ratings were not numbers but text. Need to convert them now.
Thanks so much and also for the formula!!!

purplelily
 
Upvote 0
with Power Query and Rating as text

PersonRating YearRatingPerson201720182019
A20172A235
A20183B124
A20195C231
B20171
B20182
B20194
C20172
C20183
C20191

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Pvt = Table.Pivot(Table.TransformColumnTypes(Source, {{"Rating Year", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(Source, {{"Rating Year", type text}}, "en-GB")[#"Rating Year"]), "Rating Year", "Rating")
in
    Pvt
but in this case you cannot sum text values
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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