Hi Fellow Excel'ers,
I'm stumped on how to get the desired result with date and time formula in document provided.
I think I've put in enough info on this document to explain the issue but will try here too.
I am needing to have the formulas correctly calculate the required response and rectification date/time during business hours based on a given date to have suppliers attend jobs on time and measure their KPI's.
The issue I have is the formula is calculating the hours correctly, but it is not giving them the full business days allowance if the time the work order was issued falls outside business times.
Not sure if I've done a good job explaining but if anyone can help I'm happy to answer any questions. The spreadsheet provided should clarify hopefully.
EXPORT SHEET:
PUBLIC HOLIDAYS SHEET:
I'm stumped on how to get the desired result with date and time formula in document provided.
I think I've put in enough info on this document to explain the issue but will try here too.
I am needing to have the formulas correctly calculate the required response and rectification date/time during business hours based on a given date to have suppliers attend jobs on time and measure their KPI's.
The issue I have is the formula is calculating the hours correctly, but it is not giving them the full business days allowance if the time the work order was issued falls outside business times.
Not sure if I've done a good job explaining but if anyone can help I'm happy to answer any questions. The spreadsheet provided should clarify hopefully.
EXPORT SHEET:
MASTER EM SLA Report w incorrect data.xlsx | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
1 | Priority | Response Status | Rectification Status | Work Order Issued Date Time | Response Due Date | Completion Due Date Time | ||||||||||||
2 | P4 | Completed | In Progress | 2/3/2023 2:10:47 PM | 2/20/2023 2:10:47 PM | 2/23/2023 2:10:47 PM | ||||||||||||
3 | P4 | Completed | In Progress | 2/3/2023 2:11:20 PM | 2/20/2023 2:11:20 PM | 2/23/2023 2:11:20 PM | ||||||||||||
4 | P3 | Overdue | In Progress | 2/7/2023 5:41:40 PM | 2/13/2023 9:41:40 AM | 2/16/2023 9:41:40 AM | ||||||||||||
5 | P3 | Completed | Completed | 2/11/2023 11:40:32 AM | 2/15/2023 11:40:32 AM | 2/20/2023 11:40:32 AM | ||||||||||||
6 | P3 | Completed | Completed | 2/12/2023 10:03:38 AM | 2/15/2023 10:03:38 AM | 2/20/2023 10:03:38 AM | ||||||||||||
7 | P3 | Completed | Completed | 2/12/2023 11:20:18 AM | 2/15/2023 11:20:18 AM | 2/20/2023 11:20:18 AM | ||||||||||||
8 | P4 | Completed | Completed | 2/18/2023 12:13:01 AM | 3/3/2023 12:13:01 AM | 3/8/2023 12:13:01 AM | ||||||||||||
9 | P3 | Overdue | In Progress | 2/21/2023 10:43:55 AM | 2/24/2023 10:43:55 AM | 3/1/2023 10:43:55 AM | ||||||||||||
10 | P4 | Overdue | In Progress | 2/23/2023 9:47:31 AM | 3/9/2023 9:47:31 AM | 3/14/2023 9:47:31 AM | ||||||||||||
11 | P4 | Overdue | In Progress | 2/23/2023 11:00:49 AM | 3/9/2023 11:00:49 AM | 3/14/2023 11:00:49 AM | Current Formulas in column E and F | |||||||||||
12 | P4 | Overdue | In Progress | 2/23/2023 11:02:27 AM | 3/9/2023 11:02:27 AM | 3/14/2023 11:02:27 AM | ||||||||||||
13 | P4 | Overdue | In Progress | 2/23/2023 3:12:49 PM | 3/9/2023 3:12:49 PM | 3/14/2023 3:12:49 PM | ||||||||||||
14 | P4 | Completed | In Progress | 2/24/2023 2:08:56 PM | 3/10/2023 2:08:56 PM | 3/15/2023 2:08:56 PM | ||||||||||||
15 | P4 | Overdue | In Progress | 2/24/2023 3:31:34 PM | 3/10/2023 3:31:34 PM | 3/15/2023 3:31:34 PM | ||||||||||||
16 | P4 | Overdue | In Progress | 2/24/2023 3:46:37 PM | 3/10/2023 3:46:37 PM | 3/15/2023 3:46:37 PM | ||||||||||||
17 | P3 | Completed | Completed | 2/25/2023 5:31:51 AM | 3/1/2023 5:31:51 AM | 3/6/2023 5:31:51 AM | ||||||||||||
18 | P3 | Completed | Completed | 2/25/2023 7:34:53 AM | 3/1/2023 7:34:53 AM | 3/6/2023 7:34:53 AM | ||||||||||||
19 | P3 | Completed | Completed | 2/26/2023 5:34:34 AM | 3/1/2023 5:34:34 AM | 3/6/2023 5:34:34 AM | ||||||||||||
20 | P3 | Completed | Completed | 2/26/2023 6:51:51 AM | 3/1/2023 6:51:51 AM | 3/6/2023 6:51:51 AM | ||||||||||||
21 | P4 | In Progress | In Progress | 2/27/2023 4:06:00 PM | 3/14/2023 8:06:00 AM | 3/17/2023 8:06:00 AM | ||||||||||||
22 | P4 | In Progress | In Progress | 2/27/2023 4:30:41 PM | 3/14/2023 8:30:41 AM | 3/17/2023 8:30:41 AM | ||||||||||||
23 | P4 | In Progress | In Progress | 2/27/2023 4:48:00 PM | 3/14/2023 8:48:00 AM | 3/17/2023 8:48:00 AM | ||||||||||||
24 | P4 | In Progress | In Progress | 2/28/2023 2:40:33 PM | 3/14/2023 2:40:33 PM | 3/17/2023 2:40:33 PM | ||||||||||||
25 | P4 | In Progress | In Progress | 2/28/2023 6:30:47 PM | 3/15/2023 10:30:47 AM | 3/20/2023 10:30:47 AM | ||||||||||||
26 | P4 | In Progress | In Progress | 2/28/2023 6:37:14 PM | 3/15/2023 10:37:14 AM | 3/20/2023 10:37:14 AM | ||||||||||||
27 | P3 | Completed | In Progress | 2/28/2023 7:58:59 PM | 3/6/2023 11:58:59 AM | 3/9/2023 11:58:59 AM | ||||||||||||
28 | ||||||||||||||||||
29 | For P3 (Column A) | |||||||||||||||||
30 | Column E needs to be 3 full business days after Column D if Column D lands on a public holiday or weekend (business day starts at 8am and ends 4pm) OR 24 business hours from date/time of Column F if Column D is during business hours. | |||||||||||||||||
31 | Column F needs to be 6 full business days after Column D if Column D lands on a public holiday or weekend (business day starts at 8am and ends 4pm) OR 48 business hours from date/time of Column F if Column D is during business hours. | |||||||||||||||||
32 | ||||||||||||||||||
33 | For P4 (Column A) | |||||||||||||||||
34 | Column E needs to be 10 full business days after Column D if Column D lands on a public holiday or weekend (business day starts at 8am and ends 4pm) OR 80 business hours from date/time of Column F if Column D is during business hours. | |||||||||||||||||
35 | Column F needs to be 13 full business days after Column D if Column D lands on a public holiday or weekend (business day starts at 8am and ends 4pm) OR 104 business hours from date/time of Column F if Column D is during business hours. | |||||||||||||||||
36 | ||||||||||||||||||
37 | Desired Results of above table as below. | |||||||||||||||||
38 | ||||||||||||||||||
39 | Priority | Response Status | Rectification Status | Work Order Issued Date Time | Response Due Date | Completion Due Date Time | ||||||||||||
40 | P4 | Completed | In Progress | 2/3/2023 2:10:47 PM | 2/17/2023 2:10:47 PM | 2/22/2023 2:10:47 PM | ||||||||||||
41 | P4 | Completed | In Progress | 2/3/2023 2:11:20 PM | 2/17/2023 2:11:20 PM | 2/22/2023 2:11:20 PM | ||||||||||||
42 | P3 | Overdue | In Progress | 2/7/2023 5:41:40 PM | 2/10/2023 4:00:00 PM | 2/15/2023 4:00:00 PM | ||||||||||||
43 | P3 | Completed | Completed | 2/11/2023 11:40:32 AM | 2/15/2023 4:00:00 PM | 2/20/2023 4:00:00 PM | ||||||||||||
44 | P3 | Completed | Completed | 2/12/2023 10:03:38 AM | 2/15/2023 4:00:00 PM | 2/20/2023 4:00:00 PM | ||||||||||||
45 | P3 | Completed | Completed | 2/12/2023 11:20:18 AM | 2/15/2023 4:00:00 PM | 2/20/2023 4:00:00 PM | ||||||||||||
46 | P4 | Completed | Completed | 2/18/2023 12:13:01 AM | 3/3/2023 4:00:00 PM | 3/8/2023 4:00:00 PM | ||||||||||||
47 | P3 | Overdue | In Progress | 2/21/2023 10:43:55 AM | 2/24/2023 10:43:55 AM | 3/1/2023 10:43:55 AM | ||||||||||||
48 | P4 | Overdue | In Progress | 2/23/2023 9:47:31 AM | 3/9/2023 9:47:31 AM | 3/14/2023 9:47:31 AM | ||||||||||||
49 | P4 | Overdue | In Progress | 2/23/2023 11:00:49 AM | 3/9/2023 11:00:49 AM | 3/14/2023 11:00:49 AM | ||||||||||||
50 | P4 | Overdue | In Progress | 2/23/2023 11:02:27 AM | 3/9/2023 11:02:27 AM | 3/14/2023 11:02:27 AM | ||||||||||||
51 | P4 | Overdue | In Progress | 2/23/2023 3:12:49 PM | 3/9/2023 3:12:49 PM | 3/14/2023 3:12:49 PM | ||||||||||||
52 | P4 | Completed | In Progress | 2/24/2023 2:08:56 PM | 3/10/2023 2:08:56 PM | 3/15/2023 2:08:56 PM | ||||||||||||
53 | P4 | Overdue | In Progress | 2/24/2023 3:31:34 PM | 3/10/2023 3:31:34 PM | 3/15/2023 3:31:34 PM | ||||||||||||
54 | P4 | Overdue | In Progress | 2/24/2023 3:46:37 PM | 3/10/2023 3:46:37 PM | 3/15/2023 3:46:37 PM | ||||||||||||
55 | P3 | Completed | Completed | 2/25/2023 5:31:51 AM | 3/1/2023 4:00:00 PM | 3/6/2023 4:00:00 PM | ||||||||||||
56 | P3 | Completed | Completed | 2/25/2023 7:34:53 AM | 3/1/2023 4:00:00 PM | 3/6/2023 4:00:00 PM | ||||||||||||
57 | P3 | Completed | Completed | 2/26/2023 5:34:34 AM | 3/1/2023 4:00:00 PM | 3/6/2023 4:00:00 PM | ||||||||||||
58 | P3 | Completed | Completed | 2/26/2023 6:51:51 AM | 3/1/2023 4:00:00 PM | 3/6/2023 4:00:00 PM | ||||||||||||
59 | P4 | In Progress | In Progress | 2/27/2023 4:06:00 PM | 3/13/2023 4:00:00 PM | 3/16/2023 4:00:00 PM | ||||||||||||
60 | P4 | In Progress | In Progress | 2/27/2023 4:30:41 PM | 3/13/2023 4:00:00 PM | 3/16/2023 4:00:00 PM | ||||||||||||
61 | P4 | In Progress | In Progress | 2/27/2023 4:48:00 PM | 3/13/2023 4:00:00 PM | 3/16/2023 4:00:00 PM | ||||||||||||
62 | P4 | In Progress | In Progress | 2/28/2023 2:40:33 PM | 3/14/2023 2:40:33 PM | 3/17/2023 2:40:33 PM | ||||||||||||
63 | P4 | In Progress | In Progress | 2/28/2023 6:30:47 PM | 3/14/2023 4:00:00 PM | 3/17/2023 4:00:00 PM | ||||||||||||
64 | P4 | In Progress | In Progress | 2/28/2023 6:37:14 PM | 3/14/2023 4:00:00 PM | 3/17/2023 4:00:00 PM | ||||||||||||
65 | P3 | Completed | In Progress | 2/28/2023 7:58:59 PM | 3/3/2023 4:00:00 PM | 3/8/2023 4:00:00 PM | ||||||||||||
66 | ||||||||||||||||||
67 | ||||||||||||||||||
68 | ||||||||||||||||||
69 | ||||||||||||||||||
70 | ||||||||||||||||||
71 | ||||||||||||||||||
72 | ||||||||||||||||||
73 | ||||||||||||||||||
74 | ||||||||||||||||||
75 | ||||||||||||||||||
76 | ||||||||||||||||||
77 | ||||||||||||||||||
78 | ||||||||||||||||||
79 | ||||||||||||||||||
80 | ||||||||||||||||||
81 | ||||||||||||||||||
82 | ||||||||||||||||||
83 | ||||||||||||||||||
84 | ||||||||||||||||||
85 | ||||||||||||||||||
86 | ||||||||||||||||||
87 | ||||||||||||||||||
88 | ||||||||||||||||||
89 | ||||||||||||||||||
90 | ||||||||||||||||||
91 | ||||||||||||||||||
Export |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E27 | E2 | =IF(A2="P3",IF((MOD(D2,1)+MOD(24,8)/24)>2/3+0.0000000001,WORKDAY(D2,INT(24/8)+1,'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(24,8)/24-1/3,WORKDAY(D2,INT(24/8),'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(24,8)/24),IF(A2="P4",IF((MOD(D2,1)+MOD(80,8)/24)>2/3+0.0000000001,WORKDAY(D2,INT(80/8)+1,'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(80,8)/24-1/3,WORKDAY(D2,INT(80/8),'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(80,8)/24),IF(ISBLANK(A2),""))) |
F2:F27 | F2 | =IF(A2="P3",IF((MOD(D2,1)+MOD(48,8)/24)>2/3+0.0000000001,WORKDAY(D2,INT(48/8)+1,'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(48,8)/24-1/3,WORKDAY(D2,INT(48/8),'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(48,8)/24),IF(A2="P4",IF((MOD(D2,1)+MOD(104,8)/24)>2/3+0.0000000001,WORKDAY(D2,INT(104/8)+1,'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(104,8)/24-1/3,WORKDAY(D2,INT(104/8),'Public Holidays'!$B$1:$B$12)+MOD(D2,1)+MOD(104,8)/24),IF(ISBLANK(A2),""))) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
D39:D65 | Cell Value | duplicates | text | NO |
PUBLIC HOLIDAYS SHEET:
MASTER EM SLA Report w incorrect data.xlsx | ||||
---|---|---|---|---|
A | B | |||
1 | Day after New Year’s Day | 1/01/2023 | ||
2 | 3/01/2023 | |||
3 | 2/01/2023 | |||
4 | Waitangi Day | 6/02/2023 | ||
5 | Good Friday | 7/04/2023 | ||
6 | Easter Monday | 10/04/2023 | ||
7 | Anzac Day | 25/04/2023 | ||
8 | King’s Birthday | 5/06/2023 | ||
9 | Matariki | 14/07/2023 | ||
10 | Labour Day | 23/10/2023 | ||
11 | Christmas Day | 25/12/2023 | ||
12 | Boxing Day | 26/12/2023 | ||
13 | ||||
14 | ||||
Public Holidays |