I wanted to get data from a pivot table using the getdate pivot function. However, I get "Application - definied or object - definied error" . I want to take "Suma końcowa" and paste it in the E20 field.
Dim ptAs PivotTable
Set pt = wbMe.Sheets("RES_MAT").PivotTables("Tabela przestawna")
wbMe.Sheets("RES_MAT").Range("E20") = pt.GetPivotData("Suma z WYCENA_PLN", "Suma końcowa").Value
CodePudding user response:
If you just specify the name of the field, that should return the total,,,
Range("E20")=pt.GetPivotData("Etykiety wierszy")