# Formula to calculate working hours between two datestamps

#### tommythemook

##### New Member
Hi

Background: I have a excel sheet in which I track work allocation. In one cell I record the date and time that an email is received from a customer. In another cell I record the date and time that the email is allocated to a staff member for a response to be issued. There is an SLA of 2 working hours for the email to be allocated to a staff member.

Problem: In order to measure performance against SLA I need a formula which returns the number of working hours in between the receipt of the email and the time of allocation to a staff member. It needs to take into account the working hours of 8am to 8pm Monday to Friday and 8am to 6pm on Saturday.

Example: Cell A1 timestamps the receipt of an email as 17/07/2010 17:00 (Saturday). Cell A2 timestamps the allocation of the email to staff member as 19/07/2010 10:00. The formula in cell A3 needs to return 3 working hours. 1 hour up to 6pm on Sat, no hours Sun, then 2 hours on Monday morning.

I cant work out how to do this and would greatly appreciate any and all suggestions.

Many thanks

Tom

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,657
Messages
5,838,632
Members
430,558
Latest member
Krampus

### 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.

### Which adblocker are you using?

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

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