Pivot Table - How to copy sum value onto another sheet

jw2022

New Member
Joined
Apr 28, 2022
Messages
11
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
  3. Web
I have set up 3 excel sheets in related to budgeting/expenses.

The first contains the full budget (say Sheet A for example);
The second contains the expenses (Sheet B);
and the Third contains the pivot table (Sheet C), which helps to group together all the different expenses from Sheet B into categories.

The pivot table is used to separate all the expenses into their relevant category and provide a sum total of the amount spent within that particular category. I want to copy this sum total amount to Sheet A. At first, I set a simple formula
Excel Formula:
='Sheet C'!C5
. But the problem is, every time I add a new expense to Sheet B, the sum total value will be moved down to say C6 and so on. Is there some kind of formula I can use to copy the sum total value to Sheet A?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Georgiboy

Active Member
Joined
Nov 7, 2008
Messages
325
Maybe the below will help:
VBA Code:
Sub test()
    Dim pt As PivotTable
    Dim GrandTotal
    
    Set pt = Sheet1.PivotTables(1)
    GrandTotal = pt.DataBodyRange.Cells(pt.DataBodyRange.Cells.Count).Value
    MsgBox GrandTotal
End Sub
 

jw2022

New Member
Joined
Apr 28, 2022
Messages
11
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
  3. Web
Sorry, I forgot to mention that I am using Google Sheets for this rather than excel...
 

Alex Blakenburg

MrExcel MVP
Joined
Feb 23, 2021
Messages
5,073
Office Version
  1. 365
Platform
  1. Windows
That is a totally different ball game. I don't think that many on this forum will be across that.
In Excel I would suggest using GetPivotData, as it happens Google Sheets calls it the same thing. So just google that terminology for Google Sheets.
Here is a video that might get you started (8 mins)
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
39,339
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 

jw2022

New Member
Joined
Apr 28, 2022
Messages
11
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
  3. Web
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Have also posted here - Pivot Table - How to copy sum value onto another sheet
 

Forum statistics

Threads
1,176,013
Messages
5,900,883
Members
434,857
Latest member
lowiscoetzee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top