Assistance with intelligently adding up times in a time sheet where some times overlap

NHSChris

New Member
Joined
Jun 19, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all. I'm new here and found this site trying to Google the answer.

I'm looking for assistance with a time sheet. I want to do a sum which will tally up the total hours/minutes of each night on call, but it's not quite that simple.
To explain; from the minute we receive a call to the minute it's resolved we are paid for our time.

Now sometimes a call will go on for hours and whilst the clock is ticking we can be sat doing nothing whilst on other people. In these periods we should answer any other waiting calls, but if they're handled within the window of that first call we wouldn't be paid for these additional calls because the initial call would cover our time.

For example
1687176948145.png


Lines 3-5 are regular calls in succession, they are easy to calculate and add up.
Line 6 in red is where it get's tricky. That call runs for an hour, but in between I answer a second call seen on line 7 in purple.
Now in the total box seen in F1 the sum =SUM(F3:F7) is no good here because it cannot intelligently understand that line 7 should be disregarded as the time period was being covered already by line 6

So if indeed possible, how can I made the total in F9 smarter so that it looks at the times and establishes the total based on the data rather than just simple additions? I need Excel to look at data and recognises blocks where call outs are combined
 

Attachments

  • 1687176760070.png
    1687176760070.png
    15.6 KB · Views: 7

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I would add another 2 columns

E3 = '=B3'
F3 = '=C3'

E4= '=IF(B4<F3,F3,B4)'
F4= '=IF(C4<F3,F3,C4)'


drag E4 and F4 down all rows and add your time calc based on these times

any inside the previous timeframe will calc as 0 as per below


1687180970325.png
 
Upvote 0
Solution
It seems I never did answer back, apologies for that. The code above worked great, thank you.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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