Developing an Excel Application Tutorial 7: Developing an Excel Application New Perspectives on Microsoft Excel 2013
Objectives: Create an application Create , edit , and delete defined names for cells and ranges Paste a list of defined names as documentation Use defined names in formulas Add defined name to existing formulas Create validation rules for data entry Protect the content of worksheets and workbook Add , edit , and delete comments New Perspectives on Microsoft Excel 2013
Visual Overview New Perspectives on Microsoft Excel 2013
Excel Application and Defined Names New Perspectives on Microsoft Excel 2013
Planning an Excel Application A spreadsheet written or tailored to meet specific needs The interface helps others use it Typically includes reports and charts, a data entry area, a custom interface, instructions, and documentation New Perspectives on Microsoft Excel 2013
Naming Cells and Ranges Use a defined name to: Assign a meaningful, descriptive name to a cell or range Quickly navigate within a workbook to the cell with the defined name Create a more descriptive formula New Perspectives on Microsoft Excel 2013
Creating Defined Names Must begin with a letter or an underscore Can include letters, numbers, periods and underscores, but not other symbols or spaces Cannot be a valid cell address, function name, or reserved word Can include as many as 255 characters Short, meaningful names (5–15 characters) are more practical Are not case sensitive New Perspectives on Microsoft Excel 2013
Creating Defined Names Use the Name box to create defined names Name Box Select the cell or range to which you want to assign a name Click in the name box , type the name and then press enter (or In the FORMULA tab , in the defined Names Group click the define name button , type a name in the Name box and then click the OK button) New Perspectives on Microsoft Excel 2013
Creating Defined Names Use the Selection dialog box to create defined names by selection Select the range with labels to which you want to assign a name On the FURMULA tab , click the create from Selection button Specify whether to create the ranges based on the top row , bottom row , left column or right in the list Click the OK button New Perspectives on Microsoft Excel 2013
Editing and Deleting Defined Names On the FURMULA tab , click the Name Manager New Perspectives on Microsoft Excel 2013
Editing and Deleting Defined Names The edit dialog box (you can change the name and its reference cell or range ) New Perspectives on Microsoft Excel 2013
Using the Paste Names Command When a workbook contains many defined names , it can be helpful to list all of the names and their cell address in the workbook documentation Use the Paste Names Command to generate a list of names To create a list of defined names in the worksheet: Click the formulas Tab , click the Use in Formula button Click paste Names , the paste name dialog box open , you can paste any selected name or you can paste the entire list Click the Paste list button ( the defined names and their cell references are pasted ) New Perspectives on Microsoft Excel 2013
Using Defined Names in Formulas Descriptive formulas are simpler to enter and understand Ex: Range reference : = SUM(A2:A10) Defined Names : = SUM (Price) New Perspectives on Microsoft Excel 2013
Adding Defined Names to Existing Formulas Defined names are not automatically substituted for cell addresses in a formula Replace cell addresses in existing formulas with their defined names to make formulas more understandable Adding defined names to existing Formula: On the formula tab click the defined name button arrow then click apply Names In the apply names dialog box select the names you want to apply Click ok Or Edit the formula by selecting the cell reference and typing the defined name. New Perspectives on Microsoft Excel 2013
Visual Overview New Perspectives on Microsoft Excel 2013
Data Validation and Protection New Perspectives on Microsoft Excel 2013
Validating Data Entry Ensures that correct data is entered and stored in a worksheet Protects cells with formulas from accidental deletion Reduces repetitious keystrokes and mouse clicks Each validation rule defines criteria for data that can be stored in a cell or range Use Data Validation dialog box to specify validation criteria, input message, and error alert for the active cell New Perspectives on Microsoft Excel 2013
Specifying Validation Criteria When you create a validation rule, specify the type of data allowed as well as a list or range of acceptable values (validation criteria) New Perspectives on Microsoft Excel 2013
Specifying Validation Criteria On the DATA tab click the Data validation button Click the setting tab Click the Allow arrow , click the type of data allowed New Perspectives on Microsoft Excel 2013
Creating an Input Message Reduces the chance of a data-entry error Provides additional information about type of data allowed for the cell Appears as a ScreenTip next to selected cell On the DATA tab click the Data validation button Click the Input message tab Enter a title and text for the message New Perspectives on Microsoft Excel 2013
Creating an Error Alert Style and Message An error alert determines what happens after a user attempts to make an invalid entry in a cell that has a validation rule defined Tree error alert styles: Stop, Warning, and Information On the DATA tab click the Data validation button Click the Error Alert tab Select an alert style and then enter a title and a text for the error message New Perspectives on Microsoft Excel 2013
Creating a List Validation Rule Restricts a cell to accept only entries that are on a list you create Create the list of valid entries in the Data Validation dialog box, or use a list of valid entries in a single column or row On the DATA tab click the Data validation button Click the setting tab Click the Allow arrow , click the type of data allowed to be list In the source enter the range you want Then click ok New Perspectives on Microsoft Excel 2013
Protecting a Worksheet and a Workbook Reduces data-entry errors by limiting access to certain parts of the workbook Prevents users from changing cell contents, workbook organization, or viewing formulas New Perspectives on Microsoft Excel 2013
Locking and Unlocking Cells A cell’s locked property determines whether changes can be made to that cell Locked property has no impact as long as worksheet is unprotected; after worksheet is protected, locked property is in control Default: Locked property is turned on for each cell, and worksheet protection is turned off Common practice: Protect the worksheet, but leave some cells unlocked New Perspectives on Microsoft Excel 2013
Locking and Unlocking Cells To unlock the cell In the home tab click the format button and then click format cell The format cell dialog box open , the locked property in the protection tab New Perspectives on Microsoft Excel 2013
Protecting a Worksheet Specify the actions still available to users A protected worksheet can be unprotected Require a password to turn off protection only if you are concerned that users might make changes On the REVIEW tab click the protect sheet button Enter a password Select all the actions you want to allow users to take Click ok New Perspectives on Microsoft Excel 2013
Protecting a Workbook Keeps a worksheet from being modified Protecting the structure prohibits renaming, deleting, hiding, or inserting worksheets Protecting the windows prohibits moving, resizing, closing, or hiding parts of the window Default: Protect only the structure of the workbook, not the windows used to display it On the REVIEW tab click the protect Workbook button Enter a password Click the check box to indicate if you want to protect the workbook structure , windows or both Click ok New Perspectives on Microsoft Excel 2013
Unprotecting a Worksheet and a Workbook A worksheet must be unprotected to edit its contents A workbook must be unprotected to change its structure On the REVIEW tab click the unprotect sheet button Enter a password of asked Click ok New Perspectives on Microsoft Excel 2013
Inserting Comments Use comments to: Explain contents of a particular cell Provide instructions to users Share ideas and notes from several users collaborating on a project To insert a comment: Select the cell to which you want to attach a comment Right click the selected cell and then click insert a comment Type the comment Click a cell to hide the comment New Perspectives on Microsoft Excel 2013