Hi guys,
I could really need some help on setting up some VBA criteria.
Im doing an overview of how effecient we are at responding to clients. The data i have can be seen below. Title in first row and explanation in second.
The criteria for reaching the SLA (Service level agreement) can be seen below.
So i managed to make an IF statement including AND and OR to determine the time-period. After determining the period i would like to use reaction- and resolution minutes to determine if the request fulfilled the criteria according to time-period and priority. It will however be some very long function statements, so i was wondering if it was possible to setup as sub in VBA instead like the example below. The escalation requirement is not yet relevant btw.
I could really use some help with the general setup and then the real tricky requirement which is period 2, P3-Minor, where it needs to be before 9 the following morning to comply with the service level agreement.
I could really need some help on setting up some VBA criteria.
Im doing an overview of how effecient we are at responding to clients. The data i have can be seen below. Title in first row and explanation in second.
Opened | Time opened | Created | Reaction Time | Resolved | Resolution time | Period | Made SLA |
recieved from costumer | Time used to determine period. | Created as an action | Difference between "Created" and "Opened" in minutes | date and time for closing | Diffrence between"Resolved" and "Opened" in minutes | Period depending on time of day | TRUE or False |
2019-11-01 19:02:00 | 7:02:00 PM | 2019-11-01 19:02:00 | 00 | 2020-02-03 14:25:33 | 135083 | Period 2 | False |
2019-11-25 11:36:26 | 3:30:00 AM | 2019-11-25 15:45:26 | 249 | 2020-02-04 14:25:34 | 102409 | Period 1 | TRUE |
The criteria for reaching the SLA (Service level agreement) can be seen below.
So i managed to make an IF statement including AND and OR to determine the time-period. After determining the period i would like to use reaction- and resolution minutes to determine if the request fulfilled the criteria according to time-period and priority. It will however be some very long function statements, so i was wondering if it was possible to setup as sub in VBA instead like the example below. The escalation requirement is not yet relevant btw.
VBA Code:
Sub Criteria()
Dim wsh As Worksheet, i As Long
Set wsh = ActiveSheet
i = 2
If Cells(i, "K").Value < "P1 - Critical" And _
Cells(i, "I").Value < "Period 1" And _
Cells(i, "E").Value < "60" And _
Cells(i, "G").Value < "180" Then
Cells(i, "J").Value = "TRUE"
End If
i = i + 1
End Sub
I could really use some help with the general setup and then the real tricky requirement which is period 2, P3-Minor, where it needs to be before 9 the following morning to comply with the service level agreement.