ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extracting Pivot Table Grand Totals (https://www.excelbanter.com/excel-programming/330792-extracting-pivot-table-grand-totals.html)

Lee Hunter

Extracting Pivot Table Grand Totals
 
I would like to interrogate the value of a grand totals field to determine
it's formatting

What is the property or object that I must use to get the value and not the
name of the field?

The following returns the name of the field (The same as the name in
parenthesis)

MsgBox PvTbl.PivotFields("Sum of Num of Occ").Value

Thanks for your help!

George Nicholson[_2_]

Extracting Pivot Table Grand Totals
 
MsgBox PvTbl.GetPivotData("Num of Occ")

Gives you the GrandTotal of the specified field. Assumes "Num of Occ" is the
actual field name in the underlying datasource, rather than the "column
header" in the table itself.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Lee Hunter" wrote in message
...
I would like to interrogate the value of a grand totals field to determine
it's formatting

What is the property or object that I must use to get the value and not
the
name of the field?

The following returns the name of the field (The same as the name in
parenthesis)

MsgBox PvTbl.PivotFields("Sum of Num of Occ").Value

Thanks for your help!




Lee Hunter

Extracting Pivot Table Grand Totals
 
Thanks George.

Exactly what I was looking for.
Lee

"George Nicholson" wrote:

MsgBox PvTbl.GetPivotData("Num of Occ")

Gives you the GrandTotal of the specified field. Assumes "Num of Occ" is the
actual field name in the underlying datasource, rather than the "column
header" in the table itself.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Lee Hunter" wrote in message
...
I would like to interrogate the value of a grand totals field to determine
it's formatting

What is the property or object that I must use to get the value and not
the
name of the field?

The following returns the name of the field (The same as the name in
parenthesis)

MsgBox PvTbl.PivotFields("Sum of Num of Occ").Value

Thanks for your help!






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

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