A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The macro from my previous reply should NOT be copied into the worksheet module. It won't be useful there. Instead, copy it into a standard module (the type you create by selecting Insert > Module in the Visual Basic Editor).
Then run the macro once by clicking anywhere inside it and pressing the function key F5.
After that, the cells that have a value or formula should be locked. You won't have to run this macro again.
The worksheet module (the one you activate by right-clicking on the sheet tab and selecting View Code) should contain the code from my first reply.