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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

ElectricSkywalker

Board Regular
Joined
May 27, 2002
Messages
112
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
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
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
 

vrolim

New Member
Joined
Apr 29, 2009
Messages
11
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
 

Forum statistics

Threads
1,144,326
Messages
5,723,724
Members
422,512
Latest member
MHau5

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
Top