sort by different cells. NOT by row

mspincus

New Member
Joined
Jul 30, 2010
Messages
37
I am in a Golf Pool at work. You have to add up the scores and the lowest wins. We have 4 players and then add their scores up. is there a way to add the scores and then sort all totals and list leaders

Exp. Team Scott thursday Friday Saturday Sunday

Gollfer 1 -5 -2 3 -4

Golfer 2 4 -2 1 0

Golfer 3 -5 -1 -1 -1

Golfer 4 -5 0 -2 -1

There are many teams. So I need to add Thursday total which is -11 and place in order all the teams for thursday then add those to friday and rank all the teams and then saturday etc.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi mspincus,

In regards to your issue, I have come up with the following solution. Note: I am using Excel 2013 PowerPivot, so ensure you have PowerPivot enabled (Excel 2010 requires a Microsoft add-in).

Assumptions:
  • I had to normalize the raw data so that Team Name was another column
  • The calculation for the team score is a SUM, not an AVG


  1. Select your whole data
  2. Format as table (Home > Format as Table)
  3. Name your table (Design > TableName)
  4. Add to data model (Powerpivot > Add to Data Model)
  5. View Powerpivot interface if not already in focus (PowerPivot > Manage)
  6. At the end of the first row, add in the calculation
    =RANKX(ALL(GolfScores), CALCULATE(SUM([Thur]), FILTER(ALL(GolfScores), [Team Name]=EARLIER([Team Name]))), , 1, Dense)
  7. Name the column 'Thurs Rank'
  8. In the calculation area under 'Thurs Rank', add the calculation
    Thurs Team:=LOOKUPVALUE([Team Name], [Thurs Rank], 1)
  9. Bring your spreadsheet back into focus
  10. On the row directly after the table under the Thur column, add the following calculation
    =CUBEVALUE("ThisWorkbookDataModel", "[Measures].[Thurs Team]")
  11. Repeat steps 4 to 8, but for Fri, Sat and Sun


Result:
Team NameGolfer NameThurFriSatSun
ScottGolfer 1-5-23-4
ScottGolfer 24-210
ScottGolfer 3-5-1-1-1
ScottGolfer 4-50-2-1
RobertGolfer 53-4-5-2
RobertGolfer 6104-2
RobertGolfer 7-1-1-5-1
RobertGolfer 8-2-1-50
JackGolfer 9-23-4-5
JackGolfer 10-2104
JackGolfer 11-1-1-1-5
JackGolfer 120-2-1-5
ScottRobertRobertJack

<tbody>
</tbody>


To provide the below requirement, I have done the following;
So I need to add Thursday total which is -11 and place in order all the teams for thursday then add those to friday and rank all the teams and then saturday etc.



  1. View Powerpivot interface if not already in focus (PowerPivot > Manage)
  2. Create pivot table (Home > PivotTable)
  3. Add Thurs Rank and Team Name to Rows quadrant
  4. Add Thurs to Values quadrant (optional)
  5. Reformat the table layout
    1. Select the Design tab
    2. Remove subtotals (Subtotals > Do Not Show Subtotals)
    3. Remove grand totals (Grand Totals > Off for Rows and Columns)
    4. Change table to tabular layout (Report Layout > Show in Tabular Form)
    5. Repeat row labels (Report Layout > Repeat All Item Labels)
    6. As an optional extra, change the pivot table style from the list of PivotTable Styles selection (I prefer Pivot Style Medium 6)
  6. Repeat steps 2 to 5, but for Fri, Sat and Sun

Result:
Thurs RankTeam NameSum of Thur
1Scott-11
2Jack-5
3Robert1

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

Fri RankTeam NameSum of Fri
1Robert-6
2Scott-5
3Jack1


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

Sat RankTeam NameSum of Sat
1Robert-11
2Jack-6
3Scott1

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

Sun RankTeam NameSum of Sun
1Jack-11
2Scott-6
3Robert-5

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


If you want to get fancy, instead of selecting pivot table option, select 'Four Charts' and do steps 3 to 5.


Here is my example file:
https://www.dropbox.com/s/l9hsxs7pydxselm/Golf Example.xlsx


Kim.
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,159
Members
448,948
Latest member
spamiki

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