Fixes / Google Sheets · Checked

Google Sheets "You are trying to edit a protected cell": fix

Short answer

Someone has protected the cell or sheet you are editing, and your account is not on its list of allowed editors. The usual fix is to ask the owner or an allowed editor to open Data > Protect sheets and ranges, click the rule, and add you under Change permissions (or delete the rule). The spreadsheet owner can always edit protected cells.

What this message means

Google Sheets lets owners and editors lock a range or a whole tab so only chosen people can change it. When you type, paste, delete, sort, or run a script that touches any locked cell and your account is not on that lock's editor list, Sheets rejects the change and shows this message. It is a permission rule inside the file, not a bug or a sharing problem: you can still edit the file, just not that area. The same text appears as "Exception:" in Apps Script and "INVALID_ARGUMENT" in the Sheets API and in tools like Make or Zapier.

Common causes

CauseHow to tell
The cell or range you clicked is protected and you are not an allowed editor.Turn on View > Show > Protected ranges. The cell has a gray striped background, and the message appears as soon as you type in it.
The whole tab (sheet) is protected, with maybe a few cells left open.Almost every cell on that tab shows the striped pattern. Data > Protect sheets and ranges lists a rule with the tab name and no cell range.
Your action reaches into a protected area without you meaning to, for example a paste, fill-down, sort, row delete, or row insert that overlaps a locked column.Typing in one cell works, but the larger paste, sort, or delete fails. The selection or the rows you are changing include at least one striped cell.
A script or automation is running under an account that is not allowed to edit the protected range.The error shows as "Exception: You are trying to edit a protected cell or object" in Apps Script, or "INVALID_ARGUMENT" in Make, Zapier, or the Sheets API. It works for the owner but fails for other people.
You are signed in with a different Google account than the one the owner added.Your profile picture at the top right shows a personal account, but you were given access through your work or school account (or the other way round).

How to fix it

1. Find exactly what is protected

  1. Click View > Show > Protected ranges so locked cells get a striped background.
  2. Click Data > Protect sheets and ranges to open the side panel listing every protection rule.
  3. Click a rule to see which range or tab it covers.
  4. If you can edit the rule, the panel lets you change permissions. If you cannot, note the range and tab name so you can tell the owner.

2. Ask the owner or an allowed editor to add you or remove the lock

  1. Find the owner: click the Share button, or check File > Details (the owner is listed there).
  2. Send them the tab name and cell range from the previous fix.
  3. They open Data > Protect sheets and ranges and click the rule.
  4. To give you access, they click Change permissions, choose Restrict who can edit this range > Custom, add your email, and click Done.
  5. To remove the lock entirely, they click the Delete (trash) icon next to the rule and confirm.

3. If you own the file or are allowed to edit the rule: change or delete it yourself

  1. Click Data > Protect sheets and ranges.
  2. Click the rule covering the cells you need.
  3. Click Change permissions and add the people who need to edit, or pick Show a warning when editing this range so edits are allowed after a confirmation prompt.
  4. Click Done. Or click the Delete icon to remove protection completely.
  5. To keep a tab locked but open certain input cells, edit the sheet rule, tick Except certain cells, and add those cells.

4. Keep your edit out of the protected area

  1. Look at which columns or rows are striped.
  2. Paste, fill, or sort only a selection that contains no striped cells.
  3. Avoid deleting or inserting whole rows or columns that pass through a protected range. Clear the cell contents instead if that is all you need.
  4. If the rule blocks the whole tab, work on a different tab or in a copy (next fix).

5. Fix a script or automation that hits this error

Google Apps Script, Sheets API, Make, Zapier and similar tools

  1. Check which account runs the code. Installable triggers always run as the person who created them. Simple triggers such as onEdit run as the person using the sheet.
  2. Have the owner (or an account on the protection's editor list) create the installable trigger or connect the automation, so it runs with that account's rights.
  3. Or add the automation's account to the protection rule under Change permissions.
  4. For appending rows, write to an explicit range that avoids protected columns instead of appending full rows.
  5. In Apps Script you can check first with protection.canEdit(). If allowed, switch the rule with setWarningOnly(true) or remove it with protection.remove().

6. Work in your own copy

  1. Click File > Make a copy.
  2. Name the copy and click Make a copy. You are the owner of the new file.
  3. In the copy, protections are copied over, but as the owner you can edit protected cells or delete the rules under Data > Protect sheets and ranges.
  4. Note that changes in the copy do not go back to the original file.

Next time, skip the search

Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.

Download Crade

Still not fixed?

If nobody listed in the rule can be reached, ask the file owner to transfer ownership or re-share, since only the owner is guaranteed to override every protection. In a work or school account, your Google Workspace administrator can help find the owner or recover files from a departed user's account. For script errors, log Session.getEffectiveUser().getEmail() to confirm which account is running the code, then add that account to the protection rule.

Questions people ask

How do I edit a protected cell in Google Sheets without the owner?

You can't in the original file unless you are on the rule's editor list. You can make your own copy with File > Make a copy. You own the copy, so you can edit it freely, but your changes stay in the copy.

How do I see which cells are protected?

Click View > Show > Protected ranges to show locked cells with a striped background, or open Data > Protect sheets and ranges to see every rule.

Can I password-protect cells in Google Sheets?

No. Google Sheets has no password protection for cells. Access is controlled only by Google account: the people named in each protection rule, plus the owner.

Why can the owner edit but my script fails for other users?

Scripts run with the permissions of a specific account. Simple triggers and menu-run functions use the current user's account, which may not be allowed to edit the protected range. Installable triggers run as the account that created them.

Can I allow edits but still warn people?

Yes. In Data > Protect sheets and ranges, open the rule, click Change permissions, and choose Show a warning when editing this range. Anyone with edit access can then change the cells after confirming.

Sources