Lock a graph by protecting the worksheet or workbook
To prevent changes to a graph in Excel, you protect the sheet or workbook that contains it. When you protect a sheet, all objects on it — including charts, graphs, and text boxes — become locked by default. Anyone who tries to edit, move, resize, or delete the graph will see a dialog saying the sheet is protected.
The most common approach is sheet protection, which locks everything on that sheet at once. You can also use workbook protection if you want to lock the structure (prevent adding or deleting sheets) without locking individual objects. For graphs specifically, sheet protection is usually what you need.
Protection in Excel is not encryption. It stops casual edits and accidental changes, but someone with technical knowledge can remove the protection. If you need true security — to prevent someone determined from changing the file — you should use file encryption or save the file as read-only instead.
Key Takeaways
- Sheet protection locks all objects on a sheet, including graphs, by default — you do not need to lock the graph separately.
- You set sheet protection through the Review tab (Windows) or Sheet menu (Mac), and you can add a password so only someone who knows it can unprotect.
- Protected sheets still allow users to select and view the graph; they just cannot edit, move, or delete it.
- Sheet protection stops accidental changes but is not encryption — someone with technical skill can remove it.
- If you want to let users edit some cells or objects while locking others, you can unlock specific cells before protecting the sheet.
How to protect a sheet and lock the graph
On Windows: Click the Review tab at the top. In the Protect group, click Protect Sheet. A dialog opens. You can leave the password field blank if you just want to prevent accidental changes, or type a password if you want to require one to unprotect. Click OK. If you entered a password, type it again to confirm. The sheet is now protected — the graph cannot be edited, moved, or deleted.
On Mac: Click the Sheet menu at the top. Select Protect Sheet. The same dialog appears. Leave the password blank or add one, then click OK and confirm the password if you used one.
Once protection is on, anyone who tries to click on the graph and edit it will see a message: "The sheet is protected and cannot be edited." They can still select the graph to see it, but they cannot change it. If you want to unprotect the sheet later, go back to Review (Windows) or Sheet (Mac), click Unprotect Sheet, and enter the password if you set one.
Unlock specific cells before protecting if you want selective editing
By default, all cells and objects on a sheet are locked when you protect it. If you want some cells to remain editable while the graph stays locked, you must unlock those cells before you turn on protection.
Select the cells you want to remain editable. Right-click and choose Format Cells (Windows) or press Command+1 (Mac). Go to the Protection tab. Uncheck the Locked box. Click OK. Now select all cells on the sheet (Ctrl+A or Command+A), right-click, Format Cells, Protection tab, and check Locked again — this re-locks everything except the cells you just unlocked. Now protect the sheet as described above. Users will be able to edit only the cells you unlocked; the graph and all other content stay locked.
This approach is useful if you want people to update data in a table while the chart that displays that data remains fixed in place.
Protect the workbook structure to prevent sheet changes
Workbook protection is different from sheet protection. It locks the structure of the workbook — preventing users from adding, deleting, hiding, or renaming sheets — but does not lock individual objects like graphs.
To protect the workbook structure, go to Review (Windows) or Sheet (Mac), click Protect Workbook, and optionally add a password. This is useful if you have multiple sheets and want to prevent someone from reorganizing them, but it does not lock the graphs themselves. If you need both — locked graphs and locked sheet structure — protect the sheet first, then protect the workbook.
What users can and cannot do with a locked graph
When a graph is locked by sheet protection, users can still select it and view it. They can click on the graph to see it highlighted with selection handles. However, they cannot edit the data range, change the chart type, modify the title or labels, move the graph, resize it, or delete it. Any attempt to do so triggers the "sheet is protected" message.
Users can still interact with the underlying data — if you left those cells unlocked — and the graph will update automatically to reflect changes. This is often the intended behavior: the graph itself is fixed, but the numbers it displays can change.
Remove protection if you need to edit the graph later
To unprotect the sheet and edit the graph again, go to Review (Windows) or Sheet (Mac). Click Unprotect Sheet. If you set a password, you will be asked to enter it. Once unprotected, all objects unlock and you can edit the graph normally. You can then re-protect the sheet after making your changes.
If you forgot the password, there is no built-in recovery method in Excel. You cannot unprotect the sheet without it. Some third-party tools claim to remove sheet protection, but they are unreliable and may damage the file. The best practice is to keep a record of any passwords you use, or avoid passwords if the protection is only meant to prevent accidental changes.
Alternatives if sheet protection is not enough
If you need stronger protection — for example, to prevent someone from removing the protection entirely — consider these options:
- Save as read-only: File > Info > Protect Workbook > Mark as Final (or save the file as read-only through your operating system). Users can view and copy from the file but cannot save changes to it without saving a copy.
- Encrypt the file: File > Info > Protect Workbook > Encrypt with Password. This requires a password to open the file at all. It is stronger than sheet protection but also more restrictive — users cannot open the file without the password.
- Share as PDF: Export the graph or sheet as a PDF. PDFs cannot be edited in Excel and are harder to alter. This works if you only need to share the graph, not the underlying data.
Frequently Asked Questions
Can I lock just the graph and leave the rest of the sheet editable?
Not directly. Sheet protection locks everything by default. However, you can unlock all cells except those in the graph area before protecting the sheet. This keeps the graph locked while allowing edits elsewhere. The downside is that users cannot edit cells that are part of the graph's data range without unprotecting the sheet.
What happens if I protect a sheet and then add a new graph?
New objects added to a protected sheet are locked automatically. You do not need to protect again. If you want the new graph to be editable while the sheet is protected, you must unprotect the sheet, unlock the graph's cells, and re-protect.
Can someone remove sheet protection without the password?
Sheet protection in Excel is not encryption. Someone with technical knowledge can remove it using third-party tools or by editing the file's XML code. If you need true security, use file encryption or save the file as read-only instead. Sheet protection is best for preventing accidental changes, not for security against determined users.
Does protecting a sheet slow down Excel or affect file size?
No. Sheet protection adds no noticeable overhead and does not increase file size. It is a simple flag in the file that tells Excel to block edits. Performance is not affected.
Can I protect a sheet but allow users to print the graph?
Yes. Sheet protection does not prevent printing. Users can print the sheet and the graph normally. If you want to prevent printing, you must use file encryption or a different method — sheet protection alone does not control printing.