0
votes

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...

1
Can you edit your question to add in a row or two of sample data?PeterT
you can find first non-worked at first and the calculate after that.your base is next to the non-worked dayAmirhossein Yari

1 Answers

2
votes

use:

=SUM(INDEX(C:C,AGGREGATE(14,6,ROW(C2:C6)/(C2:C6=0),1)):C6)

enter image description here