Ranking in PivotTable

CT Witter

MrExcel MVP
Joined
Jul 7, 2002
Messages
1,212
Would like to add an extra column to my pivot table that would have a "rank" number.
Is this possible?

CT
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi,

I don't really know what you mean by "rank number",

but I have found something in John Walkenbach Excel 2002 Power Programming with VBA that might be helpful.

He talks about adding in calculated items:
eg, under your:

'First Add the Fields you want to your Pivot Table
Add Fields
. PivotFields("Budget").Orientation = xlDataField
. PivotFields("Actual")Orientatoin = xlDataField
'Now Add Calculated fields
. CalculatedFields.Add "Variance", "=Budget-Actual"
.PivotFields("Variance").Orientation=xlDataField

Good Luck
 
Upvote 0
The PivotTable is sorted in Descending order using 'Sum of Sales' (see the 'Salesperson' field's Advanced options). 'Rank' is a Calculated Field (=1) with its "Show data as" option set to "Running Total in" and it's "Base field" set to 'Salesperson'.
Book1
ABCDEFGHIJ
1SalespersonSalesData
2Larry100SalespersonSumofSalesRank
3Barry125Mary4001
4Mary300Barry3552
5Sherry250Sherry2503
6Mary100Larry1004
7Barry230GrandTotal1105
8
Sheet3

This message was edited by Mark W. on 2002-10-28 18:59
 
Upvote 0
Mark,

Is it only possible with one field? I need to rank agents by six different criteria on the pivot table: sales, revenue, conversion, etc. I guess that's too much to ask...:(

Vanessa
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,923
Members
448,533
Latest member
thietbibeboiwasaco

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