Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getpivotdata in VB

Status
Not open for further replies.

opiess

Technical User
Sep 29, 2005
5
US
Is there a way to use the getpivotdata excel function in a vb function? I'm trying to write a function that pulls data from a pivot table based on the function inputs.

For example, I'd like to enter this in excel:
=myfunction(sheet2!a5,b1,b2,b3)
where sheet2!a5 is a pivot table
cell b1: time of day
cell b2: location
cell b3: average temperature

and it returns the data from the table.

I am just trying to get rid of the concatination and quotes and spaces for b1,b2,b3.
 
Have a look at the PivotTable.GetPivotData method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top