As user interaction on an Excel sheet becomes required, there is often a great deal of information that you do not wish to allow the user to see. This information may include formulas or conditional messaging. Also, you may wish to prevent users from adding or removing information from the worksheet beyond what you specify.
In this recipe, you will learn how to lock cells in your worksheet to only allow specific interactions.
To begin, we will need to ensure cells are locked. By default cells are locked in Excel; however, it is still good practice to verify that cells were not inadvertently unlocked:
1. Begin by selecting all the cells in the worksheet that you wish to prevent from interacting. Once all cells have been selected, right-click within one of the highlighted cells. From the pop-up menu, choose Format Cells...:
2. From the Format Cells window that appears, make sure the Locked checkbox has been selected, and then choose OK:
After clicking...