ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Complex sum (https://www.excelbanter.com/excel-discussion-misc-queries/134093-complex-sum.html)

Greshter

Complex sum
 
Hi All,

I am trying to complete a complex sum and need some assistance. I need
to sum a series of areas based on an id field. That may sound easy
enough using either subtotals or a pivot table however I need to make
cumulative sums as well. To give you an idea of what I am trying to
here is a sample of the data I am using:

ID Sub_ID Area 1 Area 2
S1 S1_1 25,885.26 7,765.6
S1 S1_1 120,209.57 36,062.9
S1 S1_1 4,620,365.19 1,386,109.6
S1 S1_1 3,580,189.81 358,019.0
S1 S1_2 4,104,332.39 1,231,299.7
S1 S1_3 14,428.65 1,442.9
S1 S1_3 1,023,600.61 307,080.2
S1 S1_3 7,561,036.12 2,268,310.8
S10 S10_1 1,958,449.03 195,844.9
S10 S10_2 194,607.66 58,382.3
S10 S10_2 4,724,115.45 472,411.5
S10 S10_3 5,728,707.20 572,870.7
S11 S11_1 1,554,378.27 155,437.8
S11 S11_2 1,640,711.70 164,071.2
S11 S11_3 1,774,008.61 177,400.9


Bernard Liengme

Complex sum
 
With ID in A column, Sub-ID in B, Area 1 in C, Area 2 in D

Sum of Area-1 for all S1_1: =SUMIF(B2:B99,"S1_1",C2:c99)
If you put the text S1_1 in K1 then use =SUMIF(B2:B99, K1, C2:c99)
Put S1_2 in K2 and copy formula
etc
Then all up the results of all formula to get cumulative for ID = S1

Or explain better what is needed
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Greshter" wrote in message
ups.com...
Hi All,

I am trying to complete a complex sum and need some assistance. I need
to sum a series of areas based on an id field. That may sound easy
enough using either subtotals or a pivot table however I need to make
cumulative sums as well. To give you an idea of what I am trying to
here is a sample of the data I am using:

ID Sub_ID Area 1 Area 2
S1 S1_1 25,885.26 7,765.6
S1 S1_1 120,209.57 36,062.9
S1 S1_1 4,620,365.19 1,386,109.6
S1 S1_1 3,580,189.81 358,019.0
S1 S1_2 4,104,332.39 1,231,299.7
S1 S1_3 14,428.65 1,442.9
S1 S1_3 1,023,600.61 307,080.2
S1 S1_3 7,561,036.12 2,268,310.8
S10 S10_1 1,958,449.03 195,844.9
S10 S10_2 194,607.66 58,382.3
S10 S10_2 4,724,115.45 472,411.5
S10 S10_3 5,728,707.20 572,870.7
S11 S11_1 1,554,378.27 155,437.8
S11 S11_2 1,640,711.70 164,071.2
S11 S11_3 1,774,008.61 177,400.9





All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com