Alle Zeilen, die in Spalte "B" das Wort "local" enthalten, sollen geschützt werden (=locked).
Vielen Dank im Voraus!
Sub LockLocal()
Dim i As Long, lz As Long
lz = Range("B65536").End(xlUp).Row
For i = 1 To lz
Cells(i, 2).Locked = Cells(i, 2).Value = "local"
Next i
End Sub
Sub LockLocal()
Dim i As Long, lz As Long
lz = Range("B65536").End(xlUp).Row
For i = 1 To lz
If Cells(i, 2).Value = "local" Then
Cells(i, 2).EntireRow.Locked = True
End If
Next i
End Sub