To prevent accidental changes to your data, you can lock worksheet cells. When you lock selected cells, you cannot make changes to them until you unlock them. When you lock cells, users can unlock the data and make changes unless you add password protection to the worksheet. For security or confidentiality reasons, you might want to hide formulas from view. If so, you can hide or unhide them using the Protection tab in the Format Cells dialog box.
In Excel, select the cell or range you want to lock or unlock.
Click the Format menu, and then click Cell.