You can lock cells in Excel if you want to protect cells from being edited.
However, locking cells has no effect until you protect the worksheet. So when you protect a worksheet, all your cells (=worksheet) will be locked. As a result, if you want to lock a cell, you have to unlock all cells first, lock a cell, and then protect the sheet.
1. Select all cells.
2. Right click, and then click Format Cells.
3. On the Protection tab, uncheck the Locked check box and click OK.
4. Right click cell, and then click Format Cells.
5. On the Protection tab, check the Locked check box and click OK.
Note: if you also check the Hidden check box, users cannot see the formula in the formula bar when they select cell A2.
6. Protect the sheet.
Cell is locked now. To edit cell, you have to unprotect the sheet.