Counting Different Scenarios in a Dynamic Pivot Table


Board Regular
Jul 28, 2005
I have a sheet with the following information:
Column K = Days
Column L = Amount
Column U = Customer (Can be duplicate entries, but will total on pivot table)
Column X = Period (There are on two periods 16 or 17)
Column AM = Area
Column AP = Category (There are only two categories 1 or 2)

The pivot table is laid out as follows:
Page = Area
Column = Period
Row = Category and then Customer
Data = Count of Customer, Sum of Days, Sum of Amount

I need to count a few items in the pivot table but the formulas have to adjust with the “Page” selection of the pivot table.
It can count the pivot table or the data sheet, that does not matter as long as it counts.

Definitions of Counts:
New Customer = Someone that is a period 17 and NOT a period 16
Old Customer = Someone that is a period 16 and NOT a period 17
Return Customer = Someone that is a period 16 AND a period 17

I need to produce totals of the above and then also break it down by their Categories.
Example: There’s a total of 17 New Customers but 7 are Category 1 and 10 are Category 2.
For Return Customers I need to Count who stayed longer in Period 16 than in 17 (Therefore the value in the Days column on the pivot table is greater in Period 16 than 17.) and then vice-versa for longer stay in Period 17.

Is this clear and is it possible? Any help is greatly appreciated.

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Watch MrExcel Video

Forum statistics

Latest member