Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. XP Troubleshooting Workbooks and Creating Excel Applications Chapter 10 “For every failure, there’s an alternative course of action. You just have to find it. When you come to a roadblock, take a detour.” -Mary Kay Ash
  2. 2. XP Chapter Introduction • Information system  Collects, organizes, and processes data  Communicates and distributes coordinated results • Decision support system (DSS)  Helps managers model business scenarios, especially through what-if analysis • Minimizing data-entry errors in Excel workbooks • Documenting workbooks and troubleshooting worksheet errors
  3. 3. XP Chapter Introduction (continued) • Automating tasks to further enhance usefulness and reliability of workbooks • Tools covered in this chapter: Data Validation, Formula Auditing, Macro Recorder, Visual Basic Editor
  4. 4. XP Tools Covered in this Chapter • Data Validation • Formula Auditing • Macro Recorder • Visual Basic Editor
  5. 5. XP Level 1 Objectives: Preparing Error-Free Workbooks • Plan an Excel application • Validate data entry • Protect workbooks • Document workbooks
  6. 6. XP Planning an Excel Application • Workbooks designed so others can use them • Usually a decision support system  Support decisions by allowing what-if analysis and other types of data analysis • Typically provide an easy-to-use interface  Custom buttons  Clearly written documentation  Instructions for entering data and performing calculations
  7. 7. XP Planning an Excel Application
  8. 8. XP Controlling Data-Entry Errors Data validation tool • Creates rules that define what data is valid in a particular cell • Ensures that data entered in a cell meets specified criteria Validation rule • Specifies type of data that is appropriate • Specifies range of acceptable values Input message • Identifies kind of data user should enter Error alert •Displays a message of varying severity
  9. 9. XP Validating Data Using the Data Validation Tool 1. Set up the data validation rule 2. Create the input message 3. Specify the error alert style and message
  10. 10. XP Setting Up a Data Validation Rule
  11. 11. XP Setting Up a Data Validation Rule
  12. 12. XP Setting Up a Data Validation Rule
  13. 13. XP Setting Up a Data Validation Rule
  14. 14. XP Creating an Input Message
  15. 15. XP Specifying an Alert Style and Message
  16. 16. XP Specifying an Alert Style and Message
  17. 17. XP Circling Invalid Data This tool finds and marks cells containing data that do not meet validation criteria
  18. 18. XP Protecting Workbooks • Ways to protect workbooks  Lock cells so users cannot change contents  Hide cells so users cannot see them  Specify which actions users can perform  Prevent a worksheet from being deleted from a workbook • Select appropriate level of protection (worksheet, workbook, file)
  19. 19. XP Locking and Unlocking Cells • To allow users to change contents of unlocked cell, but not the contents of locked cells:  Unlock cells you want users to change access (Locked property of a cell)  Protect the worksheet to engage the Locked property of the cells
  20. 20. XP Locking and Unlocking Cells
  21. 21. XP Protecting a Worksheet • Users cannot change content of locked cells • Specify what users can do in the worksheet (format, enter data) • Can specify passwords that users enter a case- sensitive password before they remove protection
  22. 22. XP Protecting a Worksheet
  23. 23. XP Hiding and Displaying Rows and Columns
  24. 24. XP Protecting a Workbook • To prohibit users from adding, renaming, or deleting worksheets in the workbook • Secure workbook structure or its windows  Structure (cannot insert, delete, or rename worksheets)  Windows (Excel windows are same size and position each time workbook opens) • Can specify that users enter a case-sensitive password before they remove protection
  25. 25. XP Documenting Workbooks • Documentation  All records that describe how and why a system has been developed and how it should be used  Tremendous time-saver  Can include within a workbook or print workbook information (documentation worksheet or workbook’s formulas)
  26. 26. XP Types of Documentation for Excel Applications • Basic information (workbook author, date of creation, purpose) • Step-by-step instructions for entering data and performing calculations • Notes or comments that identify the source of data • Notes or comments that define terms, explain calculations, describe assumptions
  27. 27. XP Providing a Thorough Documentation Worksheet
  28. 28. XP Including Comments in a Worksheet
  29. 29. XP Level 1 Summary • Planning an Excel application that others can use • Validating data entry • Protecting a workbook • Providing thorough documentation for users  Documentation worksheet  Cell comments
  30. 30. XP Level 2 Objectives: Preventing Errors in Formulas • Audit formulas for accuracy and validity • Evaluate and trace formula errors • Identify, analyze, and correct errors • Set error-checking options
  31. 31. XP Auditing Formulas • Taking advantage of more sophisticated Excel tools that help find and respond to formula errors  Address error messages caused by problems with the formulas in the workbook  Audit formulas
  32. 32. XP Addressing Error Messages Caused by Problems with Formulas • Fix obvious errors • Use the Error Alert button • Examine the formula
  33. 33. XP Using the Formula Auditing Tools • Permit review of structure and behavior of formula • Grouped on Formula Auditing toolbar • May display tracer arrows  Precedent cells (contain a value used in a formula)  Dependent cells (contain a formula that refers to other cells) • Can result in false positives and false negatives
  34. 34. XP Formula Auditing Tools
  35. 35. XP Tracing and Solving Formula Errors
  36. 36. XP Tracing Errors
  37. 37. XP Identifying and Correcting Errors
  38. 38. XP Identifying and Correcting Errors
  39. 39. XP Tracing Precedent Cells
  40. 40. XP Tracing Precedent Cells
  41. 41. XP Tracing Dependent Cells Traces components of a formula that references other cells
  42. 42. XP Tracing Dependent Cells
  43. 43. XP Setting Error-Checking Options
  44. 44. XP Level 2 Summary • Using Excel formula auditing tools to trace and correct errors  Auditing formulas  Evaluating error messages in cells
  45. 45. XP Level 3 Objectives: Automating Excel Tasks • Plan and record macros to automate repetitive tasks and create Excel applications • Run and test macros • Add buttons to a worksheet • Edit macros using the Visual Basic Editor
  46. 46. XP Understanding Macros • Series of commands that you store and then run when you need to perform a task • Steps – stored as Visual Basic for Applications (VBA) commands in the macro – are performed in sequence when you run the macro • To create a macro  Use macro recorder, or  Write from scratch by entering VBA commands in the Visual Basic Editor
  47. 47. XP Recording a Macro • Use macro recorder to record keystrokes and mouse actions • Assign a macro to a shortcut key
  48. 48. XP Recording a Macro
  49. 49. XP Running a Macro • Press the shortcut key assigned to the macro, or • Use the Macro dialog box
  50. 50. XP Running a Macro
  51. 51. XP Creating a Macro Button
  52. 52. XP Creating a Macro Button
  53. 53. XP Editing a Macro in the Visual Basic Editor Open Visual Basic Editor to view the code of a macro
  54. 54. XP Understanding VBA Basics • Sub procedures • Comments • VBA commands the macro performs • “End Sub” indicates end of sub procedure or macro
  55. 55. XP Sample Workbook
  56. 56. XP Level 3 Summary • Automating a workbook by creating and running a macro • Assigning a button to the macro to make it easy to use • Working in the Visual Basic Editor window to edit a macro so it runs more efficiently
  57. 57. XP Chapter Summary • Creating an Excel application that functions as a decision support system  Preparing error-free workbooks  Preventing errors in formulas  Automating Excel tasks