Security on an Excel file

Document number: 18050

 

Microsoft Excel provides several ways to restrict how users can view or change data in workbooks and worksheets.

Click on one of the choices below:

 

Note: You can create additional restrictions for viewing or changing data in workbooks by writing macros in Visual Basic.

 

 


To prevent changes to cells on worksheets or to data and other items in charts, using Worksheet Protection is your best option.

When you protect the worksheet, the cells and graphic objects that are not "unlocked" are protected and cannot be changed. With the worksheet you want to have protected open, you can:

  • Unlock any cells that you want to be able to change after you protect the worksheet. For details, click here
  • Unlock any graphic objects that you want to be able to change after you protect the worksheet. For details, click here.
  • Hide any formulas that you don't want to be visible. For details, click here.

To protect the worksheet, follow these steps:

  1. From the Tools, choose Protection.

  2. Click on Protect Sheet ...
    • To prevent changes to cells on worksheets or to data and other items in charts, and to prevent viewing of hidden rows, columns, and formulas, select the Content check box.
    • To prevent changes to graphic objects on worksheets or charts, select the Objects check box.
    • To prevent users from seeing or making changes to scenarios you have on the worksheet, select the Scenarios check box.

  3. Click OK when you are through making your choices.

 

If you want to prevent others from removing worksheet protection, you must use a password to edit and save a workbook.

 

Click here to return to the beginning of this document

 

 

 


To limit changes to an entire workbook, use the Protect Workbook feature.

  1. From the Tools, choose Protection.

  2. Select Protect Workbook ...
    • To protect the structure of a workbook so that worksheets in the workbook can't be moved, deleted, hidden, unhidden, or renamed and new worksheets can't be inserted, select the Structure check box.
    • To use windows of the same size and position each time the workbook is opened, select the Windows check box.

  3. Click on OK after you've made your choices.

 

If you want to prevent others from removing worksheet protection, you must use a password to edit and save a workbook.

 

Click here to return to the beginning of this document

 

 

 


Often the best protection for a worksheet or workbook is to assign a password, thereby limiting access to the document.

To assign a password to a Microsoft Excel worksheet, with the current worksheet open:

  1. Select File from the main menu, then Save As.

  2. Click on the O ptions... button.

  3. In the Save Options box, enter a password in either the Password to open or Password to modify text area.
    • Passwords are case sensitive. Type the password exactly as you want users to enter it, including uppercase and lowercase letters.

  4. Click on the OK button.

  5. In the Reenter password to proceed box, type the password again.

  6. Click on the OK button.

  7. Click on the Save button.

  8. If prompted, click Yes to replace the existing workbook with the open workbook.

Note: Once a password is assigned, it is required for access to the document. If the password is forgotten, there is no way to fully access the document or delete the password.

If you add a password-protected workbook to a binder, the password protection is lost. You will be prompted to enter the password when you add the workbook to the binder, but the protection is removed after it becomes a binder section.

You can open and edit a password-protected workbook without using the password by first opening the workbook as read-only. Make the changes you want in the workbook, then save it with a different name. The workbook saved with a new name does not require a password and is available for editing.

To Remove a password from an Excel worksheet:

  1. Select File from the main menu, then Save As.

  2. Click on the O ptions button.

  3. In the Save Options box, highlight the contents of the Password text area.

  4. Press the { Delete} key on your keyboard.

  5. Click on the OK button.

  6. Click on the Save button. Failure to save at this point will repopulate the password field(s).

 

 

 

Click here to return to the beginning of this document

 

 

 


Using the Read-only recommended option, whenever anyone tries to open the workbook, Microsoft Excel displays a message that recommends that the workbook should be opened as Read-only unless it's necessary to save changes. Excel does not prevent users from editing and then saving changes to the workbook.

To set the Read-only recommended option:

  1. Select File from the main menu, then Save As.

  2. Click on the O ptions button.

  3. In the Save Options box, click in the Read-only recommended check box.

  4. Click on the OK button.

  5. Click on the Save button. If prompted, click Yes to replace the existing workbook with the open workbook.

This is a recommendation only to the user that it may be best to access this workbook as read-only, but does not change the file's attributes to read-only.

 

 

Click here to return to the beginning of this document

 

 

 


To unlock cells so that they can be changed, the worksheet must not be protected.

  1. Select the cell range you want to unlock.

  2. Select F ormat from the main menu, then select C ells.

  3. Click on the Protection tab.

  4. Click in the Locked check box to de-select it.

 

After you protect the worksheet, the cells that you unlocked in this procedure are the only cells that can be changed.

 

Click here to return to the Limit viewing and editing on an individual worksheet

Click here to return to the beginning of this document

 

 

 


To unlock graphic objects so that they can be changed, the worksheet must not be protected.

Graphic objects include embedded charts, maps created with the Microsoft Excel mapping feature, buttons, text boxes, and other objects create by using the Drawing toolbar. You do not need to unlock a button to be able to click it so that it performs its assigned function after you protect the worksheet. Unlock a button only if you want to be able to change its text or appearance.

To unlock a graphic object:

  1. Select the graphic object you want to unlock by holding down the { Ctrl} key and clicking once on the object.

  2. Select F ormat from the main menu.

  3. Click the command for the object you selected. Depending on the type of graphic object, the command you are looking for could be AutoShape, Object, Text Box, Picture, or WordArt. It's generally the first choice on the list.

  4. Click on the Protection tab.

  5. Click in the Locked check box to de-select it. If the selected object is a text box, clear the Lock text check box.

Note: After you protect the worksheet, the graphic objects that you unlocked in this procedure are the only ones that can be changed.

 

Click here to return to the Limit viewing and editing on an individual worksheet

Click here to return to the beginning of this document

 

 

 


To hide or unhide formulas:

  1. Select the range of cells whose formulas you want to hide. You can also select nonadjacent ranges (hold down the CTRL key) or the entire sheet.

  2. Select F ormat from the main menu, then select C ells.

  3. Click on the Protection tab.

  4. Click in the H idden check box. (A check mark denotes the selected range(s) will be hidden).

  5. Click on the OK button.

 

Click here to return to the Limit viewing and editing on an individual worksheet

Click here to return to the beginning of this document

 

 

 

 

 

Created by the PeopleSoft Knowledge Management Team.
Copyright © 1998, 1999-2001 All rights reserved.
Created: pjb 10/28/1998
Revised: kcw 06/11/2001