Hello everyone,
Can someone help me out to fix and debug this code.
Sub SLA_ID()
Dim Classification As String, class As String, volume As Integer, netWDay As Integer, classification2 As Integer
Classification = Range("F2:F500").Value
volume = Range("J2:J500").Value
netWDay = Range("AH2:AH500").Value
If ((Classification = "Reorganization" & netWDay <= 5)) Then
classification2 = "Within SLA"
Else
Classification = "Beyond SLA"
If ((Classification = "CR" & netWDay = 1)) Then
classification2 = "Within SLA"
Else
Classification = "Beyond SLA"
If ((Classification = "Other Forms" & netWDay <= 1)) Then
classification2 = "Within SLA"
Else
Classification = "Beyond SLA"
If ((Classification = "MMR" & volume <= 30)) Then
class = "MMR_Low"
Else
Classification = "MMR_High"
If ((class = "MMR_Low" & netWDay <= 2)) Then
classification2 = "Within SLA"
Else
Classification = "Beyond SLA"
If ((class = "MMR_High" & netWDay <= 5)) Then
Classification = "Within SLA"
Else
Classification = "Beyond SLA"
Range("AM2:AM500").Value = class
Range("AL2:AL500").Value = classification2
End If
End Sub
The error is Block if without end if, and if I put a total number of end if at the end with the total number of If statement is my codes, the error is block if without end if. and if ever I remove it I usually have a problem with Runtime error '13': Type Mismatch.
Thank you in advance.
-Jeff
Bookmarks