the table below is just a small segment of a much larger table. the first instance per person each week is normal time, any other instances that week are overtime.
so what im looking to do is sum the total number of hours in normal time, and sum the total overtime per person (ill just take the total normal hours away from total hours per person for overtime total per person)
my sticking point is summing on the first instances per person per week
anyone got any ideas? thanks in advance
table:
[TABLE="width: 239"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]date[/TD]
[TD]person[/TD]
[TD]hours[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]3[/TD]
[TD]17.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]4[/TD]
[TD]20.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]5[/TD]
[TD]22.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]5[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]6[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]6[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]6[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]7[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]7[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]7[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]7[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]8[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]8[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]8[/TD]
[TD]5.00[/TD]
[/TR]
</tbody>[/TABLE]
so what im looking to do is sum the total number of hours in normal time, and sum the total overtime per person (ill just take the total normal hours away from total hours per person for overtime total per person)
my sticking point is summing on the first instances per person per week
anyone got any ideas? thanks in advance
table:
[TABLE="width: 239"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]date[/TD]
[TD]person[/TD]
[TD]hours[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]1[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]40.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]19.50[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]2[/TD]
[TD]4.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]3[/TD]
[TD]17.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]4[/TD]
[TD]20.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]5[/TD]
[TD]22.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]5[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]29/7/18[/TD]
[TD]6[/TD]
[TD]40.00[/TD]
[/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