title: How to get the range of "Total Sum" column in a pivot table? Excel VBA
body: <p>Is there anyway to get the range of the total sum column from a pivot table using excel vba. The range I am referring to is in the screenshot below, highlighted yellow.</p>
  
  <p><img src="https://i.stack.imgur.com/RHqTo.png" alt="pivot table with the last grand total column highlighted; header and grand total row are not highlighted"></p>
  
  <p>I tried using the macro recorder in excel to see if it could help answer my question. This results in me getting this.</p>
  
  <pre><code>ActiveSheet.PivotTables("PivotTable1").PivotSelect _
      "'Sum of Unit Cost' 'Row Grand Total'", xlDataAndLabel, True
  </code></pre>
  
  <p>however this selects a range which is more than needed as seen in the screenshot.</p>
  
  <p><img src="https://i.stack.imgur.com/Pwp5X.png" alt="both the data rows and the heading row are selected"></p>
  
  <p>I could do something like offsetting what is selected by 2 rows and then maybe resizing it to fit the intended range but I was wondering if there was a more straight forward way of doing this. </p>