Thursday, 6 September 2018

Excel: Grouping and sorting rows


This is an example of the data I have:


Country     Score   University  
a 5
1
2
3
b 7
1
2

I want to be able to hide/unhide the university rows and sort by the score column while keeping the universities under their countries.


Is there any way to do this? I tried grouping but it didn't do what I want.



Answer



There is now way to do this with the data in the structure that you have.


It can be done with a minor adjustment:




  • Make a "Table" in Excel with the following columns: Country, Score, University, like this:



    +-------------+-------------+-------------+
    | Country | Score | University |
    +-------------+-------------+-------------+
    | a | 5 | 1 |
    | a | 5 | 2 |
    | a | 5 | 3 |
    | b | 7 | 1 |
    | b | 7 | 2 |
    | ... | ... | ... |
    +-------------+-------------+-------------+


  • You can use the table to sort and filter.



  • Create a Pivot table based on this table (Insert, Pivot table, select the table above) and you can do any analysis by drag-and-dropping fields in de row/column headers or in de value field.


Good luck!


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...