How to Lock Formulas in Excel

Configurare noua (How To)

Situatie

You can easily edit a formula through the formula bar or directly in the cell. While this makes it convenient to create formulas in Excel, it comes with a few disadvantages as well. By default, all the cells are locked in Excel. Only when you protect the locked cells can you truly restrict the user from making changes. This also means that if a cell is not locked and you protect it, the user would be able to make changes.

Solutie

Pasi de urmat
  • Select all the cells and unlock these.
  • Select all the cells that have formulas (using Go To Special).
  • Lock these selected cells.
  • Protect the worksheet.
Select All the Cells and Unlock it

As I mentioned, only the cells that are locked as well as protected can truly be restricted. If all the cells are locked, and I protect the entire worksheet, it would mean a user can’t change anything. But we only want to lock (restrict access) to the cells that have formulas in it. To do this, we first need to unlock all the cells and then select and lock only those cells that have formulas in it.

  • Select all the cells in the worksheet (use the keyboard shortcut Control + A).
  • Use the keyboard shortcut Control + 1 (hold the Control key and then press 1). This will open the format cells dialog box.
  • In the format cells dialog box, select the Protection tab.

How to Lock Formulas in Excel - Protection tab

  • Uncheck the ‘Locked’ option.

How to Lock Formulas in Excel - Unchek Locked

  • Select All the Cells that Have Formulas

Now that all the cells have been unlocked, we need to make sure that the cells that have formulas are locked.

To do this, we need to first select all the cells with formulas. Here are the steps to select all the cells that have formulas:

  • Select all the cells in the worksheet (use Control + A).
  • Go to Home and within the Editing group, click on Find & Select.

From the drop-down, select Go to Special.

How to Lock Formulas in Excel - Go to special

In the Go To Special dialog box, select Formulas.

Now that we have selected the cells with formulas, we need to go back and lock these cells (enable the lock property that we disabled in step 1). Once we do this, protecting the worksheet would lock these cells that have formulas, but not the other cells.

Here are the steps to Lock Cells with Formulas:

  • With the cells with formulas selected, press Control + 1 (hold the Control key and then press 1).
  • In the format cells dialog box, select the Protection tab.
  • Check the ‘Locked’ option.
  • Click ok.

Tip solutie

Permanent

Voteaza

(5 din 7 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?