With monday.comâ€™s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

I have a spreadsheet with 2 fields, with date and time. See below

Severity Closed.TIME Re-Assigned.TIME

Sev 3 2/2/2012 11:41 1/31/2012 16:09

Work Order 2/13/2012 10:07 12/22/2011 15:46

Work Order 3/5/2012 11:14 1/9/2012 18:12

Work Order 2/14/2012 11:28 1/18/2012 9:10

Sev 3 2/13/2012 12:13 2/6/2012 9:51

Sev 3 2/1/2012 7:46 1/30/2012 9:11

Sev 3 2/1/2012 14:46 1/31/2012 16:32

Sev 4 2/2/2012 17:11 1/30/2012 17:43

I want to calculate the total time it took to close the ticket. I assume I am going to create a formula using the 2 fields(re-assigned and closed)? I then want to look at the first column and see what severity it is, and compare the time to another table (See below) If I am within the time frame, I pass SLA, if not I fail. For example if the total time is less the 24 hours and Column A has Sev3, then I want the formula to say "pass" if its over 24 hours, it should say "fail". Any assistance would be greatly appreciated!

Time Table:

Sev1 4 hours

Sev2 8 hours

sev3 24 hours

sev4 48 hours

Severity Closed.TIME Re-Assigned.TIME

Sev 3 2/2/2012 11:41 1/31/2012 16:09

Work Order 2/13/2012 10:07 12/22/2011 15:46

Work Order 3/5/2012 11:14 1/9/2012 18:12

Work Order 2/14/2012 11:28 1/18/2012 9:10

Sev 3 2/13/2012 12:13 2/6/2012 9:51

Sev 3 2/1/2012 7:46 1/30/2012 9:11

Sev 3 2/1/2012 14:46 1/31/2012 16:32

Sev 4 2/2/2012 17:11 1/30/2012 17:43

I want to calculate the total time it took to close the ticket. I assume I am going to create a formula using the 2 fields(re-assigned and closed)? I then want to look at the first column and see what severity it is, and compare the time to another table (See below) If I am within the time frame, I pass SLA, if not I fail. For example if the total time is less the 24 hours and Column A has Sev3, then I want the formula to say "pass" if its over 24 hours, it should say "fail". Any assistance would be greatly appreciated!

Time Table:

Sev1 4 hours

Sev2 8 hours

sev3 24 hours

sev4 48 hours

What do you want to do with the "Work Order" rows?

=IF(COUNTA(B2,C2)<>2,"",IF

This formula assumes that A2, B2 and C2 are the severity, closed time and re-assigned time, while LookupTable is a named range with severity in the first column and allowable time in the second.

If the lookup table has time in hours (rather than days), you may need to multiply by 24:

=IF(COUNTA(B2,C2)<>2,"",IF

The bit with COUNTA is to make sure that you have entries in both closed time and re-assigned time before making the Pass/Fail test.

Corrected workbook...

27646642.xlsx

27646642.xlsx

Private Sub CommandButton1_Click()

Dim i As Integer

Dim rStart As Range

Dim rEnd As Range

Dim diff As Integer

For i = 1 To Range("A1").End(xlDown).Of

Set rStart = Range("B" & i)

Set rEnd = Range("C" & i)

diff = DateDiff("h", rEnd, rStart)

Select Case Range("A" & i)

Case "Sev1"

If diff < 4 Then

Range("D" & i).Value = "pass"

Else

Range("D" & i).Value = "fail"

End If

Case "Sev2"

If diff < 8 Then

Range("D" & i).Value = "pass"

Else

Range("D" & i).Value = "fail"

End If

Case "Sev3"

If diff < 24 Then

Range("D" & i).Value = "pass"

Else

Range("D" & i).Value = "fail"

End If

Case "Sev4"

If diff < 48 Then

Range("D" & i).Value = "pass"

Else

Range("D" & i).Value = "fail"

End If

Case Else

Range("D" & i).Value = Range("A" & i).Value

End Select

Next

End Sub

=IF(OR(COUNTIF($I$2:$I$5,A

Returning the % of allowable:

=IF(F2="","",24*(B2-C2)/VL

Hours-Q27646642.xlsx

For example if my SLA percentage is 68% I would want the output to be < 75%. So far so good. I will test the oher examples out once I have tested this sample sheet. See sample below to see how it looks now... In the SLA meter is where I want the % to show as it is below. Instead of the % just have it display the above.

SLA Meter Severity

< 50% Sev 3

< 50% Sev 3

Not displaying the % on the fails is a quick fix, all that's needed is to remove that part of the if formula.

As for bracketing the results, that would take another series of nested if's with our current structure.

Will that wrap up this question?

Thanks

Scot

All Courses

From novice to tech pro — start learning today.

27646642.xlsx