Reputation: 3
I have a column of hours worked on a jobsite. Column A is the date, in columns E-AM I have different crew names and the hours they each worked each day. I want to find the sum of those hours worked but only after the last non-worked (0 hours) day. For example, I have a crew in column C who worked 7 hours monday, 6 hours tuesday, 0 hours wednesday, 5 hours thursday and 8 hours friday. I want only the sum from the last non-worked day, so 5+8=13. The number of columns and rows will only continue to grow so I figured one equation would be better than hand calculating each crew hours...
Upvotes: 0
Views: 61
Reputation: 152605
use:
=SUM(INDEX(C:C,AGGREGATE(14,6,ROW(C2:C6)/(C2:C6=0),1)):C6)
Upvotes: 2