I have a spreadsheet with data entered in columns A thru N. Columns are locked except for F,G,K,M, and N which data must be entered manually. In column O, I have a drop down box with "closed" in it. I want to lock the rest of the row (so if row in row 9, for example it would lock F9,G9,K9,M9, and N9) once the word "closed" is inserted with the drop down box. Anyone know how I could do this? I am currently using a macro but it doesn't work unless the sheet is unlocked. Thanks in Advance.
Macro currently used:
Private Sub Worksheet_Change(ByVal Target As Range)
'if more than 1 cell is changed or changed cell is not
'in column O, end macro (do nothing)
If Target.Cells.Count > 1 Or _
Intersect(Target, [O:O]) Is Nothing Then Exit Sub
'unprotect the sheet
ActiveSheet.Unprotect
'if value in column O is "Closed," lock all cells in that row
If Target = "Closed" Then Rows(Target.Row).Locked = True
'protect the sheet
ActiveSheet.Protect
End Sub
Bookmarks