I have used to following code to self adjust cells within a WS based upon the output in others. The issue is that when I insert a new "Blank" row I get an error code everytime. I understand why I just don't understand how to fix it any suggestions would be appreciated:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("M2:M" & Range("M" & Rows.count).End(3)(1).Row)) Is Nothing Then
Select Case Target.Value
Case Is = "Full Compliance"
Cells(Target.Row, "S").Value = "D"
Cells(Target.Row, "G").Value = Cells(Target.Row, "G").Value + 1095
Case Is = "Partial Compliance"
Cells(Target.Row, "S").Value = "C"
Cells(Target.Row, "G").Value = Cells(Target.Row, "G").Value + 365
Case Is = "Non-Compliance[Absent]"
Cells(Target.Row, "S").Value = "A"
Cells(Target.Row, "G").Value = Cells(Target.Row, "G").Value + 30
Case Is = "Non-Compliance[Imminent Danger]"
Cells(Target.Row, "S").Value = "B"
Cells(Target.Row, "G").Value = Cells(Target.Row, "G").Value + 180
End Select
End If
End Sub
Bookmarks