Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
You need to password protect your Excel files to keep your spreadsheets safe.
Email inboxes, social media accounts, even our devices themselves — pretty much anything of importance is secured by some kind of password these days. If you rely on an Excel spreadsheet for any reason, it’s well worth considering whether you should add password protection to that too.
Whether you want to restrict access to the whole document, or simply prevent certain people from making changes to the file, it only takes a minute or two to set up a password. If your spreadsheet falls into the wrong hands, the results could be disastrous, so it’s well worth taking the time to give yourself some piece of mind.
How to Password Protect an Excel File?
Excel makes it easy to encrypt your spreadsheet by locking it down with a password. It just takes three easy steps:
- Navigate to File > Info > Protect Workbook > Encrypt with Password.
- Enter your desired password and click OK.
- Confirm your password.
However, depending on what you’re trying to protect, the exact method you use might change slightly.
Encrypting an Excel Document
The most common method of enforcing password protection on an Excel spreadsheet is via encryption. This means that whenever someone opens up the file, they have to enter a password.
Open your document, and navigate to File > Info > Protect Workbook.
Select Encrypt with Password from the dropdown menu, then enter your desired password in the dialog box that follows.
You’ll need to reenter the password afterward. The next time you open the document, you’ll be prompted to enter it in order to proceed.
This should go without saying, but make sure you don’t forget that password! Ending up without access to an important spreadsheet can cause some serious headaches.
Allowing for Read-Only Access
Setting up basic encryption is pretty straightforward, but Excel actually offers a fair bit of flexibility when it comes to password protection. For instance, what if you want anyone to be able to open the document, but require that they enter a password if they want to make edits. That kind of system is very easy to implement.
Click through File > Save As > More options.
Click the Tools button and select General Options from the dropdown menu.
Here, you’ll notice that there are two different fields; Password to open and Password to modify. You can leave the latter blank if you want to restrict editing privileges without restricting access to the document itself. When you’re done, simply click OK.
The next time you open the document, you should get a slightly different password prompt, as you can see above.
Protecting a Worksheet
If your document features more than one sheet, you might want to restrict edit privileges to one or more sheets, but not others.
Head to the Review tab and click Protect Sheet.
Here you’ll be able to enter your desired password for the current sheet.
However, you’ll notice that there are also a series of tick boxes that will allow all users access to certain functionality. This can be handy if you want to give them the ability to sort columns, but not make any lasting changes, for instance.
Adding a Password Using VBA
One last scenario: your spreadsheet uses VBA macros, and you want to allow anyone to edit the document itself, but add some extra protection to the code you’ve written. Here’s how to do just that.
Create a new Macro. You can choose whatever name you want, I’m just using “password” as a placeholder.
For the purposes of this guide, I’m going to use the following code:
Range("A1").Value = "Password Protected"
However, in practice, you’ll just use whatever Macro you’re actually trying to protect. In the Visual Basic Editor, navigate to Tools > VBAProject Properties.
In the Protection tab, you’ll find a checkbox that will allow you to lock the project for viewing. There are also fields where you can add password protection for access to project properties.
It’s worth noting that while this kind of protection can be useful, it does have its limitations. Read this guide on how to recover and Excel VBA password if you want to know just how easily the password can be removed, so long as you have the right tools for the job.
When it comes to an important spreadsheet, it’s better to be safe than sorry.
Many workplaces use a shared Excel document to carry out all kinds of tasks. Whether it’s a timesheet or an interactive dashboard, there can be undesirable consequences if the wrong people gain access.
Yes, it takes a few seconds to enter your password, but it’s worth it. Take the time to consider whether you really need to protect the whole document or just specific parts, and you’ll ensure that any inconvenience is minimized.
Besides, it’s certain to be much more inconvenient if someone sneaks into your spreadsheet, deletes all your data and overwrites the file.
Do you have a tip about adding a password to an Excel document? Or are you looking for assistance with one of the methods described in this article? Either way, why not join the conversation in the comments section below?
Image Credit: coddie/Depositphotos