Protect some cells so that it dosn't accidently change by typing
Some cells contain data that are final and should not change by accidently pressing a key, for example student's marks in exam.
after entering such data I would like to be able to protect some cells, and I can unprotect later if I want. like in drawing applications you can lock a shape or layer
This is already supported in Excel. Check out the “Protect Sheet” button on the Review ribbon.
There’s also info available here: https://support.microsoft.com/en-us/kb/214081