You can lock specific cells and ranges before you protect an Excel worksheet.
Follow these steps:
Select the cells you want to lock.
On the Home tab, in the Alignment group, select the Alignment Settings arrow to open the Format Cells popup window.
On the Protection tab, select the Locked check box, and then select OK to close the popup.
Note
If you try these steps on a workbook or worksheet you haven't protected, you'll see the cells are already locked. This means that the cells are ready to be locked when you protect the workbook or worksheet.
On the Review tab in the ribbon, in the Protect group, select either Protect Sheet or Protect Workbook, and then reapply protection. See Protect a worksheet or Protect a workbook.
Tip
It's a best practice to unlock any cells that you may want to change before you protect a worksheet or a workbook, but you can also unlock them after you apply protection. To remove protection, simply remove the password.
In addition to protecting workbooks and worksheets, you can also protect formulas.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.