Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Then Exit Sub
Dim Derlg&, C As Range
With Application: .ScreenUpdating = False: .Calculation = xlManual: .EnableEvents = False: End With
Derlg = Cells(Rows.Count, "G").End(xlUp).Row
ActiveSheet.Unprotect
Cells.Locked = False
For Each C In Range("g1:g" & Derlg)
If IsNumeric(C) And C.Value > 0 Then
C.Offset(, -5).Locked = True
End If
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
With Application: .EnableEvents = True: .Calculation = xlAutomatic: .ScreenUpdating = True: End With
End Sub