title: VBA problem adding value with getpivotdate
body: <p>I have a piece of a macro that will extract data from a table, but I would like to add a sumif result to it. however, I get an error &quot;Application definied or object - definied error&quot;. the same function get pivot data works only the problem is + Application.</p>
  <pre><code>Dim pt As PivotTable
  Set pt = wbMe.Sheets(&quot;INFO&quot;).PivotTables(&quot;Tabela przestawna1&quot;)
  wbMe.Sheets(&quot;Tabela_COREP&quot;).Range(&quot;J5&quot;) = pt.GetPivotData(&quot;Suma z EXP_PIERWOTNA&quot;, &quot;RODZAJ_AKTYWÓW&quot;, &quot;Pozostałe aktywa&quot;, &quot;CRD_AC&quot;, &quot;06&quot;, &quot;CRD_CCF&quot;, 1, &quot;CRD_RWG&quot;, 0).Value + Application.WorksheetFunction.SumIf(wbMe.Sheets(&quot;nostra&quot;).Range(&quot;A1:A&quot;), &quot;PKO BP S.A.&quot;, wbMe.Sheets(&quot;nostra&quot;).Range(&quot;F1:F&quot;))
  </code></pre>