Last Updated on October 30, 2023 by Jake Sheridan
How To Lock A Row In Google Sheets
Accidental edits to spreadsheet data can be hard to notice and take hours to correct once they’ve been found.
It’s possible to structure your spreadsheet so that data that should not be edited is located in a separate row from other data, or even highlighted to warn users not to edit it, but these measures aren’t always enough to prevent accidental edits.
If you have a row of data in your spreadsheet that should not be edited often, or should only be edited by particular users, locking that row will protect your data from user error.
Google Sheets allows you to lock or protect a row, column, range or entire sheet.
How Protected Ranges Work
To lock a row, you’ll use the Protected ranges feature.
This feature prevents accidental edits, but note that it is not a security feature and should not be used as one.
Users will still be able to print the spreadsheet, copy and paste data from the protected range(s) and even create duplicates of the spreadsheet where they have full access to all data.
Only share spreadsheets with users who should have access to all the data contained in that spreadsheet.
How to Protect a Row
To protect a row:
Select the row by clicking the row number to the left of the row
Open the Data menu. Scroll down to the Protected Sheets and Ranges option and click on it
The Protected Sheets and Ranges sidebar will appear
In the sidebar, you can add an optional description for the row
Edit the range to ensure you’re protecting the right row
Click on the green Set Permissions button and the Range Editing Permissions dialog will appear
Select if you want to restrict who can edit the row or warn users who edit the row (more info on these options below)
Click Done and your row is protected
Restrict who can edit this range
With this protection option, you can choose who can edit the protected row.
By default only you and the spreadsheet owner can edit the range, or only you if you are the spreadsheet owner.
You can also choose specific users by selecting the Custom option.
Show a warning when editing this range
If you select this option, all users who edit the row will see a warning:
They can then decide if they want to cancel the edit or proceed with the edit.
Editing & Removing Range Protection
To edit or remove range protections:
- Open the Protected Sheets and Ranges sidebar from the Data menu
- To view all of the ranges with protections, click Cancel
- Click on the protected range and make your edits, then click Done to save
- You can delete the protected range by clicking the trash can icon beside the range description
Example Spreadsheet: Make a copy of the example spreadsheet
In this tutorial, I covered how to lock rows in Google Sheets. Want more? Check out all the Google Sheets Tutorials.