lfilleur
lfilleur

Reputation: 49

Calculation hours a week

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 ?

Here is a google sheets link

Upvotes: 0

Views: 46

Answers (1)

Scott Craner
Scott Craner

Reputation: 152505

In C2 put:

=IF(A2<>A3,SUMIF(A:A,A2,B:B),"")

And copy down

enter image description here


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

Related Questions