Cellgrids Cellgridsby LearnWithRinkesh
Home › Excel tutorials › How to Protect Formulas in Excel

How to Protect Formulas in Excel While Allowing Data Entry

By Rinkesh Shah · Business Analyst, 8 years in data · Updated 2026-10-31

▶ Video coming soon

You can share a workbook so that people can type in the input cells, but cannot change or delete your formulas.

How locking works in Excel

Every cell is locked by default, but locking does nothing until you protect the sheet. So the process is: unlock the cells people should edit, then protect the sheet.

Step by step

  1. Select the cells where users should type (the input cells).
  2. Press Ctrl + 1 to open Format Cells and go to the Protection tab.
  3. Untick Locked and click OK.
  4. Go to Review → Protect Sheet.
  5. Choose a password (optional but recommended) and decide what users can do, such as select unlocked cells, format cells or sort.
  6. Click OK.

Hide formulas too

Before protecting, select the formula cells, open Format Cells → Protection and tick Hidden. After the sheet is protected, the formulas no longer show in the formula bar.

Select the formula cells quickly

Press F5 → Special → Formulas to select every cell that contains a formula.

Important notes

Worked example

Select cells users may edit, press Ctrl+1 → Protection and untick Locked. Then Review → Protect Sheet and set a password. Formula cells stay locked. To hide formulas, tick Hidden before protecting.

Common mistakes

Frequently asked questions

How do I unprotect?

Review → Unprotect Sheet and enter the password.

Can I allow sorting?

Yes, tick Sort in the Protect Sheet options.

Is the password safe?

No, treat it as a guard against mistakes, not hackers.

Practice this online, free

Reading is only half of learning Excel. Cellgrids is a free place for online Excel practice: solve Excel formula exercises in a live spreadsheet, prepare for Excel interview questions, and work through business case studies built for data analytics and business analytics roles.

Practice these formulas: IF, SUM.

Start Excel practice → Case studies