Sum First intances based on 2 criteria

cra5hdown

New Member
Joined
Oct 4, 2016
Messages
19
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:
datepersonhours
29/7/18140.00
29/7/18119.50
29/7/1814.00
29/7/1811.00
29/7/18240.00
29/7/18219.50
29/7/1824.00
29/7/18317.00
29/7/18420.00
29/7/18522.00
29/7/1851.00
29/7/18640.00
29/7/18619.50
29/7/1864.00
29/7/18740.00
29/7/18719.50
29/7/1874.00
29/7/1871.00
29/7/18840.00
29/7/1884.00
29/7/1885.00

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Maybe:

ABCDEF
1datepersonhoursRegular hoursOvertime
229/7/18140259106
329/7/18119.5
429/7/1814
529/7/1811
629/7/18240
729/7/18219.5
829/7/1824
929/7/18317
1029/7/18420
1129/7/18522
1229/7/1851
1329/7/18640
1429/7/18619.5
1529/7/1864
1629/7/18740
1729/7/18719.5
1829/7/1874
1929/7/1871
2029/7/18840
2129/7/1884
2229/7/1885

<tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
E2=SUMPRODUCT(C2:C22,--(MATCH(B2:B22,B2:B22,0)=ROW(B2:B22)-ROW(B2)+1))
F2=SUM(C2:C22)-E2

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Perhaps I wasnt clear with what i was after, the required output is:

Person 1 (hrs) (OT hrs)
Person 2 (hrs) (OT hrs)
Person 3 (hrs) (OT hrs)
etc
there are dozens of Persons, and ill have to do this regularly

there maybe two lines per person per date, the first line is normal hrs, the second line with the same date is that persons overtime
 
Upvote 0
I misunderstood, that's even easier:


ABCDEFGHIJK
1datepersonhoursRegular hoursOvertimePersonRegular HoursOvertime
229/7/1814025910614024.5
329/7/18119.524023.5
429/7/18143170
529/7/18114200
629/7/182405221
729/7/18219.564023.5
829/7/1824
929/7/1831774024.5
1029/7/184208409
1129/7/18522
1229/7/1851
1329/7/18640
1429/7/18619.5
1529/7/1864
1629/7/18740
1729/7/18719.5
1829/7/1874
1929/7/1871
2029/7/18840
2129/7/1884
2229/7/1885

<tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
I2=VLOOKUP(H2,$B$2:$C$22,2,0)
J2=SUMIFS(C:C,B:B,H2)-I2

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top