Protect certain cells with password

How can I protect certain cells in my sheet with a password and make them uneditable unless I enter a password? Can this be done using macros?

Hello @antably
The similar behaviour will be added to v.7.0 (not via macros, but through editor web-interface). The release of v.7.0 is planned soon.