Hi
something like this should do the job:
Put this in the sheet module where your data are.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cl As Range
If Not Intersect(Columns("F:F"), Target) Is Nothing Then 'at least one cell in column F has changed
Me.Unprotect 'Password:="Your_Password" 'Uncomment this if you have password protected sheet
For Each cl In Target
If cl.Column = 6 Then
If cl.Value = "Died" Then
cl.Offset(0, 17).Resize(1, 3).Locked = False
Else
cl.Offset(0, 17).Resize(1, 3).Locked = True
End If
End If
Next cl
Me.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ', Password:="Your_Password" 'Uncomment this if you want password protected sheet
End If
End Sub
Note:
1.The cells that will be editable should be unlocked in advance e.g. range A:F
2.cells in W:Y should be Locked unlocked properly in advance, i.e. if you have Died in F2, then W2:Y2 should be set to unlocked
3.After running the macro your sheet will be protected, without password and only cell that are unlocked will be editable and selectable.
2. Prot
Bookmarks