Reputation: 49
I am looking for a formula to calculate hours a week according to a column.
For example, I have 5 rows "week 1", 5 rows "week 2" and 5 rows "week3" with for each hours a day. I'd like to have the sum of hours a week for each week.
Do you have some ideas ?
Upvotes: 0
Views: 46
Reputation: 152505
In C2 put:
=IF(A2<>A3,SUMIF(A:A,A2,B:B),"")
And copy down
The above assumes that the weeks are grouped together, If they are not then use:
=IF(A2<>A3,SUM($B$2:$B2)-SUM($C$1:$C1),"")
Which will only total by groups.
Upvotes: 2