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.
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.