Sum subtotals in another row...

Excellent Excel

New Member
Joined
May 17, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi,

Suppose I have the following data:

RegionCountryRevenue A (per region)Revenue B (per country)Country totalsGeneral total
OsloNorway1.00050.00001.000
TrondheimNorway2.00050.00002.000
BergenNorway3.00050.00003.000
StockholmSweden4.00080.00004.000
GotenburgSweden5.00080.00005.000
LondenEngland4.00080.00004.000
ManchesterEngland2.00065.00002.000
CambridgeEngland1.00065.00001.000
FinalFinal195.000195.000

Columns "Region", "Country", "Revenue A (per region)" and "Revenue B (per country)" are an example of data, similar like in my real file. I need the column "General total", which is no problem (just the sum of column "Revenue A (per region)" and column "Country totals", but I can't figure out how I can get the figures of "Country totals". Country totals is just the total of each country from column "Revenue B (per country)".

Can someone please help me out with this?

Thanks a lot in advance!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Of course, if I can have a formula that gets me the 195.000 in each row, I'm happy too, then I can create another column in which I use a filter to have the 195.000 only in the row "Final". Thanks!
 
Upvote 0
Hi Excellent Excel,

I see Revenue B (per country) for Londen England is 80.000 but should it be 65.000?
Will the same Country values be grouped together, as in the example?
 
Upvote 0
Hi Toadstool,

My bad, you are right, London England should also be 65.000. (can't I correct that in my original post?) Yes, the same country values are grouped together as in column "Revenue B (per country)". So column "Country totals" should take the sum per country, so 50.000 for Norway + 80.000 for Sweden + 65.000 for England= 195.000.

Thank you!
 
Upvote 0
Does this do what you ask?

Excellent Excel.xlsx
ABCDEF
1RegionCountryRevenue A (per region)Revenue B (per country)Country totalsGeneral total
2OsloNorway1.00050.0000.0001.000
3TrondheimNorway2.00050.0000.0002.000
4BergenNorway3.00050.00050.0003.000
5StockholmSweden4.00080.0000.0004.000
6GotenburgSweden5.00080.00080.0005.000
7LondenEngland4.00080.0000.0004.000
8ManchesterEngland2.00065.0000.0002.000
9CambridgeEngland1.00065.00065.0001.000
10FinalFinal195.000
Sheet1
Cell Formulas
RangeFormula
E2:E9E2=IF(B2<>B3,D2,0)
E10E10=SUM(E2:E9)
 
Upvote 0
Hi Toadstool,

I think we have a miscommunication... Based on your reply I think I misunderstood you when you were asking if the country values will be grouped together or not. What I meant/need is the exact same column "Country Totals" as in my example, so all should be 0 except the last row "Final"). There are actually 2 options I can live with, either my "Country totals"-column looks like this:
RegionCountry totals
Oslo0
Trondheim0
Bergen0
Stockholm0
Gotenburg0
London0
Manchester0
Cambridge0
Final195.000

or it looks like this:
Region195.000
Oslo195.000
Trondheim195.000
Bergen195.000
Stockholm195.000
Gotenburg195.000
London195.000
Manchester195.000
Cambridge195.000
Final195.000

Either of these 2 options is valid for me.

Please note: this is Power Pivot, not in Excel!

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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