Group sum in each row according to some condition set in columns

Sadia1989

New Member
Joined
Oct 3, 2019
Messages
8
Hi Peter,

I appreciate your previous help. Sorry for replying after a long time.

I meant the green and blue colored portion (in your previous reply #8 ) as the end segment. The summing range would be same for V1sum, V2sum and V3sum. Therefore, even though the blue cells sum 4+2=6, it cannot be sum starting from 0. Because the other two sums in the same range did not reach 5 (green cells).

Thanks,

Sadia
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,639
Office Version
365
Platform
Windows
This seems to produce the results for the samples given, but I'm not particularly confident that I have understood well enough that it will work for all data circumstances. If not please post another small sample that demonstrates any failure and provide further explanation regarding such failure.

These 2 formulas copied down and then the columns of formulas copied to the other corresponding columns.

Excel Workbook
ABCDEFGHIJK
1Road_IDSeg_numV1V1cumV1sumV2V2cumV2sumV3V3cumV3sum
2110
0
78
1125006
31200780125006
413353578141525116
51420557872225346
61523787832525266
7162290079910
8174693370910
91839947711010
1019332322151114
11110032302154514
121110323021561114
13112172023791501114
14113323232111511214
15114023234151521414
162122120013119
172246123313129
182339124713469
1924312122913179
20250121241313299
Cumulative Sums (5)
 

Watch MrExcel Video

Forum statistics

Threads
1,099,078
Messages
5,466,488
Members
406,484
Latest member
kaksolver

This Week's Hot Topics

Top