ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Table - Selecting the GrandTotal Column in VBA xl2003 (https://www.excelbanter.com/excel-programming/381902-pivot-table-selecting-grandtotal-column-vba-xl2003.html)

dgrant_jr

Pivot Table - Selecting the GrandTotal Column in VBA xl2003
 
Hi All

can anyone help with the vba code for selecting either the GrandTotal Column
or Row in a pivot table. I seem to be able to select just about anything
else but these.


--


Debra Dalgleish

Pivot Table - Selecting the GrandTotal Column in VBA xl2003
 
If you use the macro recorder while you manually select the totals, it
should create some sample code for you. For example:

ActiveSheet.PivotTables(1).PivotSelect _
"'Row Grand Total'", xlDataAndLabel, True

ActiveSheet.PivotTables(1).PivotSelect _
"'Column Grand Total'", xlDataAndLabel, True

dgrant_jr wrote:
can anyone help with the vba code for selecting either the GrandTotal Column
or Row in a pivot table. I seem to be able to select just about anything
else but these.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


dgrant_jr

Pivot Table - Selecting the GrandTotal Column in VBA xl2003
 
Hi Debra

Thanks alot, i had tried it previously but it only showed as a selected
range.

Realised i didnt have the Enable Selection option selected.

Thanks for a such a quick reply.

Dennis


--



"Debra Dalgleish" wrote:

If you use the macro recorder while you manually select the totals, it
should create some sample code for you. For example:

ActiveSheet.PivotTables(1).PivotSelect _
"'Row Grand Total'", xlDataAndLabel, True

ActiveSheet.PivotTables(1).PivotSelect _
"'Column Grand Total'", xlDataAndLabel, True

dgrant_jr wrote:
can anyone help with the vba code for selecting either the GrandTotal Column
or Row in a pivot table. I seem to be able to select just about anything
else but these.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



Debra Dalgleish

Pivot Table - Selecting the GrandTotal Column in VBA xl2003
 
You're welcome, and thanks for describing how you fixed the problem.

dgrant_jr wrote:
Hi Debra

Thanks alot, i had tried it previously but it only showed as a selected
range.

Realised i didnt have the Enable Selection option selected.

Thanks for a such a quick reply.

Dennis




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 01:37 AM.

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