Download presentation
Presentation is loading. Please wait.
1
Data Validation and Protecting Workbook
LEC: 4
2
Data validation Data validation is an Excel feature that you can use to define restrictions on what data can or should be entered in a cell . You can configure data validation to prevent users from entering data that is not valid. If you prefer , you can allow users to enter invalid data but warn them when they try to type it in the cell . You can also provide messages to define what input you expect for the cell , and instructions to help users correct any errors .
3
Data validation ( Cont .. )
With data validation , you can do the following : 1- (restrict entries)Restrict what values are possible for cells that contain numbers, dates, and text 2- Show people a warning if they enter invalid data — or prevent them from entering invalid data in the first place 3- (custom rules)Allow people to select a cells contents from a list .
4
Specifying Validation Criteria
To specify the type of data allowable in a cell or range, follow the steps below 1. Select the cell or range. 2. Choose Data ➪ Data Tools ➪ Data Validation. Excel displays its Data Validation dialog box. 3. Click the Settings tab. 4. Choose an option from the Allow drop-down list..
5
The three tabs of the Data Validation dialog box.
6
Cont: 5.Specify the conditions by using the displayed controls. Your selection in Step 4 determines what other controls you can access. 6. (Optional) Click the Input Message tab and specify which message to display when a user selects the cell. You can use this optional step to tell the user what type of data is expected. If this step is omitted, no message will appear when the user selects the cell. 7. (Optional) Click the Error Alert tab and specify which error message to display when a user makes an invalid entry. The selection for Style determines what choices users have when they make invalid entries. To prevent an invalid entry, choose Stop. If this step is omitted, a standard message will appear if the user makes an invalid entry. 8. Click OK. The cell or range contains the validation criteria you specified.
7
Example 1 : Use data validation in Excel to make sure that users enter certain values into a cell. we restrict users to enter a whole number between 0 and 10.
8
Example 1: ( Cont .. ) Create Data Validation Rule To create the data validation rule, execute the following steps. 1. Select cell C2. 2. On the Data tab, click Data Validation.
9
On the Settings tab: 3. In the Allow list, click Whole number. 4
On the Settings tab: 3. In the Allow list, click Whole number. 4. In the Data list, click between. 5. Enter the Minimum and Maximum values Example 1: ( Cont .. )
10
Example1 : ( Cont .. ) Error Alert
If users ignore the input message and enter a number that is not valid, you can show them an error alert. On the Error Alert tab: 1. Check 'Show error alert after invalid data is entered'. 2. Enter a title. 3. Enter an error message.
11
Types of Validation Criteria You Can Apply
Any Value: Selecting this option removes any existing data validation. Note, however, that the input message, if any, still displays if the check box is checked on the Input Message tab. Whole Number: The user must enter a whole number. You specify a valid range of whole numbers by using the Data drop-down list
12
Count: List: The user must choose from a list of entries you provide
Date: The user must enter a date. You specify a valid date range from choices in the Data drop-down list. Time: The user must enter a time. You specify a valid time range from choices in the Data drop-down list..
13
Count: Text Length: The length of the data (number of characters) is limited. Custom: To use this option, you must supply a logical formula that determines the validity of the user’s entry (a logical formula returns either TRUE or FALSE).
14
Protecting Worksheet
15
Protecting Your Work Types of Protection Worksheet protection
To protect a worksheet, activate the worksheet and choose Review ➪ Changes ➪ Protect Sheet. To unprotect a protected sheet, choose Review ➪ Changes ➪ Unprotect Sheet. Workbook protection Visual Basic (VB) protection
16
Sheet protection options
Select Locked Cells Select Unlocked Cells Format Cells Format Columns Format Rows Insert Columns Insert Rows Insert Hyperlinks Delete Columns Delete Rows
17
Protecting a Workbook Excel provides three ways to protect a workbook:
Require a password to open the workbook. Prevent users from adding sheets, deleting sheets, hiding sheets, and unhiding sheets. Prevent users from changing the size or position of windows. To add a password to a workbook, follow these steps: 1. Choose File ➪ Info ➪ Protect Workbook ➪ Encrypt With Password. 2. Type a password and click OK. 3. Type the password again and click OK. 4. Save the workbook.
18
Protecting a workbook’s windows
To protect the workbook’s windows: 1. Choose Review ➪ Changes ➪ Protect Workbook. 2. In the Protect Workbook dialog box, select the Windows check box. 3. (Optional) Enter a password. 4. Click OK.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.