Protecting cells, formulas, and formatting in Excel and Google Sheets stops other people from editing, deleting, or accidentally changing the parts of a spreadsheet you want to keep intact. You protect the sheet or workbook, and you choose which cells stay locked and which remain editable. This article explains the built-in protection features in both programs, how to set them up correctly, and how to avoid the most common mistakes that leave your formulas vulnerable.
Formula
The calculator above is a pace calculator, not a spreadsheet tool. It works out your average pace and speed from a finish time and distance. The formulas are:
- Pace (min/km) = finish time (minutes) ÷ distance (km)
- Speed (km/h) = distance (km) ÷ (finish time (minutes) ÷ 60)
Where t is the finish time in minutes, and d is the distance in kilometres. The pace is the time it takes to cover one kilometre; the speed is how many kilometres you cover in one hour.
Worked Example
Using the default values from the calculator: finish time = 50 minutes, distance = 10 km.
- Pace = 50 ÷ 10 = 5.00 min/km
- Speed = 10 ÷ (50 ÷ 60) = 10 ÷ 0.8333 = 12.00 km/h
The calculator shows 5.00 min/km and 12.00 km/h, matching the manual calculation.
Why Protect Cells at All?
Spreadsheets are fragile. One accidental keystroke in the wrong cell can overwrite a formula, delete a conditional formatting rule, or shift a whole column. Protection is the difference between a file that survives contact with other people and one that slowly breaks. You might want to protect cells because:
- You are sharing a budget or tracker and only want others to fill in the yellow input cells.
- You have spent hours building formulas and don’t want them accidentally edited.
- You want to preserve the exact formatting – number formats, colours, borders – so the sheet looks consistent.
- You need to stop someone from deleting entire rows or columns that contain formulas.
Both Excel and Google Sheets have the same basic model: every cell has a locked property, but that property only takes effect when you turn on sheet protection. By default, all cells are locked, but the sheet is unprotected, so you can edit everything. Once you protect the sheet, all locked cells become read-only. The trick is to unlock the cells you want people to edit before you protect the sheet.
How to Protect Cells in Excel
In Excel (Windows and Mac), the process is the same for all recent versions:
- Select the cells you want to remain editable (for example, the input cells).
- Right-click the selection and choose Format Cells (or press Ctrl+1).
- Go to the Protection tab and uncheck the Locked box. Click OK.
- Now go to the Review tab and click Protect Sheet.
- In the dialog, you can set a password (optional) and choose what users can do. The default options – “Select locked cells� and “Select unlocked cells� – are usually fine. If you want to allow sorting or filtering, tick those boxes.
- Click OK. If you set a password, you will be asked to confirm it.
After this, the unlocked cells you selected are the only ones that can be edited. All other cells – including their formatting and formulas – are locked. To reverse it, go to Review → Unprotect Sheet and enter the password if you set one.
How to Protect Cells in Google Sheets
Google Sheets works a little differently. You can protect a range, a sheet, or the whole file. Here is the direct way:
- Select the cells you want to protect (not the editable ones).
- Right-click and choose Protect range (or go to Data → Protect sheets and ranges).
- In the sidebar, click Add a sheet or range.
- Give it a description (optional), then click Set permissions.
- Choose Only you or Custom to select specific people. If you want everyone with edit access to still edit the range, choose “Show a warning when editing this range� instead of restricting.
- Click Done.
To protect an entire sheet in Google Sheets, use the same sidebar but choose Sheet instead of a range. Then set permissions to “Only you� so others cannot edit anything on that sheet.
Protecting Formatting vs. Protecting Formulas
People often confuse the two. Protecting a formula means no one can change the formula itself. Protecting formatting means no one can change the appearance – font, colour, number format, borders, conditional formatting. In Excel, sheet protection covers both, but you can control which one is locked:
- Locked (on the Protection tab) controls both the cell contents and the formatting. If a cell is locked and the sheet is protected, you cannot edit the value or the format.
- In the Protect Sheet dialog, there is a checkbox for “Format cells�. If you uncheck it, users cannot change formatting of locked cells, even if they could edit the value.
In Google Sheets, the “Protect range� feature only restricts who can edit the values. It does not prevent formatting changes. To prevent formatting changes in Google Sheets, you need to either protect the whole sheet (which also blocks value edits) or use a script – there is no built-in “lock formatting only� option.
Common Mistakes and How to Avoid Them
Even experienced users make these errors:
- Forgetting to unlock input cells. If you protect the sheet with all cells locked, you cannot edit anything. Always unlock the cells you want to be editable first.
- Using a password you forget. Excel does not recover sheet passwords. Write it down or use a password manager. Google Sheets does not use passwords for protection – it uses your Google account.
- Protecting the wrong sheet. In Excel, you protect each sheet individually. Protecting the workbook (under Review → Protect Workbook) only stops structural changes like adding or deleting sheets, not cell edits.
- Copying protected cells. If you copy a protected cell and paste it elsewhere, the pasted value is fine, but the formatting may be locked. This is rarely a problem, but it can confuse.
- Assuming protection is security. Sheet protection is not encryption. Anyone who knows how to unprotect a sheet can do it in seconds. It is meant to prevent accidental edits, not malicious attacks.
How to Unprotect and Re-Edit
To edit a protected sheet again, you must unprotect it. In Excel, go to Review → Unprotect Sheet. If you set a password, you will need it. In Google Sheets, open the Data → Protect sheets and ranges sidebar, click the protected range, and then click the trash icon to remove it, or click the pencil to change permissions.
If you forget the Excel password, there is no official way to recover it. Some third-party tools claim to remove sheet protection, but they are not reliable and may be malicious. Your best bet is to keep a copy of the unprotected file or use a password you won’t forget.
Frequently Asked Questions
Can I protect only certain cells in Excel?
Yes. Select the cells you want to keep editable, open Format Cells → Protection, and uncheck “Locked�. Then protect the sheet. All other cells remain locked. That is the standard way to create input-only areas.
Does protecting a sheet also protect formulas from being seen?
No. Sheet protection stops editing, but anyone can still click a cell and see the formula in the formula bar. To hide formulas, you must also enable “Hidden� in the Protection tab of Format Cells, then protect the sheet. That hides the formula bar content for locked cells.
Why can’t I edit a cell even though I unlocked it?
You likely unlocked the cell but did not protect the sheet, or you protected the sheet but the cell is still marked as locked. Check that the cell is unlocked (Format Cells → Protection) and that sheet protection is on. Also, if you have a range protected in Google Sheets, the cell may be part of that range.
Can I allow sorting or filtering on a protected sheet?
Yes. In Excel’s Protect Sheet dialog, tick the boxes for “Sortâ€� and “Use AutoFilterâ€�. In Google Sheets, you can protect a range but still allow sorting if you set permissions to “Show a warningâ€� instead of “Only youâ€�. Note that sorting a protected range can rearrange data, so test carefully.
Is there a way to protect formatting only in Google Sheets?
Not with the built-in tools. Google Sheets protection only restricts edits to values, not formatting. To prevent formatting changes, you would need to protect the entire sheet (which blocks all edits) or use an Apps Script that reverts formatting changes. For most users, protecting the sheet is the practical solution.
What happens if I copy a protected sheet to a new workbook?
The protection travels with the sheet. The new workbook will have the same protected ranges and passwords. If you want to remove protection, unprotect the sheet in the original before copying, or unprotect it after copying.
Related
Formula used
in t | Finish time | min | 50 | 0 in d | Distance | km | 10 | 0 | 100000 out pace | Average pace | min/km | t / d | 2 out speed | Average speed | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Motorola Phone Recovery: How to Recover Data
- Poco X3 GT Dimensity 1100 67W Fast Charging Launched?5.00 min/km
- Flash Converter: What It Is & How to Use It
- Choosing a Pipe Flow Meter for Swirling Flow
- DRAM Light on Motherboard: Meaning & Fixes5.00 min/km
- Trustworthy Cloud Storage: 5 Services to Shortlist