|Click in the box above the row numbers to select all cells.|
Format...Cells...Protection tab...uncheck the Locked option.
Right click the sheet tab for the sheet and choose View Code.
Paste this into the window that opens:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Locked = True
If a cell in a Protected sheet is not locked, it is not Protected. Therefore, even if the sheet is Protected, users can still enter data in the unlocked cells.
The Worksheet_Change code above will un-Protect the sheet, Lock the cell(s) that was(were) changed and then Protect the sheet again.
Once they are Locked, users can't enter data in those cells until the sheet is un-Protected. All other unlocked cells can still be edited - but just once.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.