I'm looking for a code to extract entries out of a pivot table and put them in a new table. I'd like to be able to fill every cell in the new table.
I have used getpivotdata manually in Excel and it works fine. When I try to record it as a macro things get complicated.
Once I have it working as a macro I need to fill down to the last row in the table and across to the last column. The rows and column titles correspond to the titles in the pivot table so I'd like to just use the cell references (like $a2 and b$1) instead of the row/column titles in the formula so it can apply to all cells in the table.
A particular question from all of this would be: How can I translate a GETPIVOTDATA excel formula into VBA?
And once I've done that, how can I get it to apply down to the last rowna d across to the las column?
I have used getpivotdata manually in Excel and it works fine. When I try to record it as a macro things get complicated.
Once I have it working as a macro I need to fill down to the last row in the table and across to the last column. The rows and column titles correspond to the titles in the pivot table so I'd like to just use the cell references (like $a2 and b$1) instead of the row/column titles in the formula so it can apply to all cells in the table.
A particular question from all of this would be: How can I translate a GETPIVOTDATA excel formula into VBA?
And once I've done that, how can I get it to apply down to the last rowna d across to the las column?