By default, every cell of excel is locked but this does not work till you choose Tools | Protection | Protect Sheet.
If some cells are allowed to be edited and some are not (as you mentioned in your post), then do the followings:
1.Press Ctrl + A (which will select all worksheet).
2.Right click on selection.
3.Choose Format Cells | Protection (you will notice that Locked checkbox is
ticked.
4.Untick it & press OK.
5.Now Select cells which are not allowed to be edited. You could make a
multiple selection by pressing Ctrl and selecting. One you have finished
selecting cell, Right clicked on selection | format cells | Protection | Tick
the locked checkbox.
6.Go to Tools | Protection and Enter your password.
Editing the highlighted cells will not be allowed until sheet is unprotected.
Best Regards,
S h a n