Lesson 97 of 104 4 min Updated Completed

How to Lock Cells in Excel

Locking cells stops others from editing them. It takes two steps: mark the cells as Locked, then protect the sheet. Locking has no effect until the sheet is protected.

Lock all cells

Every cell is Locked by default, so protecting the sheet locks all of them. To check:

  1. Select all cells (Ctrl + A, or the triangle at the top-left of the sheet).

    All cells selected

  2. Right-click and click Format Cells (Ctrl + 1).

    Choosing Format Cells

  3. On the Protection tab, Locked is ticked.

    The Locked box on the Protection tab

  4. Click OK, then protect the sheet.

To edit the cells again, unprotect the sheet (the password here is protect).

Lock only specific cells

First unlock everything, then lock just the cells you want.

  1. Select all cells, press Ctrl + 1, untick Locked on the Protection tab, and click OK.

  2. Select the cells to lock, here B1:B7.

    B1:B7 selected

  3. Press Ctrl + 1, tick Locked, and click OK.

    Ticking Locked for B1:B7

  4. Protect the sheet.

Result: B1:B7 are locked, while the rest of the sheet can still be edited.

Lock only formula cells

This lets people type in the input cells but not break your formulas.

  1. Select all cells, press Ctrl + 1, untick Locked, and click OK.

  2. On the Home tab, click Find & Select.

    Find & Select on the Home tab

  3. Click Go To Special.

    Choosing Go To Special

  4. Choose Formulas and click OK.

    Choosing Formulas in Go To Special

    Excel selects every cell with a formula.

    All formula cells selected

  5. Press Ctrl + 1 and tick Locked on the Protection tab. Tick Hidden too if you don’t want others to see the formulas in the formula bar.

    Ticking Locked and Hidden for the formula cells

  6. Click OK, then protect the sheet.

Result: all formula cells are locked. To change them later, unprotect the sheet first. And remember your password!