SLA - Based on varying priority, add time to a date excluding non working hours

L

Legacy 320862

Guest
Hi

If a job is logged at 13/03/2015 16:00:00 (a Friday), and is priority 1, then the job must be completed within 24 working hours.
If a job is logged at 13/03/2015 16:00:00 (a Friday), and is priority 2, then the job must be completed within 48 working hours.
(there are 5 priority levels)

I currently have the 'deadline' cell populated with this formula to work out, based on priority, how much time to add on to create the deadline, however, how would I exclude non working hours? :

=IF($D11=1, $C11+$K$8, IF($D11=2, C11+$K$7, IF($D11=3, C11+$K$6, IF($D11=4, C11+$K$5, IF($D11=5, C11+$K$4, " ")))))

D11 is the priority of the task (1,2,3,4 or 5)
K8 - K4 are the different times allowed to complete the task.
C11 is the time the job is logged.

I can send a spread sheet if this helps to explain?

Thank you so much for your help!
Jen
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Thought it may be! It's not a problem if this will take too much time to sort or if just too much. I think I can definitely work with what we have already, it works much better now with the benefit of your expert help. Thank you
 
Upvote 0
Hi Jenny,
Enter in E11 "Target Start Date", the "Target Completion Date" should be ok as it is, once this one is entered. Providing it works as you expect!
test with various dates & Priorities.

=IF(AND($D11<3,HOUR(MOD($C11,1)+INDEX($G$4:$G$8,MATCH($D11,$B$4:$B$8,0)))>=17),WORKDAY($C11,1)+MOD($C11+(9/24-(MOD($C11,1)))-("17:00"-MOD($C11,1))+INDEX($G$4:$G$8,MATCH($D11,$B$4:$B$8,0)),1),IF($D11=3,WORKDAY($C11,1)+MOD($C11+(9/24-(MOD($C11,1)))-("17:00"-MOD($C11,1))+INDEX($G$4:$G$8,MATCH($D11,$B$4:$B$8,0)),1),WORKDAY($C11,INDEX($G$4:$G$8,MATCH($D11,$B$4:$B$8,0)))+MOD(INDEX($G$4:$G$8,MATCH($D11,$B$4:$B$8,0)),1)+MOD($C11,1)))

Gaz
 
Upvote 0
Hi Gaz,

Genius! It works perfectly. Thank you for your time and help on this. It's spot on!
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

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