When you share an Excel file with other users, you may want to protect a worksheet to help prevent it from being changed.
- Right click a worksheet tab.
- Click Protect Sheet.
- Enter a password.
- Check the actions you allow the users of your worksheet to perform.
- Click OK.
- Confirm the password and click OK.
Select the cells you want to lock. On the Home tab, in the Alignment group, click the small arrow to open the Format Cells popup window. On the Protection tab, select the Locked check box, and then click OK to close the popup. This means that the cells are ready to be locked when you protect the workbook or worksheet.
In the Protected sheets and ranges dialogue box, follow these steps:
- Press the Set Permissions button to open further editing permissions.
- Click the Restrict who can edit this range radio button.
- Then select Only you from the drop-down menu.
- Press the Done to lock the spreadsheet.
Press the Keyboard Shortcut Ctrl + A to select all the cells of the sheet. Right click and choose Format cells. Go to the Protection tab and uncheck Locked option and click Ok. Now select only the cells or columns, rows that you want to protect.
To do this, select all of the rows and columns in your sheet. Right-click on then select "Format Cells" from the popup menu. When the Format Cells window appears, select the Protection tab. Uncheck the "Locked" checkbox.
Hide the Formulas
- Select the cells for which you to want to hide the formulas.
- Right-click the cell (or cells) and choose Format Cells.
- In the Format Cells dialog box, click the Protection tab.
- Check the Hidden box. Note: Hidden is what prevents the user from seeing the formula.
- Click OK.
Copy and paste in a protected worksheet
- Press Ctrl+Shift+F.
- On the Protection tab, uncheck the Locked box, and click OK.
- On the worksheet, select the cells you want to lock.
- Press Ctrl+Shift+F again.
- On the Protection tab, check the Locked box, and click OK.
- To protect the sheet, click Review > Protect Sheet.
Then select the columns that you want to protect, and right click again, select Format Cells from the context menu. In the Format Cells dialog box, click Protection tab, and then check the Locked option. And then click OK to close the dialog. And in the Protect Sheet dialog, enter your password and confirm it.
Hiding and Protecting Columns
- Select the column you want to protect.
- Press Ctrl+Shift+F.
- Make sure the Protection tab is displayed.
- Make sure both the Locked and Hidden check boxes are selected.
- Click OK to dismiss the dialog box.
- With the column still selected, display the Home tab of the ribbon.
In the top section select the sheet you want to hide and then press F4 – in the Properties Window that opens use the Visible drop down option to select 2 – xlSheetVeryHidden (yes very hidden!). Done – repeat for other sheets.
On the Edit menu, click Go To. In the Go To dialog box, click Special. In the Go To Special dialog box, click Visible cells only, and then click OK.
If you select all the rows and click 'unhide' and they do not show up, then they are filtered and not hidden. Click the Sort & Filter button on the Home tab of the ribbon and then click 'clear'. On the Home tab, click on the Format icon Choose Hide & Unhide from the dropdown menu then select Unhide Rows.
When the Very Hidden attribute is set on a worksheet, the Hide option is greyed out. Very hidden sheets can only be made visible through the VBA editor. If you want to unhide a very hidden sheet, open the VBA editor and change the Visible attribute back to xlSheetVisible.