Home > Mobile >  VBA problem with object in get date from pivot
VBA problem with object in get date from pivot

Time:02-15

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

enter image description here

CodePudding user response:

If you just specify the name of the field, that should return the total,,,

Range("E20")=pt.GetPivotData("Etykiety wierszy")
  • Related