ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB regarding pivot tables (https://www.excelbanter.com/excel-programming/309740-vbulletin-regarding-pivot-tables.html)

marina madeleine

VB regarding pivot tables
 
I had posted this before and I know it may be a challenging one, but I
am wondering if anyone might know how to do this:

Is there a way to program advanced formulas into an excel pivot table.
For example, if you have created a pivot table and it has a drop down
menu for age groupings from which users can select from a wide range of
age groupings, for example:

age 1-5
age 5-10
age 15-20
age 20-25

Is there a way to program the pivot table to do the following:

1) identify if the "standard set" of age groupings: age 5-10, age
15-20, age 25-25 are in the selection in the drop down list
2) if the all the "standard set" age groupings are there, aggregate
them all to make one age grouping "age 5-25"
3) add this new calculated age grouping to the pivot table and the list
in the drop down list for age groupings (but only if all of the age
groupings are there).
4) if all the the "standard set" age groupings are not there to do an
aggregation, then do nothing for that age grouping aggregation.

Looking forward to your suggestions.

Marina Madeleine

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

VB regarding pivot tables
 
The easiest way to do this would be on the source data with a dummy column.

--
Regards,
Tom Ogilvy

"marina madeleine" wrote in message
...
I had posted this before and I know it may be a challenging one, but I
am wondering if anyone might know how to do this:

Is there a way to program advanced formulas into an excel pivot table.
For example, if you have created a pivot table and it has a drop down
menu for age groupings from which users can select from a wide range of
age groupings, for example:

age 1-5
age 5-10
age 15-20
age 20-25

Is there a way to program the pivot table to do the following:

1) identify if the "standard set" of age groupings: age 5-10, age
15-20, age 25-25 are in the selection in the drop down list
2) if the all the "standard set" age groupings are there, aggregate
them all to make one age grouping "age 5-25"
3) add this new calculated age grouping to the pivot table and the list
in the drop down list for age groupings (but only if all of the age
groupings are there).
4) if all the the "standard set" age groupings are not there to do an
aggregation, then do nothing for that age grouping aggregation.

Looking forward to your suggestions.

Marina Madeleine

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




ana64

VB regarding pivot tables
 
Tom,
I regularly do this. Add a dummy column to the source data. However,
my problem becomes when I try to drill. If I use one of the dummy
columns, it limits my drilling. I add two columns to the source table
(Item2, Salesrep2)which has about 18-20 columns. If I use both 'added'
columns on the row area, I can not do any further drilling. Is there a
way around this?

For example - I have Item, Item2, description,
Customer,Salesrep,salesrep2
being Item2 and Salesrep2 the added columns.

I can drop in the row area
Salesrep2, Item2
but not
Salesrep2, Item2, Description


If I move Salesrep2 to the Page area, then I can view
item2, Description

Your suggestions are appreciated? The problem does not happen when I
use the original columns from the Pivot Table.

Ana

"Tom Ogilvy" wrote in message ...
The easiest way to do this would be on the source data with a dummy column.

--
Regards,
Tom Ogilvy

"marina madeleine" wrote in message
...
I had posted this before and I know it may be a challenging one, but I
am wondering if anyone might know how to do this:

Is there a way to program advanced formulas into an excel pivot table.
For example, if you have created a pivot table and it has a drop down
menu for age groupings from which users can select from a wide range of
age groupings, for example:

age 1-5
age 5-10
age 15-20
age 20-25

Is there a way to program the pivot table to do the following:

1) identify if the "standard set" of age groupings: age 5-10, age
15-20, age 25-25 are in the selection in the drop down list
2) if the all the "standard set" age groupings are there, aggregate
them all to make one age grouping "age 5-25"
3) add this new calculated age grouping to the pivot table and the list
in the drop down list for age groupings (but only if all of the age
groupings are there).
4) if all the the "standard set" age groupings are not there to do an
aggregation, then do nothing for that age grouping aggregation.

Looking forward to your suggestions.

Marina Madeleine

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com