- Right-click on the sheet tab
- Select View Code from the pop-up context menu
- Paste the code below in the VBA edit window
- Change the password "Secret" to suit.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count = 1 Then If Not Intersect(Range("F3:F10002"), Target) Is Nothing Then Me.Protect Password:="Secret", UserInterfaceOnly:=True Select Case Target.Value Case "FCL": Target.EntireRow.Range("K1:L1").Locked = False Case Else: Target.EntireRow.Range("K1:L1").Locked = True End Select End If End If End Sub
Bookmarks