Sub topic 3
Protecting a range from Data > Protect sheets and ranges
This chapter covers the interface workflow for protecting a range in Google Sheets. It assumes you can select cells and ranges, read A1 notation such as A1:E1, and know that a spreadsheet can be shared with viewers, commenters, and editors. No scripting is needed here. Later chapters cover Apps Script and the API.
What a range protection is
A range protection is a rule attached to a block of cells. The rule says who may change those cells. Everyone else can still see the cells, and they can still use them in formulas, charts, and filter views.
A few facts shape everything else in this chapter:
- A protection applies only to people who already have edit access to the file. Viewers and commenters cannot edit anything, so protections do not affect them.
- A protection is stored with the spreadsheet. It travels with copies you make of the file, but the editor list may change on a copy (see the limits chapter).
- One cell can sit inside several protections. A person must be allowed by each of them to edit the cell.
- The spreadsheet owner can always edit a protected range and can always remove a protection.
Opening the protection panel
You can start from two places. Both lead to the same side panel.
- Select the cells you want to protect, for example
A1:E1. - Choose Data > Protect sheets and ranges. Alternatively, right-click the selection and choose Protect range.
- In the Protected sheets and ranges panel on the right, click Add a sheet or range. If you started from the right-click menu, this step is already done for you.
Starting with a selection is faster, because the range field is filled in for you. If you open the panel with no selection, the panel proposes the current cell, and you edit the range in the next step.
Setting the range and description
The new protection opens with two tabs: Range and Sheet. Stay on Range for this chapter.
- The range field shows the sheet name and the A1 reference, such as
Sheet1!A1:E1. Click the grid icon at the right of the field to pick a different range by dragging on the sheet. You can also type a reference directly. - The description field is optional, but you should fill it in. A description such as
Header roworTax rate inputsis what appears in the panel list later. Without one, the list shows only the A1 reference, which gets hard to read once you have a dozen protections.
Click Set permissions to continue. The protection does not exist until you finish the permissions step, so closing the panel before this point discards it.
Choosing who can edit
The Range editing permissions dialog offers two main modes.
| Choice | Effect |
|---|---|
| **Show a warning when editing this range** | Anyone with edit access may change the cells, but they see a confirmation prompt first. See the warning-only chapter. |
| **Restrict who can edit this range** | Only the people you select can edit. Everyone else is blocked. |
Choose Restrict who can edit this range. A dropdown then offers these options:
- Only you removes all editors except you and the file owner. If you are the owner, only you remain.
- Only domain is shown in Google Workspace accounts. It allows everyone in your organization who has edit access to the file. It is not offered on personal Gmail accounts.
- Custom opens a checklist of everyone with edit access to the file. Tick the people who should be able to edit the range.
- Copy permissions from another range reuses the editor list of an existing protection, which keeps related ranges consistent.
Click Done to save. The protection is now live.
What "Only you" really means
"Only you" does not mean only you. The file owner keeps edit rights to every protected range. This follows from the owner's control of the file, and no setting removes it. If you want to exclude a particular person from a range, that person must not be the owner.
Custom lists only show people who can edit the file
The custom checklist is built from the file's sharing list. A person who is a viewer or commenter does not appear in it, because they cannot edit anyway. If you need to add someone who is missing, share the file with them as an editor first, then return to the protection. Removing someone's edit access to the file also removes them from every protection's editor list.
A related gotcha: a person who has edit access only through a link ("anyone with the link can edit") has no identifiable account. You cannot select them individually, and a restricted protection blocks them. This is often what you want.
A worked example
Suppose you share a weekly report with four colleagues, all as editors. The header row A1:E1 holds column names that formulas and a pivot table depend on. You want only yourself to change them.
- Select
A1:E1on the report sheet. - Choose Data > Protect sheets and ranges.
- Enter the description
Header row. - Click Set permissions.
- Select Restrict who can edit this range, then choose Only you.
- Click Done.
Now ask a colleague to type in B1. Sheets rejects the edit with a message that the cell is protected and that they do not have permission. They can still type in A2 or B2, because those cells are outside the protection.
Test your own protections this way. Ask a second account to try an edit, or open the file in a separate browser profile signed in as a different editor. Testing as the owner proves nothing, because the owner is never blocked.
Reading the protection list
Reopen Data > Protect sheets and ranges to see every protection in the file. Each row shows the description and the range. Clicking a row opens it for editing.
From there you can:
- Change the range by editing the reference.
- Change the description.
- Click Change permissions to switch between warning and restriction, or to adjust the editor list.
- Click the trash can icon to delete the protection.
Sheets shows a small lock marker on a sheet tab when the whole sheet is protected. Range protections have no marker on the grid itself, so the panel is the only complete list. Because of that, consistent descriptions matter.
Editing the protected range afterwards
Protections are tied to cell addresses, and they follow the cells when the structure changes:
- Inserting a row above
A1:E1moves the protection down with its cells, so it becomesA2:E2. - Inserting a row inside a protected range expands the protection.
- Deleting every row or column of a protected range removes the protection.
- Sorting a range that overlaps a protection is blocked for people who are not allowed to edit it. The sort fails with a protection error. This surprises people who sort a table that includes a protected column. Sort a range that excludes the protected cells instead.
Cut and paste behaves differently from copy and paste. If an allowed editor cuts a protected cell and pastes it elsewhere, the protection stays at the original address and does not move with the value. Check the panel after restructuring.
Common errors and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| A colleague cannot edit a cell you thought was open | The cell is covered by a second protection, perhaps a whole-sheet one | Open the panel and look for overlapping ranges |
| A person is missing from the custom checklist | They are a viewer or commenter | Share the file with them as an editor first |
| You cannot see **Change permissions** | You are not on the protection's editor list | Ask the owner or an editor of the protection |
| The panel shows no protections but edits are blocked | The file may use a protected sheet, listed by sheet name rather than range | Check entries with a sheet name and no A1 range |
| A sort or filter fails with a protection error | The sorted region overlaps protected cells | Sort a narrower range or add yourself as an editor of the protection |
| "Only domain" is missing | You are on a personal account, or your organization disables it | Use **Custom** |
Good habits
- Describe every protection. A search of the panel helps only when descriptions are meaningful.
- Protect the smallest range that does the job. Overlapping large protections are hard to reason about.
- Prefer a protected header and formula area over protecting the entire sheet when users need to add rows. Whole sheets get their own chapter.
- Verify with a non-owner account after any change.
- Remember that protection is an editing guard, not a confidentiality control. Protected cells remain visible to everyone who can open the file.
Exercise
You protect B2:B20 with "Restrict who can edit this range" and select "Only you". You are not the file owner. A colleague who is the owner opens the sheet. Can the owner edit B2:B20, and why does this matter when you test the protection?
Show answer
Yes. The file owner can always edit protected ranges, and no setting removes that right. Testing as the owner would show no blocking, so you should test with a different editor account that is neither the owner nor on the editor list.
Exercise
A teammate reports that they cannot type in C5, but the protection list shows only one protection, on A1:E1. Name two places or causes you would check next.
Show answer
First, check whether a protection with a sheet name and no A1 range exists, because that is a whole-sheet protection that covers C5. Second, check whether the teammate really has edit access, since a viewer or commenter cannot edit any cell. Also confirm that no other sheet-level protection with unprotected exceptions leaves C5 out of the exception list.