Hello
I need to sum up minutes, if any of the specified time stamp (workbreak) falls within a time range.
The specified time stamp cannot be hardcoded for the specific date. It needs to be only time as it is part of a standard work schedule.
The time range can span several dates and the time stamp must be counted for every passing date.
So far I have this, which works if both start and end time is on the same date:
=SUMPRODUCT((INT(A5)+$H$3:$H$4>=A5)*(INT(A6)+$H$3:$H$4<=A6)*$I$3:$I$4)
I've also tried sumifs, which also works if start and end time is on same date:
=SUMIFS($I$3:$I$4;$H$3:$H$4;">="&MOD(A5;1);$H$3:$H$4;"<="&MOD(A6;1))
A5 is start time
A6 is end time
H3:H4 is two timestamps which needs to be found
I3:I4 is minutes which needs to be added for each timestamp
The difference between the to methods is that with SUMPROCUCT I add the date to the time stamp. In the SUMIFS I remove the date from the start/end time, both to get the same format for time range and time stamp.
I'm working in Excel365
Can you help me, please?
Bookmarks