Exceling locking cell

%3CLINGO-SUB%20id%3D%22lingo-sub-3246550%22%20slang%3D%22en-US%22%3EExceling%20locking%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3246550%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20a%20way%20for%20locking%20cells%20in%20excel%20for%20example%20I%20am%20doing%20a%20training%20and%20you%20cant%20see%20the%202%20days%20of%20stuff%20until%20the%20second%20day%20when%20it%20starts%20.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3246550%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Is there a way for locking cells in excel for example I am doing a training and you cant see the 2 days of stuff until the second day when it starts . 

1 Reply

@Xeryar 

Private Sub Worksheet_Change(ByVal Target As Range)
Me.Unprotect "1234"
  If Target = Me.Range("B4") And Target = "1 - 3 days" Then
    Me.Range("A10:A15").Locked = True
  Else
    Me.Range("A10:A15").Locked = False
  End If
Me.Protect "1234"
End Sub