Download presentation
Presentation is loading. Please wait.
Published byDwight Reeves Modified over 9 years ago
1
The Advantage Series ©2005 The McGraw-Hill Companies, Inc. All rights reserved Chapter 11 Developing Applications Using Excel Microsoft Office Excel 2003
2
©2005 The McGraw-Hill Companies, Inc. All rights reserved 2 11.1 Planning a Workbook Application To be successful as a spreadsheet developer, place yourself in the users’ position and strive to meet their expectations. Before you enter even the first label on a worksheet, understand your target audience and identify their basic input and output requirements. The users for your workbook application are the people who will enter and manipulate the data, analyze calculated results, and make decisions based on its reports and charts. They are also, most likely, the people paying your salary!
3
©2005 The McGraw-Hill Companies, Inc. All rights reserved 3 11.1.1 Creating Shared Workbook Figure 11.1 Opening the EX1110 workbook The OrderForm worksheet draws data from the PriceList and Suppliers worksheet lists These worksheet lists are used for populating the OrderForm worksheet
4
©2005 The McGraw-Hill Companies, Inc. All rights reserved 4 11.1.1 Creating Shared Workbook Figure 11.2 Share Workbook dialog box: Advanced tab Select the interval frequency for displaying changes made by other users Select whether to store a change history for the workbook (recommended) Specify the method for dealing with change conflicts between users Specify the settings to save in the custom view for each user
5
©2005 The McGraw-Hill Companies, Inc. All rights reserved 5 11.1.2 Tracking Changes to a Workbook Figure 11.3 Highlight Changes dialog box
6
©2005 The McGraw-Hill Companies, Inc. All rights reserved 6 11.1.2 Tracking Changes to a Workbook Figure 11.4 Tracking changes in a shared workbook A ScreenTip, colored row number and column letter, triangular cell indicator, and a cell outline highlight the changed cell
7
©2005 The McGraw-Hill Companies, Inc. All rights reserved 7 11.1.2 Tracking Changes to a Workbook Figure 11.5 History worksheet showing tracked changes Excel 2003 inserts and populates a new History worksheet with the changes that have been tracked in the shared workbook Use the AutoFilter drop-down arrows to limit the display of information in the History worksheet
8
©2005 The McGraw-Hill Companies, Inc. All rights reserved 8 11.1.2 Tracking Changes to a Workbook Figure 11.6 Select Changes to Accept or Reject dialog box
9
©2005 The McGraw-Hill Companies, Inc. All rights reserved 9 11.1.2 Tracking Changes to a Workbook Figure 11.7 Accept or Reject Changes dialog box
10
©2005 The McGraw-Hill Companies, Inc. All rights reserved 10 11.1.3 Merging Workbook Revisions Figure 11.8 Selecting multiple workbook files to compare and merge
11
©2005 The McGraw-Hill Companies, Inc. All rights reserved 11 11.1.3 Merging Workbook Revisions Figure 11.9 Reviewing tracked changes after merging workbooks
12
©2005 The McGraw-Hill Companies, Inc. All rights reserved 12 11.1.3 Merging Workbook Revisions Figure 11.10 Displaying the History tracking worksheet
13
©2005 The McGraw-Hill Companies, Inc. All rights reserved 13 11.2 Validating data Validating data that is entered into a worksheet ensures the reliability and accuracy of a workbook application. In addition to displaying drop-down lists of values, Excel 2003’s data validation feature provides helpful prompts and can even warn users when incorrect entries are made. As a workbook developer, it is your job to determine what data is valid by setting a numeric or date range or by comparing an entry to a list of acceptable values. This module presents several techniques for ensuring the completeness and accuracy of data.
14
©2005 The McGraw-Hill Companies, Inc. All rights reserved 14 11.2.1 Applying Conditional Formatting Figure 11.11 Opening the EX1120 workbook
15
©2005 The McGraw-Hill Companies, Inc. All rights reserved 15 11.2.1 Applying Conditional Formatting Figure 11.12 Conditional Formatting dialog box Specify a condition by first selecting “Cell Value Is” or “Formula Is” Preview the formatting options selected Select the formatting to apply if the current condition evaluates to true Specify up to three conditions
16
©2005 The McGraw-Hill Companies, Inc. All rights reserved 16 11.2.1 Applying Conditional Formatting Figure 11.13 Specifying a condition based on a cell value
17
©2005 The McGraw-Hill Companies, Inc. All rights reserved 17 11.2.1 Applying Conditional Formatting Figure 11.14 Specifying a condition based on a formula
18
©2005 The McGraw-Hill Companies, Inc. All rights reserved 18 11.2.1 Applying Conditional Formatting Figure 11.15 Applying conditional formatting a worksheet
19
©2005 The McGraw-Hill Companies, Inc. All rights reserved 19 11.2.2 Applying and Removing Validation Rules Figure 11.16 Data Validation dialog box: Settings tab
20
©2005 The McGraw-Hill Companies, Inc. All rights reserved 20 11.2.2 Applying and Removing Validation Rules Figure 11.17 Data Validation dialog box: Input Message tab
21
©2005 The McGraw-Hill Companies, Inc. All rights reserved 21 11.2.2 Applying and Removing Validation Rules Figure 11.18 Data Validation dialog box: Error Alert tab
22
©2005 The McGraw-Hill Companies, Inc. All rights reserved 22 11.2.2 Applying and Removing Validation Rules Figure 11.19 Displaying a custom warning message Displays the text entered on the Error Alert tab of the Data Validation dialog box Displays the text entered on the Input Message tab of the Data Validation dialog box
23
©2005 The McGraw-Hill Companies, Inc. All rights reserved 23 11.2.3 Finding and Copying Validation Rules Figure 11.20 Go To Special dialog box Select the Data validation option button and then All or Same to locate validation rules in your worksheet
24
©2005 The McGraw-Hill Companies, Inc. All rights reserved 24 11.2.3 Finding and Copying Validation Rules Figure 11.21 Paste Special dialog box
25
©2005 The McGraw-Hill Companies, Inc. All rights reserved 25 11.2.4 Using Dynamic Ranges For Data Validation Figure 11.22 Creating a dynamic range reference
26
©2005 The McGraw-Hill Companies, Inc. All rights reserved 26 11.2.4 Using Dynamic Ranges For Data Validation Figure 11.23 Using a dynamic range in a validation rule
27
©2005 The McGraw-Hill Companies, Inc. All rights reserved 27 11.3 Auditing a Worksheet To audit a worksheet means to review it for incorrect or suspect entries and formulas. Although conditional formatting and data validation provide some measure of error checking, mistakes can still occur when you construct and use a worksheet. For these instances, Excel 2003 offers several auditing features to assist you in tracking down rogue cells. Microsoft Office Excel 2003 also provides cell indicators and option buttons to assist you in performing error checking. In this module, you learn to use various auditing tools to find errors and graphically display cell dependencies.
28
©2005 The McGraw-Hill Companies, Inc. All rights reserved 28 11.3.1 Identifying Cell Indicators, Option Buttons, and Smart Tags Figure 11.24 Opening the EX1131 workbook
29
©2005 The McGraw-Hill Companies, Inc. All rights reserved 29 11.3.1 Identifying Cell Indicators, Option Buttons, and Smart Tags Figure 11.25 Using the Insert Options button When you insert a new row, the formatting from the topmost row is applied to the new row. The Insert Options button appears to speed the process of changing this formatting assumption.
30
©2005 The McGraw-Hill Companies, Inc. All rights reserved 30 11.3.1 Identifying Cell Indicators, Option Buttons, and Smart Tags Figure 11.26 AutoCorrect dialog box: Smart tags tab Select this check box to enable smart tags This list area displays the available libraries of keyword “recognizers.” You can activate the built-in lists independently for identifying cells containing dates, financial symbols, Outlook e-mail recipients, and other items Select this check box to store the identified smart tags in the workbook Check the current workbook for cell data recognized as smart tag labels Access the Microsoft Web site to download additional libraries of keyword recognizers
31
©2005 The McGraw-Hill Companies, Inc. All rights reserved 31 11.3.1 Identifying Cell Indicators, Option Buttons, and Smart Tags Figure 11.27 Displaying the Smart Tag Actions menu “MSFT” is recognized as a stock symbol and labeled with a smart tag cell indicator Click the Smart Tag Actions button to display a context-sensitive menu
32
©2005 The McGraw-Hill Companies, Inc. All rights reserved 32 11.3.1 Identifying Cell Indicators, Option Buttons, and Smart Tags Figure 11.28 Retrieving stock information from the Web using a smart tag Each blue underlined term is a hyperlink that you click to launch your default browser and display a Web page The stock information is placed on a new worksheet. The original data remains unchanged on the Sheet1 worksheet tab
33
©2005 The McGraw-Hill Companies, Inc. All rights reserved 33 11.3.2 Locating Invalid Data Using The Formula Auditing ToolBar Figure 11.29 Opening the EX1130 workbook
34
©2005 The McGraw-Hill Companies, Inc. All rights reserved 34 11.3.2 Locating Invalid Data Using The Formula Auditing ToolBar Figure 11.30 Formula Auditing toolbar
35
©2005 The McGraw-Hill Companies, Inc. All rights reserved 35 11.3.2 Locating Invalid Data Using The Formula Auditing ToolBar Figure 11.31 Auditing a worksheet for non- complying values Because this value does not comply with the data validation rule specified, it appears highlighted using a red auditing circle Formula Auditing toolbar
36
©2005 The McGraw-Hill Companies, Inc. All rights reserved 36 11.3.3 Tracing Precedents and Dependents Figure 11.32 Tracing precedents for a formula Each circle endpoint shows a cell that provides precedent information for the selected formula
37
©2005 The McGraw-Hill Companies, Inc. All rights reserved 37 11.3.3 Tracing Precedents and Dependents Figure 11.33 Tracing immediate and associated precedents
38
©2005 The McGraw-Hill Companies, Inc. All rights reserved 38 11.3.3 Tracing Precedents and Dependents Figure 11.34 Tracing dependents in a worksheet Each arrowhead endpoint shows a cell that is dependent on the selected cell for information
39
©2005 The McGraw-Hill Companies, Inc. All rights reserved 39 11.3.4 Locating Errors In Formulas Figure 11.35 Error Checking dialog box A “Divide by Zero Error” has been found in cell F14. Notice that the formula is also displayed above the error description
40
©2005 The McGraw-Hill Companies, Inc. All rights reserved 40 11.3.4 Locating Errors In Formulas Figure 11.36 Evaluate Formula dialog box The next expression to be evaluated is shown in the Evaluation area The formula error checker already knows that an error will result in the next calculation
41
©2005 The McGraw-Hill Companies, Inc. All rights reserved 41 11.3.4 Locating Errors In Formulas Figure 11.37 Displaying the Watch Window Drag the borderlines to size the columns
42
©2005 The McGraw-Hill Companies, Inc. All rights reserved 42 11.3.4 Locating Errors In Formulas Figure 11.38 Tracing calculation errors using the Watch Window
43
©2005 The McGraw-Hill Companies, Inc. All rights reserved 43 11.3.5 Preventing Calculation Errors Figure 11.39 Nesting an ISERROR function within an IF function Drag the borderlines to size the columns.
44
©2005 The McGraw-Hill Companies, Inc. All rights reserved 44 11.4 Automating A Workbook Excel 2003 has assigned most monotonous tasks to toolbar buttons and “Auto” commands. However, there are still tasks that you will have to perform over and over again that are not included as buttons on a toolbar. Excel 2003 allows you to store and play back keystrokes and commands. In addition to saving you an enormous amount of time, these stored instructions, called macros, also improve the consistency and accuracy of repetitive procedures. Using a macro, you can execute a sequence of instructions by simply clicking a button, pressing a key combination, or selecting a name from a list box.
45
©2005 The McGraw-Hill Companies, Inc. All rights reserved 45 11.4.1 Recording a Macro Figure 11.40 Record macro dialog box Provide a shortcut key for executing the macro quickly Provide a descriptive one-word name for the macro Select a storage location for the macro. Where you store a macro determines its availability to other workbooks Enter a description specifying the purpose of the macro. Excel 2003 enters a description like this one automatically
46
©2005 The McGraw-Hill Companies, Inc. All rights reserved 46 11.4.1 Recording a Macro Figure 11.41 Completing the Record Macro dialog box Select a storage location for the macro. Where you store a macro determines its availability to other workbooks.
47
©2005 The McGraw-Hill Companies, Inc. All rights reserved 47 11.4.1 Recording a Macro Figure 11.42 Recording cell formatting commands Stop Recording toolbar “Recording” status
48
©2005 The McGraw-Hill Companies, Inc. All rights reserved 48 11.4.2 Playing Back a Macro Figure 11.43 Macro dialog box All of the macros stored in the Macros in selection appear in this list box Select which macros to view in the list box A description of the currently selected macro is displayed
49
©2005 The McGraw-Hill Companies, Inc. All rights reserved 49 11.4.2 Playing Back a Macro Figure 11.44 Executing a macro to enter a business name and address All of the macros stored in the Macros in selection appear in this list box.
50
©2005 The McGraw-Hill Companies, Inc. All rights reserved 50 11.4.3 Protecting Yourself From Macro Viruses Figure 11.45 Security dialog box: Security Level tab Most users will specify the “Medium” security setting if they also have antivirus software installed on their system. If you do not have a virus scanner, consider selecting the High or Very High security For more information about security settings, trusted publishers, and digital signing, click the Help button in the Title bar This computer has a virus scanner installed
51
©2005 The McGraw-Hill Companies, Inc. All rights reserved 51 11.4.3 Protecting Yourself From Macro Viruses Figure 11.46 Opening a workbook containing macros
52
©2005 The McGraw-Hill Companies, Inc. All rights reserved 52 11.4.3 Protecting Yourself From Macro Viruses Figure 11.47 Opening a workbook and running macros
53
©2005 The McGraw-Hill Companies, Inc. All rights reserved 53 11.4.4 Editing a Recorded Macro Figure 11.48 Displaying macro code in the Visual Basic Editor Code window Macro name The Code window contains the VBA programming code Comment
54
©2005 The McGraw-Hill Companies, Inc. All rights reserved 54 11.4.4 Editing a Recorded Macro Figure 11.49 Editing VBA programming code
55
©2005 The McGraw-Hill Companies, Inc. All rights reserved 55 11.4.5 Printing Your Macros Figure 11.50 Print dialog box in the Visual Basic Editor Specify whether to print the selected code, the entire module, or all the modules in the current project When printing a custom form, you can specify whether to print its image, in addition to its code
56
©2005 The McGraw-Hill Companies, Inc. All rights reserved 56 11.5 Customizing Menus and ToolBars When Microsoft Office Excel 2003 is first installed on your system, the Menu bar, shortcut menus, and toolbars are set up in a default configuration. As you gain experience with Excel 2003 and create macros for automating everyday procedures, you may want to customize the application window to your preferred way of working. Fortunately, Excel 2003’s environment is extremely flexible and easily changed. You can change the number of worksheets that are displayed in a new workbook. You can even modify the existing interface elements, such as the Menu bar, and create entirely new menu options and toolbars. Whatever your requirements, your overall objective should be to make it easier to access the commands and procedures you use most often.
57
©2005 The McGraw-Hill Companies, Inc. All rights reserved 57 11.5.1 Modifying the Menu Bar Figure 11.51 Customize dialog box: Commands tab The Categories list box provides options similar to the topmost items on the Menu bar The Commands list box displays the commands available within the selected category
58
©2005 The McGraw-Hill Companies, Inc. All rights reserved 58 11.5.1 Modifying the Menu Bar Figure 11.52 Adding a new item to the menu Dragging the “Custom Menu Item” to the bottom of the Insert menu
59
©2005 The McGraw-Hill Companies, Inc. All rights reserved 59 11.5.1 Modifying the Menu Bar Figure 11.53 Assigning a macro to the new “Insert Business Name” menuitem
60
©2005 The McGraw-Hill Companies, Inc. All rights reserved 60 11.5.2 Manipulating Toolbars Figure 11.54 Floating the Standard toolbar The move handle for the Formatting toolbar The Standard toolbar appears as a floating window with a Title bar and Close button
61
©2005 The McGraw-Hill Companies, Inc. All rights reserved 61 11.5.2 Manipulating Toolbars Figure 11.55 Displaying and hiding toolbars
62
©2005 The McGraw-Hill Companies, Inc. All rights reserved 62 11.5.3 Customizing a Toolbar Figure 11.56 Removing a button from the Formatting toolbar Dragging the Bold button from the Formatting toolbar into the worksheet
63
©2005 The McGraw-Hill Companies, Inc. All rights reserved 63 11.5.3 Customizing a Toolbar Figure 11.57 Adding a button to the Standard toolbar Dragging the “Publish as Web Page” option to the left of the Print button
64
©2005 The McGraw-Hill Companies, Inc. All rights reserved 64 11.5.4 Creating a New Toolbar Figure 11.58 Changing a toolbar button’s image
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.