|The first thing you need to do is to Unlock all of the cells where you want to allow users to enter data.|
Then you should protect the sheet with a password. I'll use "secret" in this example.
Next, right click on the sheet tab for the sheet in which you want this happen and choose View Code.
Paste this code into the pane that opens:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Locked = True
Finally, you should password protect the macro from viewing so that no one can see the password. Note: The macro protection won't take effect until you save and close the workbook.
Keep in mind that all users will need to have their Excel appliocation set to allow macros to run or none of this will work. Before you ask, No, you can not enable macros on another person's machine via a macro. Think of the security risks if that were allowed.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.