Subtotal(s) range in Pivot Tables. Is it Missing?

M

marwan

Many specific ranges in the PivotTable object (and the relevant
objects) are specified such as the DataBodyRange ,DataLabelRange
,TableRange1 and

TableRange2 for the Pivot Table Object and DataRange,LabelRange for the
PivotField and PivotItem Objects.
The problem is that I searched the Object Model for a property of the
PivotField or PivotTable objects that represents the Subtotal(s) range
for a specific PivotField but I couldn't find such a property.
The only way I found to refer to a subtotal range (If Exists) of a
pivot field is to "select it" using the PivotSelect method of the
PivotTable object.
But as we learned it is not a good idea to select a range to do
something with it (give it a specific format for example) unless we
certainly want to select it.
What is the best way to handle the Subtotal range of a PivotField?
Thanks.
 
D

Debra Dalgleish

As far as I know, that's the only way to work with the subtotal ranges.

If you turn off screen updating at the start of the code, and return to
the active cell after formatting, users shouldn't notice much negative
impact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top