PDA

View Full Version : Accessing a PivotTable Data via VBAX



Banixxx
12-14-2007, 01:54 PM
I have a Pivot table called "Day 1" and it is used to sort Teams and the Complience in the form of 'Incomplete' and 'Complete' and calculates their Percentages

Example of PIVIOT TABLE DATA

Incomp. | Comp.
Team A 12% | 88%
Team B 10% | 90&
Team C 50% | 50%

I want to use VBAX to Pull these calculates and throw them lets say in Sheet1 after find the Team in Sheet 1 is will then put the data in th corresponding Cell.

So my questions is there a way to access these Pivot Calculations and totals via VBAX and if so can you give me an example to start from?

XLGibbs
12-15-2007, 02:03 PM
You can use the GETPIVOTDATA() Formula.

See the excel help file for that function.

Banixxx
12-17-2007, 08:51 AM
You can use the GETPIVOTDATA() Formula.

See the excel help file for that function.

THis sint working because the Pivot Tables are on a Seperate Sheet.

The Pivot Tables are on a Sheet Called "Pivot Tables" and I want to access PT "Day_1" and get the Information. I can do it on the Same sheet just fine but when i go to my sheet called "Table" and try to get the data it doesnt work.

I tried GETPIVOTDATA('Daily Pivots'!Day_1, "DESIRED FIELD" but get a ?#NAME error cause it cant find the Table. Is this possible to access a Pivot Table form another Sheet?

Banixxx
12-17-2007, 09:51 AM
THis sint working because the Pivot Tables are on a Seperate Sheet.

The Pivot Tables are on a Sheet Called "Pivot Tables" and I want to access PT "Day_1" and get the Information. I can do it on the Same sheet just fine but when i go to my sheet called "Table" and try to get the data it doesnt work.

I tried GETPIVOTDATA('Daily Pivots'!Day_1, "DESIRED FIELD" but get a ?#NAME error cause it cant find the Table. Is this possible to access a Pivot Table form another Sheet?

I figured this one out finally i found some information in a old book.