The first step is to select the cells that you want to lock. You can do this by clicking and dragging your mouse over the cells, or by using the keyboard shortcuts Shift+arrow keys.
Select the Cells You Want to Lock
Once you have selected the cells, go to the "Home" tab in the Excel ribbon.
In the "Protection" menu, select the "Lock Cells" option.
Select "Lock Cells"
To activate the cell locking, you now need to protect the worksheet. Go to the "Review" tab and click on "Protect Worksheet".
Protect the Worksheet
You can optionally enter a password to protect the worksheet from unauthorized changes. If you enter a password, you will need to enter it again to unlock the cells.