Reputation: 99
Sum vertically upto last empty cell in column A Show sum on the first row where the name resides on column B might contain 0 or more blank cells
What I am willing to achieve is shown below
I have tried Using this formula =IF(B28="",SUM(B29:INDEX(B29:B,MATCH(TRUE,(B29:B=""),0))),"")
on column C, I am able to achieve close to similar result but I have to keep single blank cell before every name shown below
Upvotes: 0
Views: 231
Reputation: 7783
This arrayformula in cell E2 should work:
=Arrayformula(IF(A2:A="",,SUMIF(LOOKUP(ROW(A2:A),FILTER(ROW(A2:A),A2:A<>"")),LOOKUP(ROW(A2:A),FILTER(ROW(A2:A),A2:A<>"")),B2:B)))
The criteria and criterion arrays are made of a lookup that shows the last row number for any given row with a name in it.
Upvotes: 1