Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How to read the current grouping of a pivotfield in a pivottable

I would like to read/save with VBA the current grouping of a
pivotfield (a date either grouped by month, quarter or year) so I can
restore it later via VBA.

Anyone an idea how I can read the current grouping of pivot field?

This is a code example how the grouping can be doen with VBA. But how
can I read the group status???
' Group Date by Month, Quarter, Year
pt.PivotFields("DetailDate").LabelRange.Group Start:=True, _
End:=True, periods:= _
Array(False, False, False, False, True, True, True)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default How to read the current grouping of a pivotfield in a pivottable

you can loop through each item in the fields collection and get the
orientation, eg Page, Row,Column ot Data


"minimaster" wrote in message
...
I would like to read/save with VBA the current grouping of a
pivotfield (a date either grouped by month, quarter or year) so I can
restore it later via VBA.

Anyone an idea how I can read the current grouping of pivot field?

This is a code example how the grouping can be doen with VBA. But how
can I read the group status???
' Group Date by Month, Quarter, Year
pt.PivotFields("DetailDate").LabelRange.Group Start:=True, _
End:=True, periods:= _
Array(False, False, False, False, True, True, True)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How to read the current grouping of a pivotfield in a pivottable

That is absolutely correct. But I found no way to read the current
grouping. Can you give me hint how I can read for example the grouping
of a particular rowfield?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default How to read the current grouping of a pivotfield in a pivottable

explain what you mean by grouping? do you mean the order that the fields
appear?

"minimaster" wrote in message
...
That is absolutely correct. But I found no way to read the current
grouping. Can you give me hint how I can read for example the grouping
of a particular rowfield?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How to read the current grouping of a pivotfield in a pivottable

No,
I posted in the first posting some code that shows how you can group
data in a pivot table. Most commonly this is used to group data that
is date based data by months, by quarters or by years. This means you
have a pivot field as a row field or as a column field and instead of
letting it show up with all the individual dates you let it group for
instance by quarters. Manually you do that be rightclicking the
pivotfield label and then select "Group and Show Detail" -
"Group...".
Understood? I want to read with VBA the current grouping settings. And
I can't find a straight fwd way to do it.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How to read the current grouping of a pivotfield in a pivottable

Anyone an idea for this problem?
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default How to read the current grouping of a pivotfield in a pivottable

sorry - i missed your response. I need to do some research unless you get
an answer elsewhere

"minimaster" wrote in message
...
Anyone an idea for this problem?


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How to read the current grouping of a pivotfield in a pivottable

My research did not yield any solution yet, coming to the conclusion
that I have to develop a skunk work solution to detect, read and save
the current grouping settings for a specific pivot field item.

But still looking for ideas if anyone has one.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grab PivotField Data When Not in PivotTable DtTall Excel Programming 0 July 18th 07 07:12 PM
PivotTable grouping problem septillion Excel Discussion (Misc queries) 0 July 4th 06 01:58 AM
How to have a Macro skip code if PivotTable/PivotField is not there [email protected] Excel Programming 0 January 29th 06 11:38 AM
PivotTable, Pivotfield selective invisible, too slow MSN Excel Programming 0 November 11th 03 10:56 AM
Code for Grouping Text Values in Pivotfield Keith Young Excel Programming 1 July 17th 03 03:14 AM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"