No—Microsoft Excel cannot encrypt selected cells by themselves. In Excel for Microsoft 365 on Windows, you can encrypt the entire workbook with a password using File > Info > Protect Workbook > Encrypt with Password; sheet protection can limit editing, but it does not keep cell contents secret.
What Excel encryption protects
Workbook encryption is intended to stop someone from reading the file without the password. When the file is closed, its contents are protected by the encryption built into the Office file format. A person who does not have the password should not be able to open and read the workbook simply by opening the file in Excel. This is the relevant built-in option when the goal is confidentiality, such as keeping a workbook with employee details or unpublished business figures from unauthorized readers.
Encryption applies to the workbook as a file, not to a selection such as B2:D10. Excel does not provide a setting to encrypt a few cells while leaving other cells in the same workbook readable. If you share an encrypted workbook with someone and give them its password, they can generally see all its contents after opening it, including hidden sheets and hidden rows or columns.
Encryption is not a complete control over what an authorized reader can do. Once someone opens the workbook, they may be able to copy data, take screenshots, make a new file, or share the password. It also does not protect a separate unencrypted copy, an exported CSV file, or information copied into an email. Think of it as protection for access to the saved file, not a way to make particular values permanently invisible.
Encrypt the whole workbook with a password
In Excel for Microsoft 365 on Windows, use these steps to set a password required to open the workbook:
- Open the workbook in the Excel desktop app.
- Select File > Info.
- Select Protect Workbook, then Encrypt with Password.
- Enter a strong password, select OK, and enter it again to confirm.
- Save the workbook, close it, and reopen it to confirm that Excel asks for the password.
The password is case-sensitive. Use a long, unique password rather than a short word or a password reused for another service. A password manager can help store it safely. Share the password through a separate, suitable channel rather than placing it in the same message as the workbook.
To remove the password in the Windows desktop app, open the workbook with its current password, go to File > Info > Protect Workbook > Encrypt with Password, clear the password field, select OK, and save. Anyone who receives the resulting file can open it without that password, so remove encryption only when that is appropriate for the file’s handling requirements.
Protect a sheet when the goal is editing control
Sheet protection serves a different purpose. It can stop casual or accidental changes to a worksheet, but Microsoft describes it as a way to prevent changes to locked cells—not as a security feature for hiding sensitive information. A protected sheet’s contents can still be viewed, and sheet protection should not be treated as encryption.
To protect a sheet in Excel for Microsoft 365 on Windows, select Review > Protect Sheet. Choose which actions users may perform, optionally enter a password to unprotect the sheet, and confirm the password if prompted. The available permissions let you, for example, allow selecting cells while disallowing changes to locked cells. A password here is not the same as the password required to open an encrypted workbook.
Excel marks cells as locked by default, but that setting does not take effect until you protect the worksheet. For a form where users should fill in only certain cells, first select the cells they may edit, open Format Cells, choose the Protection tab, and clear Locked. Then protect the sheet. This arrangement helps preserve formulas and layout while allowing entries in designated cells; it does not conceal the formulas or other data from people who can open the file.
Protect workbook structure and hide formulas
Workbook-structure protection controls some changes to the sheet tabs. In Windows Excel, use Review > Protect Workbook and select the option to protect the workbook structure. Depending on the setting, this can prevent actions such as adding, deleting, moving, hiding, or renaming sheets. It does not encrypt the workbook or make the values on those sheets confidential. If the concern is unauthorized reading, use file encryption instead.
You can also hide a formula from the formula bar when a worksheet is protected. Select the relevant cells, open Format Cells, choose Protection, select Hidden, and then protect the sheet. This can discourage casual inspection of a formula, but it is not a safe way to protect a secret. It does not encrypt the underlying workbook, and people who can access the file may still find other ways to inspect or copy its contents. Do not store passwords, private keys, or other secrets in a formula on the assumption that hiding it secures the information.
Choose the right kind of protection
Decide what you need to prevent before choosing a setting. These controls solve different problems:
- Password to open (workbook encryption): Restricts opening and reading the saved workbook to people with the password.
- Protect Sheet: Restricts selected worksheet actions, such as editing locked cells. It does not provide confidentiality.
- Protect Workbook structure: Restricts changes to sheet organization, such as renaming or deleting sheets. It does not conceal data.
- Hidden rows, columns, or sheets: Changes what is displayed in the workbook, but is not a security boundary. A recipient may be able to unhide the material.
- File or information-protection policies: In some organizations, Microsoft Purview sensitivity labels or rights-management policies can add access rules. Availability and behavior depend on the organization’s Microsoft 365 licensing and configuration.
For example, if a budget workbook contains salary information that recipients must not read, encrypt the whole file and share the password only with authorized people. If everyone may read the budget but only a few people should change its formulas, protect the sheet and unlock only the cells meant for input. If users should not see salary data at all, do not include it in the workbook they receive; create a separate file with only the data they need.
Windows, Mac, and Excel for the web
The steps above describe Excel for Microsoft 365 on Windows. Excel for Mac also supports password protection for opening a workbook, but the controls are presented differently in some versions. In current desktop versions, check File > Passwords to set or change the password to open the file; available labels and options can vary by release. Review > Protect Sheet is the separate control for limiting worksheet edits.
Excel for the web has limitations around password-encrypted workbooks: it does not provide the same desktop workflow for setting workbook encryption, and password-encrypted files may need to be opened or edited in the desktop app. If you need to apply or change a password, use the Excel desktop app. For workbooks stored in OneDrive or SharePoint, sharing permissions can control who can access the cloud file, but they are separate from a password that encrypts the workbook. Check your organization’s sharing and labeling policies before distributing sensitive files.
Passwords, recovery, and common problems
Excel does not provide a reliable way to recover a forgotten password used to encrypt a workbook. Microsoft cannot retrieve a lost password for you. Keep the password in an approved password manager or another secure recovery method, and make sure an authorized colleague can access it if the workbook must remain available during an absence. Before encrypting an important file, retain a secure backup and verify that the password works.
If Excel does not ask for a password when opening the file, check that you used Encrypt with Password rather than Protect Sheet or Protect Workbook structure. Those similarly named options protect different things. After setting encryption, save the file, close it, and test the saved copy. Be careful not to overwrite the only usable copy if you are unsure of the password.
If recipients can open the file but cannot edit it, the workbook may have sheet protection, read-only status, or a sharing permission that limits editing; that is a different issue from a password required to open the workbook. Conversely, a password to open the file does not automatically determine which cells someone may edit after opening it. You may need encryption and sheet protection together when you want both access control and safeguards against accidental changes.
Safer ways to share sensitive spreadsheet data
Before adding a password, consider whether the recipient needs the sensitive information at all. Removing unnecessary personal or confidential data is often safer than relying on a hidden sheet or locked cell. If a recipient needs only a summary, send a separate workbook or a carefully prepared export containing only that summary. Check for hidden worksheets, comments, defined names, and other information that may remain in a copy before sharing it.
For files shared through a work or school account, use the organization’s approved storage and access controls. OneDrive or SharePoint permissions can help limit access to named people and can be changed later, subject to the organization’s configuration. These controls do not make a file immune to copying once an authorized person can view it. Use approved sensitivity labels or rights-management options when your organization provides them, and follow its rules for regulated or confidential information.
Finally, treat the password and the workbook as two parts of the same access decision. Give access only to people who need it, avoid sending the password alongside the file, and remove access or rotate the password when the sharing arrangement changes. For highly sensitive information, consult your organization’s security guidance rather than assuming a workbook password alone meets every requirement.
Frequently Asked Questions
Can I encrypt only one cell in Excel?
No. Excel’s built-in password encryption applies to the entire workbook file. You can protect a worksheet against edits, but that does not encrypt an individual cell or hide its value from someone who can open the file.
Is Protect Sheet the same as encrypting a workbook?
No. Protect Sheet limits selected worksheet actions, mainly changes to locked cells. Workbook encryption requires a password to open and read the file. Use encryption for confidentiality and sheet protection for editing control.
Can I hide a cell’s value from someone who has the workbook?
Not reliably with cell formatting, hidden rows, hidden sheets, or sheet protection. If a person must not see the information, leave it out of the copy you share or restrict access to the entire encrypted workbook.
What happens if I forget the workbook password?
You may be unable to open the encrypted file, and Excel does not offer a standard password-recovery process for it. Keep a secure record of the password and test it before relying on the encrypted workbook.
Can Excel for the web encrypt a workbook with a password?
Use the Excel desktop app to set or change a password to open a workbook. Excel for the web has limitations with password-encrypted files, so desktop Excel may also be needed to open or edit them.
Related
- Daily Employee Schedule Template Excel: Setup & Tips
- Daily Schedule Excel Template: Plan Your Day in Excel
- Daily Cash Flow Template Excel: How to Build and Use It
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Insert Timestamp: Static or Live?To insert a fixed timestamp in Google Sheets, enter =NOW(), copy the cell, then choose Edit > Paste…
- Excel Data Validation List Based on a LookupYes. In Microsoft Excel for Microsoft 365, make a lookup-driven dropdown by using FILTER in a helper cell,…
- Vendor Quotation Comparison Template in ExcelTo make a vendor quotation comparison template in Excel, list suppliers in columns B through D and put…
- Excel Data Table Reference Format: A Practical GuideIn Excel, a table reference uses the table name and, when needed, a column or item in square…
- CSV vs Excel: Key Differences and When to Use EachCSV is a plain-text format for storing tabular data, while Excel workbooks can store data alongside formatting, formulas,…
- How to Do Columns in Microsoft Word: A Practical GuideTo make columns in Microsoft Word, place the cursor where you want them, choose Layout > Columns, and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.