I have a worksheet that has most of the cells protected, but if a user types in the word “UNPLANNED” in Col. A2, as an example, I want to unprotect B2, C2 & F2. I came up with the macro below but it doesn’t seem to work, the cells B2, C2 & F2 remain protected.
Public Sub UnprotectSheets()
If “A2” = “UNPLANNED” Then
ActiveSheet.UNPROTECT
Range(“B2,C2,F2”).Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect
End If
End Sub
Also, I want this macro to work for cells A2 to A2000 so if in A100 they type “UNPLANNED” then B100, C100 and F100 will become unprotected. I thought I’d try and get the first part to work and then tackle getting the macro to work for the rest of the cells but I can’t get that far.
Thanks for any help that can be offered.
Stats