To lock a cell in Excel, you can use the "Protect Sheet" function. This will protect the cells in the sheet from being edited. To do this, select the "Protect Sheet" option from the "Review" tab. You can then select the cells that you want to protect.