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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
45,114
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
21100781125006
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,101,935
Messages
5,483,779
Members
407,410
Latest member
catherinejoy

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top