Sub UnLockG()
Dim c As Range
ActiveSheet.Unprotect Password:="Adam"
For Each c In Range("G18:G50").SpecialCells(xlCellTypeBlanks)
If c.Offset(, -4).Value <> "" Then
c.Locked = False
Else
c.Locked = True
End If
End If
ActiveSheet.Protect Password:="Adam"
End Sub
Sub UnLockG()
Dim c As Range
ActiveSheet.Unprotect Password:="Adam"
For Each c In Range("G18:G50").SpecialCells(xlCellTypeBlanks)
If c.Offset(, -4).Value <> "" Then
c.Locked = False
Else
c.Locked = True
End If
Next c
ActiveSheet.Protect Password:="Adam"
End Sub
Sub UnLockG()
Dim Blanks As String
ActiveSheet.Unprotect Password:="Adam"
With Range("G18:G50").SpecialCells(xlCellTypeBlanks)
.Locked = False
Intersect(.Cells, .Offset(, -4).SpecialCells(xlCellTypeBlanks).EntireRow).Locked = True
End With
ActiveSheet.Protect Password:="Adam"
End Sub