ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Grouping (https://www.excelbanter.com/excel-programming/393323-pivot-grouping.html)

Donica

Pivot Grouping
 
Pivot Table Grouping
If I have a defined grouping based on a set of number e.g. Field 1="Group"
Field2="Code"

Group Code
Group One = 23453
56773
23456

Group Two = 33333

When a new number is added to the pivot table data source €“ Code field
How can I group it into Group One without manually re-grouping?

Ideally an if statement to say if Code is not = to (<) 33333 then Group One,
But I dont know how to write it and more importantly where to put it.

--
Regards,

Donica


Jim Thomlinson

Pivot Grouping
 
Why not just create a new field in your source data that uses some logic to
populate the grouping. Doing it this way you can use a Vlookup (or some other
function) and you do not have to worry about doing the grouping from within
the pivot table.
--
HTH...

Jim Thomlinson


"Donica" wrote:

Pivot Table Grouping
If I have a defined grouping based on a set of number e.g. Field 1="Group"
Field2="Code"

Group Code
Group One = 23453
56773
23456

Group Two = 33333

When a new number is added to the pivot table data source €“ Code field
How can I group it into Group One without manually re-grouping?

Ideally an if statement to say if Code is not = to (<) 33333 then Group One,
But I dont know how to write it and more importantly where to put it.

--
Regards,

Donica


Donica

Pivot Grouping
 
ok this might work, but the pivot table data source is dynamic -

what your suggesting is keep the datasource tab w/ all the data hide it and
run a macro each time the source data is refreshed to have a grouping column
with a and b in it?

just want to verify your though process and make sure I can talk to hidden
tabs in code..

Regards,

Donica



"Jim Thomlinson" wrote:

Why not just create a new field in your source data that uses some logic to
populate the grouping. Doing it this way you can use a Vlookup (or some other
function) and you do not have to worry about doing the grouping from within
the pivot table.
--
HTH...

Jim Thomlinson


"Donica" wrote:

Pivot Table Grouping
If I have a defined grouping based on a set of number e.g. Field 1="Group"
Field2="Code"

Group Code
Group One = 23453
56773
23456

Group Two = 33333

When a new number is added to the pivot table data source €“ Code field
How can I group it into Group One without manually re-grouping?

Ideally an if statement to say if Code is not = to (<) 33333 then Group One,
But I dont know how to write it and more importantly where to put it.

--
Regards,

Donica



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

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