Summing values in Pivot Table Grand Total Column

Chalklands

New Member
Joined
May 17, 2018
Messages
13
Hello,
I have a pivot table showing unit sales by month in columns, product numbers in rows with a Grand Total of the columns. For example:

Jan Feb Mar Grand Total
Product 1 25 25 0 50
Product 2 0 -10 0 -10
Product 3 10 -15 -5 -10

I want to sum all of the values that are negative (credit returns) from the grand total column in another part of the spreadsheet.

So in the example I want to return the value -20

However the Grand Total column position is not fixed as new months will be added as the year progresses so the Grand Total column will move to the right as the year progresses.
I was thinking about using HLookup. am I on the right track?

Pete
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Instead of a formula why not set another pivot table with just the row and value, then filter out positive totals?
 
Upvote 0
=SUMIF(INDIRECT(SUBSTITUTE(ADDRESS(1,MATCH("Grand Total",A1:ZZ1,0),4),"1","")&":"&SUBSTITUTE(ADDRESS(1,MATCH("Grand Total",A1:ZZ1,0),4),"1","")),"<0")

A1:ZZ1 is some all inclusive range for row 1 for instance that has the words "Grand Total".
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,085
Members
449,206
Latest member
ralemanygarcia

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
Back
Top