P R O B L E M - S O LV I N G C A S E S I N M I C RO S O F T ® AC C E S S ™ A N D E XC E L ® Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. P R O B L E M - S O LV I N G C A S E S I N M I C RO S O F T ® AC C E S S ™ A N D E XC E L ® Sixteenth Annual Edition Ellen F. Monk Joseph A. Brady Emilio I. Mendelsohn Australia • Brazil • Mexico • Singapore • United Kingdom • United States Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may be suppressed. Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. The publisher reserves the right to remove content from this title at any time if subsequent rights restrictions require it. For valuable information on pricing, previous editions, changes to current editions, and alternate formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for materials in your areas of interest. Important Notice: Media content referenced within the product description or the product text may not be available in the eBook version. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Problem-Solving Cases in Microsoft® Access™ and Excel®, 16th Annual Edition Ellen F. Monk, Joseph A. Brady, Emilio I. Mendelsohn © 2020, 2017 Cengage Learning, Inc. Unless otherwise noted, all content is © Cengage. WCN: 02-300 ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced or distributed in any form or by any means, except as SVP, Higher Education Product Management: Erin Joyner ­permitted by U.S. copyright law, without the prior written permission of the copyright owner. VP, Product Management: Mike Schenk SOURCE FOR TABLES AND OTHER ILLUSTRATIONS: Copyright © Cengage. Product Director: Lauren Murphy All screenshots, unless otherwise noted, are used with permission from Product Manager: Jaymie Falconi Corporation. Product Assistant: Anna Goulart The authors acknowledge www.fakenamegenerator.com, which can be used Vice President, Marketing – Science, Microsoft Corporation. Microsoft® is a registered trademark of the Microsoft to generate data for case scenarios. Technology, & Math: Jason Sakos For product information and technology assistance, contact us at Senior Marketing Director: Michele McTighe Cengage Customer & Sales Support, 1-800-354-9706 or support.cengage.com. Executive Marketing Manager: Jill Staut Marketing Development Manager: For permission to use material from this text or product, Samantha Best submit all requests online at www.cengage.com/permissions. Product Specialist: Danielle Klahr Director, Content Creation: Juliet Steiner Senior Manager, Content Creation: Patty Stephan Content Manager: Michele Stulga Developmental Editor: Dan Seiter Technical Editor: John Freitas Designer: Lizz Anderson Production Service/Composition: Lumina Datamatics Ltd. Cover image: Peach Mango/Shutterstock.com Library of Congress Control Number: 2019938234 ISBN: 978-0-357-13863-2 Cengage 20 Channel Street Boston, MA 02210 USA Cengage is a leading provider of customized learning solutions with employees residing in nearly 40 different countries and sales in more than 125 countries around the world. Find your local representative at www.cengage.com. Cengage products are represented in Canada by Nelson Education, Ltd. To learn more about Cengage platforms and services, register or access your online learning solution, or purchase materials for your course, visit www.cengage.com. Notice to the Reader Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis in connection with any of the product information contained herein. Publisher does not assume, and expressly disclaims, any obligation to obtain and include information other than that provided to it by the manufacturer. The reader is expressly warned to consider and adopt all safety precautions that might be indicated by the activities described herein and to avoid all potential hazards. By following the instructions contained herein, the reader willingly assumes all risks in connection with such instructions. The publisher makes no representations or warranties of any kind, including but not limited to, the warranties of fitness for particular purpose or merchantability, nor are any such representations implied with respect to the material set forth herein, and the publisher takes no responsibility with respect to such material. The publisher shall not be liable for any special, consequential, or exemplary damages resulting, in whole or part, from the readers’ use of, or reliance upon, this material. Printed in the United States of America Print Number: 01 Print Year: 2019 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. To Karen: Thanks for your support! —JAB To my problem-solving students. —EFM To our little bean: Although we never met you, we loved you all the same. Mom and Dad —EIM Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. BRIEF CONTENTS Preface ix Pa r t 1 : Da tab as e C as e s U sing M icrosoft Access Tutorial A Database Design 3 Tutorial B Microsoft Access 13 Case 1 Preliminary Case: Dog Hikes 53 Case 2 The Parks and Recreation Database 59 Case 3 The Senior Concierge Database 67 Case 4 The Fresh Fish Distributor Database 73 Case 5 The Volunteer Fire Company Database 79 Pa r t 2 : D ec is io n S u p p o r t C ases Using M icrosoft Excel Scenario Man ag er Tutorial C Building a Decision Support System in Excel 89 Case 6 The Ski Resort Investment Decision 113 Case 7 The College Town Budget 121 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. viii Brief Contents Pa r t 3 : De c is io n S u p p o r t C ases Using M icrosoft Excel Solver Tutorial D Building a Decision Support System Using Microsoft Excel Solver 133 Case 8 Rose Tree Regional Airline 151 Case 9 The Auto Maker Product Mix Problem 163 Pa r t 4 : I nteg ratio n C a s e s Using M icrosoft Access and Excel Case 10 The Donation Letter Analysis 173 Case 11 San Francisco Fire Incidents 183 Case 12 San Francisco Fire Incidents: Advanced Analysis 191 Pa r t 5 : Adva n ce d S kills U sing M icrosoft Excel Tutorial E Guidance for Excel Cases 203 Index 219 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. P R E FAC E For more than two decades, we have taught MIS courses at the university level. From the start, we wanted to use good computer-based case studies for the database and decision-support portions of our courses. At first, we could not find a casebook that met our needs! This surprised us because we thought our requirements were not unreasonable. First, we wanted cases that asked students to think about realworld business situations. Second, we wanted cases that provided students with hands-on experience, using the kind of software that they had learned to use in their computer literacy courses—and that they would later use in business. Third, we wanted cases that would strengthen students’ ability to analyze a problem, examine alternative solutions, and implement a solution using software. Undeterred by the lack of casebooks, we wrote our own for Cengage. This is the sixteenth casebook we have written for Cengage. The cases are all new, and the tutorials have been updated using Microsoft Office 2019. As with our prior casebooks, we include tutorials that prepare students for the cases, which are challenging but doable. The cases are organized to help students think about the logic of each case’s business problem and then about how to use the software to solve the business problem. The cases fit well in an undergraduate MIS course, an MBA information systems course, or a computer science course devoted to business-oriented programming. To date we have written nearly 200 cases. We are proud to say that all of them have tried to teach students how to use software to help them make good business decisions. The business computing environment continues to evolve, and our cases should follow that evolution. To stay current, students need to learn a broader range of data analysis activities. Therefore, we have increased the range of topics covered in our casebook. This edition contains instruction and a case on the differences between handling operational data and analytical data. We have placed greater emphasis throughout the Excel portion of the text on the various uses of pivot tables. In the future, we intend to further increase the range of data analysis topics we cover. We welcome feedback from instructors on this process. If there are additional topics you want to see covered in future editions or topics that should be covered differently, let us know! Please contact Jaymie Falconi, our product manager at Cengage. B O O K O R G A N I Z AT I O N The book is organized into five parts: • • • • • Database cases using Access Decision support cases using the Excel Scenario Manager Decision support cases using Excel Solver Integration cases and data analysis using Access and Excel Advanced Excel skills Part 1 begins with two tutorials that prepare students for the Access case studies. Parts 2 and 3 each begin with a tutorial that prepares students for the Excel case studies. All four tutorials provide students with practice in using the software’s features—the kind of support that other books about Access and Excel do not provide. Part 4 challenges students to use both Access and Excel to find a solution to a business problem. Part 5 is a tutorial about advanced skills students might need to complete some of the Excel cases. The next sections explore these parts of the book in more depth. Part 1: Database Cases Using Microsoft Access This section begins with two tutorials and then presents five case studies. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. x Preface Tutorial A: Database Design This tutorial helps students understand how to set up tables to create a database without requiring ­students to learn formal analysis and design methods, such as data normalization. Tutorial B: Microsoft Access The second tutorial teaches students the more advanced features of Access queries and reports—­ features that students will need to know to complete the cases. Cases 1–5 Five database cases follow Tutorials A and B. The students must use the Access database in each case to create forms, queries, and reports that help management. The first case is an easier “warm-up” case. The next four cases require more effort to design the database and implement the results. Part 2: Decision Support Cases Using Microsoft Excel Scenario Manager This section has one tutorial and two decision support cases that require the use of the Excel Scenario Manager. Tutorial C: Building a Decision Support System in Excel This section begins with a tutorial that uses Excel to explain decision support and fundamental c­ oncepts of spreadsheet design. The case emphasizes the use of Scenario Manager to organize the output of ­multiple “what-if” scenarios. Cases 6–7 Students can complete these two cases with Scenario Manager. In each case, students must use Excel to model two or more solutions to a problem. Students then use the model outputs to identify and ­document the preferred solution in a memo. Part 3: Decision Support Cases Using ­Microsoft Excel Solver This section has one tutorial and two decision support cases that require the use of Excel Solver. Tutorial D: Building a Decision Support System Using Microsoft Excel Solver This section begins with a tutorial for using Excel Solver, a powerful decision support tool for solving optimization problems. Cases 8–9 Students use the Excel Solver tool in each case to analyze alternatives and identify and document the preferred solution. Part 4: Integration Cases Using Microsoft Access and Excel Cases 10–12 These cases integrate Access and Excel. In Case 10, students will analyze data using Access queries, an Excel table, and an Excel pivot table. Cases 11 and 12 show students how to share data between Access and Excel to solve problems and to use the fundamentals of data analysis. For example, Case 12 illustrates the basic differences between operational and analytical data and how to minimize operational impacts during data analysis. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Preface Part 5: Advanced Skills Using Microsoft Excel This part contains one tutorial that focuses on using advanced techniques in Excel. Tutorial E: Guidance for Excel Cases Some cases may require the use of Excel techniques that are not discussed in other tutorials or cases in this casebook. For example, techniques for using tables and pivot tables are explained in Tutorial E rather than in the cases themselves. Note that previous editions of the book included a Tutorial F for guidance on giving an oral presentation. This tutorial is now available at the Cengage Web site. To access the tutorial, see “Using the Cases and Tutorials” below. INDIVIDUAL CASE DESIGN The format of the cases uses the following template: • • • • • Each case begins with a Preview and an overview of the tasks. The next section, Preparation, tells students what they need to do or know to complete the case successfully. Again, the tutorials also prepare students for the cases. The third section, Background, provides the business context that frames the case. The background of each case models situations that require the kinds of thinking and analysis that students will need in the business world. The Assignment sections are generally organized to help students develop their analyses. The last section, Deliverables, lists the finished materials that students must hand in: printouts, a memorandum, and files. The list is similar to the deliverables that a business manager might demand. USING THE CASES AND TUTORIALS We have successfully used cases like these in our undergraduate MIS courses. We usually begin the semester with Access database instruction. We assign the Access database tutorials and then a case to each student. Then, to teach students how to use the Excel decision support system, we do the same thing: We assign a tutorial and then a case. Some instructors have asked for access to extra cases, especially in the second semester of a school year. For example, they assigned the integration case in the fall, and they need another one for the spring. To meet this need, we have set up an online “Hall of Fame” that features some of our favorite cases from prior editions. These password-protected cases are available to instructors on the Instructor Companion Site for this text. Go to www.cengage.com to log in to your instructor account and search for this textbook by title, author, or ISBN. Note that the cases are in Microsoft Office 2016 format. T E C H N I CA L I N F O R M AT I O N The cases in this textbook were written using Microsoft Office 2019, and the textbook was tested for quality assurance using the Windows 10 operating system, Microsoft Access 2019, and Microsoft Excel 2019. DATA F I L E S A N D S O L U T I O N F I L E S We have created “starter” data files as needed for some of the Excel cases, so students need not spend time typing in the spreadsheet skeleton. Other cases ask students to load Access starter files. All of these files are on the Instructor and Student Companion Sites for this text. To access the Instructor or Student Companion Site, go to www.cengage.com, log in to your account, and search for this textbook by title, author, or ISBN. You are granted a license to copy the data files to any computer or computer network used by people who have purchased this textbook. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. xi xii Preface Solutions to the material in the text are available to instructors on the Instructor Companion Site for this text at www.cengage.com. Search for this textbook by title, author, or ISBN. The solutions are password protected. ACKNOWLEDGMENTS We would like to give many thanks to the team at Cengage, including our product manager, ­Jaymie ­Falconi; our developmental editor, Dan Seiter; our technical editor, John Freitas; and our content manager, Michele Stulga. As always, we acknowledge our students’ diligent work. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. PART 1 DATABASE CASES USING MICROSOFT ACCESS TUTORIAL A Database Design, 3 TUTORIAL B Microsoft Access, 13 CASE 1 Preliminary Case: Dog Hikes, 53 CASE 2 The Parks and Recreation Database, 59 CASE 3 The Senior Concierge Database, 67 CASE 4 The Fresh Fish Distributor Database, 73 CASE 5 The Volunteer Fire Company Database, 79 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. TUTORIAL A DATABASE DESIGN This tutorial has three sections. The first section briefly reviews basic database terminology. The second section teaches database design. The third section features a database design problem for practice. REVIEW OF TERMINOLOGY You will begin by reviewing some basic terms that will be used throughout this textbook. In Access, a database is a group of related objects that are saved in one file. An Access object can be a table, form, query, or report. You can identify an Access database file by its suffix, .accdb. A table consists of data that is arrayed in rows and columns. A row of data is called a record. A column of data is called a field. Thus, a record is a set of related fields. The fields in a table should be related to one another in some way. For example, a company might want to keep its employee data together by creating a database table called Employee. That table would contain data fields about employees, such as their names and addresses. It would not have data fields about the company’s customers; that data would go in a Customer table. A field’s values have a data type that is declared when the table is defined. Thus, when data is entered into the database, the software knows how to interpret each entry. Data types in Access include the following: • • • • • • Text for words Integer for whole numbers Double for numbers that have a decimal value Currency for numbers that represent dollars and cents Yes/No for variables that have only two values (such as 1/0, on/off, yes/no, and true/false) Date/Time for variables that are dates or times Each database table should have a primary key field—a field in which each record has a unique value. For example, in an Employee table, a field called Employee Identification Number (EIN) could serve as a primary key. (This assumes that each employee is given a number when hired and that these numbers are not reused later.) Sometimes, a table does not have a single field whose values are all different. In that case, two or more fields are combined into a compound primary key. The combination of the fields’ values is unique. Database tables should be logically related to one another. For example, suppose a company has an Employee table with fields for EIN, Name, Address, and Telephone Number. For payroll purposes, the company has an Hours Worked table with a field that summarizes Labor Hours for individual employees. The relationship between the Employee table and Hours Worked table needs to be established in the database, so you can determine the number of hours worked by any employee. To create this relationship, you include the primary key field from the Employee table (EIN) as a field in the Hours Worked table. In the Hours Worked table, the EIN field is then called a foreign key because it’s from a “foreign” table. In Access, data can be entered directly into a table, or it can be entered into a form, which then inserts the data into a table. A form is a database object that is created from an existing table to make the process of entering data more user-friendly. A query is the database equivalent of a question that is posed about data in a table (or tables). For ­example, suppose a manager wants to know the names of employees who have worked for the company for more than five years. A query could be designed to search the Employee table for the information. The query would be run, and its output would answer the question. Queries can be designed to search multiple tables at a time. For this to work, the tables must be ­connected by a join operation, which links tables on the values in a field that they have in common. The ­common field acts as a “hinge” for the joined tables; when the query is run, the query generator treats the joined tables as one large table. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 4 Tutorial A In Access, queries that answer a question are called select queries because they select relevant data from the database records. Queries can also be designed to change data in records, add a record to the end of a table, or delete entire records from a table. These queries are called update, append, and delete queries, respectively. Access has a report generator that can be used to format a table’s data or a query’s output. DATABASE DESIGN Designing a database involves determining which tables belong in the database and then creating the fields that belong in each table. This section begins with an introduction to key database design concepts, then discusses design rules you should use when building a database. First, the following key concepts are defined: • • • Entities Relationships Attributes Database Design Concepts Computer scientists have highly formalized ways of documenting a database’s logic. Learning their notations and mechanics can be time-consuming and difficult. In fact, doing so usually takes a good portion of a systems analysis and design course. This tutorial will teach you database design by emphasizing practical business knowledge; the approach should enable you to design serviceable databases quickly. Your instructor may add more formal techniques. A database models the logic of an organization’s operation, so your first task is to understand the operation. You can talk to managers and workers, make your own observations, and look at business documents, such as sales records. Your goal is to identify the business’s “entities” (sometimes called objects). An entity is a thing or event that the database will contain. Every entity has characteristics, called attributes, and one or more relationships to other entities. Let’s take a closer look. Entities As previously mentioned, an entity is a tangible thing or an event. The reason for identifying entities is that an entity eventually becomes a table in the database. Entities that are things are easy to identify. For example, consider a car rental agency. The database for the agency would probably need to contain the names of vehicles and the names of customers who rent them, so you would have one entity named Vehicles and another named Customer. In contrast, entities that are events can be more difficult to identify, probably because they are more conceptual. However, events are real, and they are important. In the rental agency example, one event would be Vehicle Rental and another event would be Hours Worked by employees. In general, your analysis of an organization’s operations is made easier when you realize that organizations usually have physical entities such as these: • • • • Employees Customers Inventory (products or services) Suppliers Thus, the database for most organizations would have a table for each of these entities. Your analysis also can be made easier by knowing that organizations engage in transactions internally (within the company) and externally (with the outside world). Such transactions are explained in an introductory accounting course, but most people understand them from events that occur in daily life. Consider the following examples: • • Organizations generate revenue from sales or interest earned. Revenue-generating transactions include event entities called Sales and Interest Earned. Organizations incur expenses from paying hourly employees and purchasing materials from suppliers. Hours Worked and Purchases are event entities in the databases of most organizations. Thus, identifying entities is a matter of observing what happens in an organization. Your powers of observation are aided by knowing what entities exist in the databases of most organizations. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Database Design Relationships As an analyst building a database, you should consider the relationship of each entity to the other entities you have identified. For example, a college database might contain entities for Student, Course, and Section to contain data about each. A relationship between Student and Section could be expressed as “Students enroll in sections.” An analyst also must consider the cardinality of any relationship. Cardinality can be one-to-one, one-tomany, or many-to-many: • • • In a one-to-one relationship, one instance of the first entity is related to just one instance of the second entity. In a one-to-many relationship, one instance of the first entity is related to many instances of the second entity, but each instance of the second entity is related to only one instance of the first. In a many-to-many relationship, one instance of the first entity is related to many instances of the second entity, and one instance of the second entity is related to many instances of the first. For a more concrete understanding of cardinality, consider again the college database with the Student, Course, and Section entities. The university catalog shows that a course such as Accounting 101 can have more than one section: 01, 02, 03, 04, and so on. Thus, you can observe the following relationships: • • The relationship between the entities Course and Section is one-to-many. Each course has many sections, but each section is associated with just one course. The relationship between Student and Section is many-to-many. Each student can be in more than one section, because each student can take more than one course. Also, each section has more than one student. Thinking about relationships and their cardinalities may seem tedious to you. However, as you work through the cases in this text, you will see that this type of analysis can be valuable in designing databases. In the case of many-to-many relationships, you should determine the tables a given database needs; in the case of one-to-many relationships, you should decide which fields the tables need to share. Attributes An attribute is a characteristic of an entity. You identify attributes of an entity because attributes become a table’s fields. If an entity can be thought of as a noun, an attribute can be considered an ­adjective that describes the noun. Continuing with the college database example, consider the Student entity. Students have names, so Last Name would be an attribute of the Student entity and therefore a field in the Student table. First Name would be another attribute, as well as Address, Phone Number, and other descriptive fields. Sometimes, it can be difficult to tell the difference between an attribute and an entity, but one good way is to ask whether more than one attribute is possible for each entity. If more than one instance is possible, but you do not know the number in advance, you are working with an entity. For example, assume that a student could have a maximum of two addresses—one for home and one for college. You could specify attributes Address 1 and Address 2. Next, consider that you might not know the number of student addresses in advance, meaning that all addresses have to be recorded. In that case, you would not know how many fields to set aside in the Student table for addresses. Therefore, you would need a separate Student Addresses table (entity) that would show any number of addresses for a given student. Database Design Rules As described previously, your first task in database design is to understand the logic of the business situation. Once you understand this logic, you are ready to build the database. To create a context for learning about database design, look at a hypothetical business operation and its database needs. Example: The Talent Agency Suppose you have been asked to build a database for a talent agency that books musical bands into nightclubs. The agent needs a database to keep track of the agency’s transactions and to answer day-to-day questions. For example, a club manager often wants to know which bands are available on a certain date at a certain time, or Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 5 6 Tutorial A wants to know the agent’s fee for a certain band. The agent may want to see a list of all band members and the instrument each person plays, or a list of all bands that have three members. Suppose that you have talked to the agent and have observed the agency’s business operation. You conclude that your database needs to reflect the following facts: 1. A booking is an event in which a certain band plays in a particular club on a particular date, starting and ending at certain times and performing for a specific fee. A band can play more than once a day. The Heartbreakers, for example, could play at the East End Cafe in the afternoon and then at the West End Cafe on the same night. For each booking, the club pays the talent agent. The agent keeps a 5 percent fee and then gives the remainder of the payment to the band. 2. Each band has at least two members and an unlimited maximum number of members. The agent notes a telephone number of just one band member, which is used as the band’s contact number. No two bands have the same name or telephone number. 3. Band member names are not unique. For example, two bands could each have a member named Sally Smith. 4. The agent keeps track of just one instrument that each band member plays. For the purpose of this database, “vocals” are considered an instrument. 5. Each band has a desired fee. For example, the Lightmetal band might want $700 per booking and would expect the agent to try to get at least that amount. 6. Each nightclub has a name, an address, and a contact person. The contact person has a telephone number that the agent uses to call the club. No two clubs have the same name, contact person, or telephone number. Each club has a target fee. The contact person will try to get the agent to accept that fee for a band’s appearance. Some clubs feed the band members for free; others do not. 7. Before continuing with this tutorial, you might try to design the agency’s database on your own. Ask yourself: What are the entities? Recall that business databases usually have Customer, Employee, and Inventory entities, as well as an entity for the event that generates revenue transactions. Each entity becomes a table in the database. What are the relationships among the entities? For each entity, what are its attributes? For each table, what is the primary key? Six Database Design Rules Assume that you have gathered information about the business situation in the talent agency example. Now you want to identify the tables required for the database and the fields needed in each table. Observe the following six rules: Rule 1: You do not need a table for the business. The database represents the entire business. Thus, in the example, Agent and Agency are not entities. Rule 2: Identify the entities in the business description. Look for typical things and events that will become tables in the database. In the talent agency example, you should be able to observe the following entities: • • Things: The product (inventory for sale) is Band. The customer is Club. Events: The revenue-generating transaction is Bookings. You might ask yourself: Is there an Employee entity? Isn’t Instrument an entity? Those issues will be ­discussed as the rules are explained. Rule 3: Look for relationships among the entities. Look for one-to-many relationships between entities. The relationship between those entities must be established in the tables, using a foreign key. For details, see the following discussion in Rule 4 about the relationship between Band and Band Member. Look for many-to-many relationships between entities. Each of these relationships requires a third entity that associates the two entities in the relationship. Recall the many-to-many relationship from the college database scenario that involved Student and Section entities. To display the enrollment of specific students in specific sections, a third table would be required. The mechanics of creating such a table are described in Rule 4 during the discussion of the relationship between Band and Club. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Database Design Rule 4: Look for attributes of each entity and designate a primary key. As previously mentioned, you should think of the entities in your database as nouns. You should then create a list of adjectives that describe those nouns. These adjectives are the attributes that will become the table’s fields. After you have identified fields for each table, you should check to see whether a field has unique values. If such a field exists, designate it as the primary key field; otherwise, designate a compound primary key. In the talent agency example, the attributes, or fields, of the Band entity are Band Name, Band Phone Number, and Desired Fee, as shown in Figure A-1. Assume that no two bands have the same name, so the primary key field can be Band Name. The data type of each field is shown. BAND Field Name Data Type Band Name (primary key) Text Band Phone Number Text Desired Fee Currency FIGURE A-1 The Band table and its fields Two Band records are shown in Figure A-2. Band Name (primary key) Band Phone Number Desired Fee Heartbreakers 981 831 1765 $800 Lightmetal 981 831 2000 $700 FIGURE A-2 Records in the Band table If two bands might have the same name, Band Name would not be a good primary key, so a different unique identifier would be needed. Such situations are common. Most businesses have many types of inventory, and duplicate names are possible. The typical solution is to assign a number to each product to use as the primary key field. A college could have more than one faculty member with the same name, so each faculty member would be assigned an EIN. Similarly, banks assign a personal identification number (PIN) for each depositor. Each automobile produced by a car manufacturer gets a unique vehicle identification number (VIN). Most businesses assign a number to each sale, called an invoice number. (The next time you go to a grocery store, note the number on your receipt. It will be different from the number on the next customer’s receipt.) At this point, you might be wondering why Band Member would not be an attribute of Band. The answer is that, although you must record each band member, you do not know in advance how many members are in each band. Therefore, you do not know how many fields to allocate to the Band table for members. (Another way to think about band members is that they are the agency’s employees, in effect. Databases for organizations usually have an Employee entity.) You should create a Band Member table with the attributes Member ID Number, Member Name, Band Name, Instrument, and Phone. A Member ID Number field is needed because member names may not be unique. The table and its fields are shown in Figure A-3. BAND MEMBER Field Name Data Type Member ID Number (primary key) Text Member Name Text Band Name (foreign key) Text Instrument Text Phone Text FIGURE A-3 The Band Member table and its fields Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 7 8 Tutorial A Note in Figure A-3 that the phone number is classified as a Text data type because the field values will not be used in an arithmetic computation. The benefit is that Text data type values take up fewer bytes than Numerical or Currency data type values; therefore, the file uses less storage space. You should also use the Text data type for number values such as zip codes. Five records in the Band Member table are shown in Figure A-4. Member ID Number (primary key) Member Name Band Name Instrument Phone 0001 Jamal Marshall Heartbreakers Guitar 981 444 1111 0002 Chantal Marshall Heartbreakers Vocals 981 444 1234 0003 Tirsa Abboud Heartbreakers Keyboard 981 555 1199 0004 Diego Flores Lightmetal Sax 981 888 1654 0005 Sue Hoopes Lightmetal Piano 981 888 1765 FIGURE A-4 Records in the Band Member table You can include Instrument as a field in the Band Member table because the agent records only one instrument for each band member. Thus, you can use the instrument as a way to describe a band member, much like the phone number is part of the description. Phone could not be the primary key because two members might share a telephone and because members might change their numbers, making database administration more difficult. You might ask why Band Name is included in the Band Member table. The common-sense reason is that you did not include the Member Name in the Band table. You must relate bands and members somewhere, and the Band Member table is the place to do it. To think about this relationship in another way, consider the cardinality of the relationship between Band and Band Member. It is a one-to-many relationship: one band has many members, but each member in the database plays in just one band. You establish such a relationship in the database by using the primary key field of one table as a foreign key in the other table. In Band Member, the foreign key Band Name is used to establish the relationship between the member and his or her band. The attributes of the Club entity are Club Name, Address, Contact Name, Club Phone Number, Preferred Fee, and Feed Band?. The Club table can define the Club entity, as shown in Figure A-5. CLUB Field Name Data Type Club Name (primary key) Text Address Text Contact Name Text Club Phone Number Text Preferred Fee Currency Feed Band? Yes/No FIGURE A-5 The Club table and its fields Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Database Design Two records in the Club table are shown in Figure A-6. Club Name (primary key) Address Contact Name Club Phone Number Preferred Fee Feed Band? East End 1 Duce St. Neev Kalb 981 444 8877 $600 Yes West End 99 Duce St. Vera Kaan 981 555 0011 $650 No FIGURE A-6 Records in the Club table You might wonder why Bands Booked into Club (or a similar name) is not an attribute of the Club table. There are two reasons. First, you do not know in advance how many bookings a club will have, so the value cannot be an attribute. Second, Bookings is the agency’s revenue-generating transaction, an event entity, and you need a table for that business transaction. Consider the booking transaction next. You know that the talent agent books a certain band into a certain club for a specific fee on a certain date, starting and ending at a specific time. From that information, you can see that the attributes of the Bookings entity are Band Name, Club Name, Booking Date, Start Time, End Time, and Fee. The Bookings table and its fields are shown in Figure A-7. BOOKINGS Field Name Data Type Band Name (foreign key) Text Club Name (foreign key) Text Booking Date Date/Time Start Time Date/Time End Time Date/Time Fee Currency FIGURE A-7 The Bookings table and its fields—and no designation of a primary key Some records in the Bookings table are shown in Figure A-8. Band Name Club Name Booking Date Start Time End Time Fee Heartbreakers East End 11/21/20 21:30 23:30 $800 Heartbreakers East End 11/22/20 21:00 23:30 $750 Heartbreakers West End 11/28/20 19:00 21:00 $500 Lightmetal East End 11/21/20 18:00 20:00 $700 Lightmetal West End 11/22/20 19:00 21:00 $750 FIGURE A-8 Records in the Bookings table Note that no single field is guaranteed to have unique values, because each band is likely to be booked many times and each club might be used many times. Furthermore, each date and time can appear more than once. Thus, no one field can be the primary key. If a table does not have a single primary key field, you can make a compound primary key whose field values will be unique when taken together. Because a band can be in only one place at a time, one possible solution is to create a compound key from the Band Name, Booking Date, and Start Time fields. An alternative solution is to create a compound primary key from the Club Name, Booking Date, and Start Time fields. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 9 10 Tutorial A If you don’t want a compound key, you could create a field called Booking Number. Each booking would then have its own unique number, similar to an invoice number. You can also think about this event entity in a different way. Over time, a band plays in many clubs, and each club hires many bands. Thus, Band and Club have a many-to-many relationship, which signals the need for a table between the two entities. A Bookings table would associate the Band and Club tables. You implement an associative table by including the primary keys from the two tables that are associated. In this case, the primary keys from the Band and Club tables are included as foreign keys in the Bookings table. Rule 5: Avoid data redundancy. You should not include extra (redundant) fields in a table. Redundant fields take up extra disk space and lead to data entry errors because the same value must be entered in multiple tables, increasing the chance of a keystroke error. In large databases, keeping track of multiple instances of the same data is nearly impossible, so contradictory data entries become a problem. Consider this example: Why wouldn’t Club Phone Number be included in the Bookings table as a field? After all, the agent might have to call about a last-minute booking change and could quickly look up the number in the Bookings table. Assume that the Bookings table includes Booking Number as the primary key and Club Phone Number as a field. Figure A-9 shows the Bookings table with the additional field. BOOKINGS Field Name Data Type Booking Number (primary key) Text Band Name (foreign key) Text Club Name (foreign key) Text Club Phone Number Text Booking Date Date/Time Start Time Date/Time End Time Date/Time Fee Currency FIGURE A-9 The Bookings table with an unnecessary field—Club Phone Number The fields Booking Date, Start Time, End Time, and Fee logically depend on the Booking Number primary key—they help define the booking. Band Name and Club Name are foreign keys and are needed to establish the relationship between the Band, Club, and Bookings tables. But what about Club Phone Number? It is not defined by the Booking Number. It is defined by Club Name—in other words, it is a function of the club, not of the booking. Thus, the Club Phone Number field does not belong in the Bookings table. It is already in the Club table. Perhaps you can see the practical data-entry problem of including Club Phone Number in Bookings. Suppose a club changed its contact phone number. The agent could easily change the number one time, in the Club table. However, the agent would need to remember which other tables contained the field and change the values there too. In a small database, this task might not be difficult, but in larger databases, having redundant fields in many tables makes such maintenance difficult, which means that redundant data is often incorrect. You might object by saying, “What about all of those foreign keys? Aren’t they redundant?” In a sense, they are. But they are needed to establish the one-to-many relationship between one entity and another, as discussed previously. Rule 6: Do not include a field if it can be calculated from other fields. A calculated field is made using the query generator. Thus, the agent’s fee is not included in the Bookings table because it can be calculated by query (here, 5 percent multiplied by the booking fee). Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Database Design The Talent Agency Tables in Microsoft Access The previous sections and figures describe the talent agency database tables, but the relationships between the tables might be more clear in a graphical representation, which you can create in Microsoft Access (see Figure A-10). FIGURE A-10 Graphical view of talent agency tables In Tutorial B, you will learn how to define a table in Access—in other words, you will input the fields and their data types and designate the table’s primary key. Tutorial B also explains how to query tables graphically in Access. Figure A-10 shows the talent agency’s tables as they would be used in the Access query generator. The relationships between tables are indicated by the links between the tables. For example, the Band Name field is the primary key in the Band table and a foreign key in the Band Member table. The two tables are linked by a common field to demonstrate that a band member is partially described by the name of a band. In a similar way, a club’s name partially describes Bookings, and the two tables can be linked by a common field, Club Name. PRACTICE DATABASE DESIGN PROBLEM Imagine that your town library wants to keep track of its business in a database, and that you have been called in to build the database. You talk to the town librarian, review the old paper-based records, and watch people use the library for a few days. You learn the following about the library: 1. Any resident of the town can get a library card simply by asking for one. The library considers each cardholder a member of the library. 2. The librarian wants to be able to contact members by telephone and by email. She calls members when books are overdue or when requested materials become available. She likes to email a thank-you note to each patron on his or her anniversary of becoming a member of the library. Without a database, contacting members efficiently can be difficult; for example, multiple members can have the same name. Also, a parent and a child might have the same first and last name, live at the same address, and share a phone. 3. The librarian tries to keep track of each member’s reading interests. When new books come in, the librarian alerts members whose interests match those books. For example, long-time member Sue Doaks is interested in reading Western novels, growing orchids, and baking bread. There must be some way to match her interests with available books. One complication is that, although the librarian wants to track all of a member’s reading interests, she wants to classify each book as being in just one category of interest. For example, the classic gardening book Orchids of France would be classified as a book about orchids or a book about France, but not both. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 11 12 Tutorial A 4. The library stocks thousands of books. Each book has a title and any number of authors. Also, more than one book in the library might have the same title. Similarly, multiple authors might have the same name. 5. A writer could be the author of more than one book. 6. A book will be checked out repeatedly as time goes on. For example, Orchids of France could be checked out by one member in March, by another member in July, and by another member in September. 7. The library must be able to identify whether a book is checked out. 8. A member can check out any number of books in one visit. Also, a member might visit the library more than once a day to check out books. 9. All books that are checked out are due back in two weeks, with no exceptions. The librarian would like to have an automated way of generating an overdue book list each day so she can telephone offending members. 10. The library has a number of employees. Each employee has a job title. The librarian is paid a salary, but other employees are paid by the hour. Employees clock in and out each day. Assume that all employees work only one shift per day and that all are paid weekly. Pay is deposited directly into an employee’s checking account—no checks are hand-delivered. The database needs to include the librarian and all other employees. Design the library’s database, following the rules set forth in this tutorial. Your instructor will specify the format of your work. Here are a few hints in the form of questions: • • • A book can have more than one author. An author can write more than one book. How would you describe the relationship between books and authors? The library lends books for free, of course. If you were to think of checking out a book as a sales transaction for zero revenue, how would you handle the library’s revenue-generating event? A member can borrow any number of books at one checkout. A book can be checked out more than once. How would you describe the relationship between checkouts and books? Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. TUTORIAL B MICROSOFT ACCESS Microsoft Access is a relational database package that runs on the Microsoft Windows operating system. There are many different versions of Access; this tutorial was prepared using Access 2019. Before using this tutorial, you should know the fundamentals of Access and know how to use Windows. This tutorial explains advanced Access skills you will need to complete database case studies. The tutorial concludes with a discussion of common Access problems and how to solve them. To prevent losing your work, always observe proper file-saving and closing procedures. To exit Access, click the File tab and select Close, then click the Close button in the upper-right corner. Always end your work with these steps so you will not have to redo your work. To begin this tutorial, you will create a new database called Employee. AT THE KEYBOARD Open Access. Click the Blank database icon from the templates list. Name the database Employee. Click the file folder next to the filename to browse for the folder where you want to save the file. Click the new folder, click Open, and then click OK. Otherwise, your file will be saved automatically in the Documents folder. Click the Create button. A portion of your opening screen should resemble the screen shown in Figure B-1. FIGURE B-1 Entering data in Datasheet view When you create a table, Access opens it in Datasheet view by default. Because you will use Design view to build your tables, close the new table by clicking the X in the upper-right corner of the table window that corresponds to Close “Table1.” You are now on the Home tab in the Database window of Access, as shown in Figure B-2. From this screen, you can create or change objects. FIGURE B-2 The Database window Home tab in Access CREATING TABLES Your database will contain data about employees, their wage rates, and the hours they worked. Defining Tables In the Database window, build three new tables using the following instructions. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 14 Tutorial B AT THE KEYBOARD Defining the Employee Table This table contains permanent data about employees. To create the table, click the Create tab and then click Table Design in the Tables group. The table’s fields are Last Name, First Name, Employee ID, Street Address, City, State, Zip, Date Hired, and US Citizen. The Employee ID field is the primary key field. Change the lengths of Short Text fields from the default 255 spaces to more appropriate lengths; for example, the Last Name field might be 30 spaces, and the Zip field might be 10 spaces. Your completed definition should resemble the one shown in Figure B-3. FIGURE B-3 Fields in the Employee table When you finish, click the File tab, select Save As, select Save Object As, click the Save As button, and then enter a name for the table. In this example, the table is named Employee. (It is a coincidence that the Employee table has the same name as its database file.) After entering the name, click OK in the Save As window. Close the table by clicking the Close button (X) that corresponds to the Employee table. Defining the Wage Data Table This table contains permanent data about employees and their wage rates. The table’s fields are Employee ID, Wage Rate, and Salaried. The Employee ID field is the primary key field. Use the data types shown in ­Figure B-4. Your definition should resemble the one shown in Figure B-4. FIGURE B-4 Fields in the Wage Data table Click the File tab and then select Save As, select Save Object As, and click the Save As button to save the table definition. Name the table Wage Data. Defining the Hours Worked Table The purpose of this table is to record the number of hours that employees work each week during the year. The table’s three fields are Employee ID (which has a Short Text data type), Week # (number–long integer), and Hours (number–double). The Employee ID and Week # are the compound keys. In the following example, the employee with ID number 08965 worked 40 hours in Week 1 of the year and 52 hours in Week 2. Employee ID Week # Hours 08965 1 40 08965 2 52 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access Note that no single field can be the primary key field because 08965 is an entry for each week. In other words, if this employee works each week of the year, 52 records will have the same Employee ID value at the end of the year. Thus, Employee ID values will not distinguish records. No other single field can ­distinguish these records either, because other employees will have worked during the same week number and some employees will have worked the same number of hours. For example, 40 hours—which corresponds to a full-time workweek—would be a common entry for many weeks. All of this presents a problem because a table must have a primary key field in Access. The solution is to use a compound primary key; that is, use values from more than one field to create a combined field that will distinguish records. The best compound key to use for the current example consists of the Employee ID field and the Week # field, because as each person works each week, the week number changes. In other words, there is only one combination of Employee ID 08965 and Week # 1. Because those values can occur in only one record, the combination distinguishes that record from all others. The first step of setting a compound key is to highlight the fields in the key. Those fields must appear one after the other in the table definition screen. (Plan ahead for that format.) As an alternative, you can highlight one field, hold down the Control key, and highlight the next field. AT THE KEYBOARD In the Hours Worked table, click the first field’s left prefix area (known as the row selector), hold down the mouse button, and drag down to highlight the names of all fields in the compound primary key. Your screen should resemble the one shown in Figure B-5. FIGURE B-5 Selecting fields for the compound primary key for the Hours Worked table Now click the Key icon. Your screen should resemble the one shown in Figure B-6. FIGURE B-6 The compound primary key for the Hours Worked table You have created the compound primary key and finished defining the table. Click the File tab and then select Save As, select Save Object As, and click the Save As button to save the table as Hours Worked. Adding Records to a Table At this point, you have set up the skeletons of three tables. The tables have no data records yet. If you printed the tables now, you would only see column headings (the field names). The most direct way to enter data into a table is to double-click the table’s name in the navigation pane at the left side of the screen and then type the data directly into the cells. NOTE To display and open the database objects, Access 2019 uses a navigation pane, which is on the left side of the Access window. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 15 16 Tutorial B AT THE KEYBOARD In the navigation pane, double-click the Employee table. Your data entry screen should resemble the one shown in Figure B-7. FIGURE B-7 The data entry screen for the Employee table The Employee table has many fields, some of which may be off the screen to the right. Scroll to see obscured fields. (Scrolling happens automatically as you enter data.) Figure B-7 shows all of the fields on the screen. Enter your data one field value at a time. Note that the first row is empty when you begin. Each time you finish entering a value, press Enter to move the cursor to the next cell. After you enter data in the last cell in a row, the cursor moves to the first cell of the next row and Access automatically saves the record. Thus, you do not need to click the File tab and then select Save after entering data into a table. When entering data in your table, you should enter dates in the following format: 6/15/2020. Access ­automatically expands the entry to the proper format in output. Also note that Yes/No variables are clicked (checked) for Yes; otherwise, the box is left blank for No. You can change the box from Yes to No by clicking it. Enter the data shown in Figure B-8 into the Employee table. If you make errors in data entry, click the cell, backspace over the error, and type the correction. FIGURE B-8 Data for the Employee table Note that the sixth record is your data record. Assume that you live in Elkton, Maryland; were hired on today’s date (enter the date); and are a U.S. citizen. Make up a fictitious Employee ID number. For purposes of this tutorial, the sixth record has been created using the name of one of this text’s authors and the employee ID 09911. After adding records to the Employee table, open the Wage Data table and enter the data shown in Figure B-9. FIGURE B-9 Data for the Wage Data table In this table, you are again asked to create a new entry. For this record, enter your own employee ID. Also assume that you earn $8 an hour and are not salaried. Note that when an employee’s Salaried box is not checked (in other words, Salaried 5 No), the implication is that the employee is paid by the hour. Because salaried employees are not paid by the hour, their hourly rate is 0.00. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access When you finish creating the Wage Data table, open the Hours Worked table and enter the data shown in Figure B-10. FIGURE B-10 Data for the Hours Worked table Notice that salaried employees are always given 40 hours. Nonsalaried employees (including you) might work any number of hours. For your record, enter your fictitious employee ID, 60 hours worked for Week 1, and 55 hours worked for Week 2. CREATING QUERIES Because you know how to create basic queries, this section explains the advanced queries you will create in the cases in this book. Using Calculated Fields in Queries A calculated field is an output field made up of other field values. A calculated field can be a field in a table; here it is created in the query generator. The calculated field here does not become part of the table—it is just part of the query output. The best way to understand this process is to work through an example. AT THE KEYBOARD Suppose you want to see the employee IDs and wage rates of hourly workers, and the new wage rates if all employees were given a 10 percent raise. To view that information, show the employee ID, the current wage rate, and the higher rate, which should be titled New Rate in the output. Figure B-11 shows how to set up the query. FIGURE B-11 Query setup for the calculated field Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 17 18 Tutorial B To set up this query, you need to select hourly workers by using the Salaried field with Criteria 5 No. Note in Figure B-11 that the Show box for the field is not checked, so the Salaried field values will not appear in the query output. Note the expression for the calculated field, which you can see in the far-right field cell: New Rate: 1.1 * [Wage Rate] The term New Rate: merely specifies the desired output heading. (Don’t forget the colon.) The rest of the expression, 1.1 * [Wage Rate], multiplies the old wage rate by 110 percent, which results in the 10 percent raise. In the expression, the field name Wage Rate must be enclosed in square brackets. Remember this rule: Any time an Access expression refers to a field name, the field name must be enclosed in square brackets. If you run this query, your output should resemble the one in Figure B-12. FIGURE B-12 Output for a query with calculated field Notice that the calculated field output is not shown in Currency format but as a Double—a number with digits after the decimal point. To convert the output to Currency format, select the output column by clicking the line above the calculated field expression. The column darkens to indicate its selection. Your data entry screen should resemble the one shown in Figure B-13. FIGURE B-13 Activating a calculated field in query design Then, on the Design tab, click Property Sheet in the Show/Hide group. The Field Properties sheet appears, as shown on the right in Figure B-14. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-14 Field properties of a calculated field Click Format and choose Currency, as shown in Figure B-15. Then click the X in the upper-right corner of the window to close it. FIGURE B-15 Currency format of a calculated field When you run the query, the output should resemble the one in Figure B-16. FIGURE B-16 Query output with formatted calculated field Next, you examine how to avoid errors when making calculated fields. Avoiding Errors When Making Calculated Fields Follow these guidelines to avoid making errors in calculated fields: • Do not enter the expression in the Criteria cell as if the field definition were a filter. You are making a field, so enter the expression in the Field cell. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 19 20 Tutorial B • Spell, capitalize, and space a field’s name exactly as you did in the table definition. If the table definition differs from what you type, Access thinks you are defining a new field by that name. Access then prompts you to enter values for the new field, which it calls a Parameter Query field. This problem is easy to debug because of the tag Parameter Query. If Access asks you to enter values for a parameter, you almost certainly misspelled a field name in an expression in a calculated field or criterion. For example, here are some errors you might make for Wage Rate: Misspelling: (Wag Rate) Case change: (wage Rate/WAGE RATE) Spacing change: (WageRate/Wage Rate) • Do not use parentheses or curly braces instead of the square brackets. Also, do not put parentheses inside square brackets. You can, however, use parentheses outside the square brackets in the normal algebraic manner. For example, suppose that you want to multiply Hours by Wage Rate to get a field called Wages Owed. This is the correct expression: Wages Owed: [Wage Rate] * [Hours] The following expression also would be correct: Wages Owed: ([Wage Rate] * [Hours]) But it would not be correct to omit the inside brackets, which is a common error: Wages Owed: [Wage Rate * Hours] “Relating” Two or More Tables by the Join Operation Often, the data you need for a query is in more than one table. To complete the query, you must join the tables by linking the common fields. One rule of thumb is that joins are made on fields that have common values, and those fields often can be key fields. The names of the join fields are irrelevant; also, the names of the tables or fields to be joined may be the same, but it is not required for an effective join. Make a join by bringing in (adding) the tables needed. Next, decide which fields you will join. Then click one field name and hold down the left mouse button while you drag the cursor over to the other field’s name in its window. Release the button. Access inserts a line to signify the join. (If a relationship between two tables has been formed elsewhere, Access inserts the line automatically, and you do not have to perform the clickand-drag operation. Access often inserts join lines without the user forming relationships.) You can join more than two tables. The common fields need not be the same in all tables; that is, you can daisy-chain them together. A common join error is to add a table to the query and then fail to link it to another table. In that case, you will have a table floating in the top part of the query by example (QBE) screen. When you run the query, your output will show the same records over and over. The error is unmistakable because there is so much redundant output. The two rules are to add only the tables you need and to link all tables. Next, you will work through an example of a query that needs a join. AT THE KEYBOARD Suppose you want to see the last names, employee IDs, wage rates, salary status, and citizenship only for U.S. citizens and hourly workers. Because the data is spread across two tables, Employee and Wage Data, you should add both tables and pull down the five fields you need. Then you should add the Criteria expressions. Set up your work to resemble the one in Figure B-17. Make sure the tables are joined on the common field, Employee ID. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-17 A query based on two joined tables You should quickly review the criteria you will need to set up this join: If you want data for employees who are U.S. citizens and who are hourly workers, the Criteria expressions go in the same Criteria row. If you want data for employees who are U.S. citizens or who are hourly workers, one of the expressions goes in the second Criteria row (the one with the or: notation). Now run the query. The output should resemble the one in Figure B-18, with the exception of the name “Brady.” FIGURE B-18 Output of a query based on two joined tables You do not need to print or save the query output, so return to Design view and close the query. Another practice query follows. AT THE KEYBOARD Suppose you want to see the wages owed to hourly employees for Week 2. You should show the last name, the employee ID, the salaried status, the week #, and the wages owed. Wages will have to be a calculated field ([Wage Rate] * [Hours]). The criteria are No for Salaried and 2 for the Week #. (This means that another “And” query is required.) Your query should be set up like the one in Figure B-19. FIGURE B-19 Query setup for wages owed to hourly employees for Week 2 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 21 22 Tutorial B NOTE In the query in Figure B-19, the calculated field column was widened so you could see the whole expression. To widen a column, click the column boundary line and drag to the right. Run the query. The output should be similar to that in Figure B-20, if you formatted your calculated field to Currency. FIGURE B-20 Query output for wages owed to hourly employees for Week 2 Notice that it was not necessary to pull down the Wage Rate and Hours fields to make the query work. You do not need to save or print the query output, so return to Design view and close the query. Summarizing Data from Multiple Records (Totals Queries) You may want data that summarizes values from a field for several records (or possibly all records) in a table. For example, you might want to know the average hours that all employees worked in a week or the total (sum) of all of the hours worked. Furthermore, you might want data grouped or stratified in some way. For example, you might want to know the average hours worked, grouped by all U.S. citizens versus all non-U.S. citizens. Access calls such a query a Totals query. These queries include the following operations: Sum The total of a given field’s values Count A count of the number of instances in a field—that is, the number of records. In the current example, you would count the number of employee IDs to get the number of employees. Average The average of a given field’s values Min The minimum of a given field’s values Var The variance of a given field’s values StDev The standard deviation of a given field’s values Where The field has criteria for the query output AT THE KEYBOARD Suppose you want to know how many employees are represented in the example database. First, bring the Employee table into the QBE screen. Because you will need to count the number of employee IDs, which is a Totals query operation, you must bring down the Employee ID field. To tell Access that you want a Totals query, click the Design tab and then click the Totals button in the Show/Hide group. A new row called the Total row opens in the lower part of the QBE screen. At this point, the screen resembles the one in Figure B-21. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-21 Totals query setup Note that the Total cell contains the words Group By. Until you specify a statistical operation, Access assumes that a field will be used for grouping (stratifying) data. To count the number of employee IDs, click next to Group By to display an arrow. Click the arrow to reveal a drop-down menu, as shown in Figure B-22. FIGURE B-22 Choices for statistical operation in a Totals query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 23 24 Tutorial B Select the Count operator. (You might need to scroll down the menu to see the operator you want.) Your screen should resemble the one shown in Figure B-23. FIGURE B-23 Count in a Totals query Run the query. Your output should resemble the one in Figure B-24. FIGURE B-24 Output of Count in a Totals query Notice that Access created a pseudo-heading, “CountOfEmployee ID,” by splicing together the statistical operation (Count), the word Of, and the name of the field (Employee ID). If you wanted a phrase such as “Count of Employees” as a heading, you would go to Design view and change the query to resemble the one shown in Figure B-25. FIGURE B-25 Heading change in a Totals query When you run the query, the output should resemble the one in Figure B-26. FIGURE B-26 Output of heading change in a Totals query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access You do not need to print or save the query output, so return to Design view and close the query. AT THE KEYBOARD As another example of a Totals query, suppose you want to know the average wage rate of employees, grouped by whether the employees are salaried. Figure B-27 shows how to set up your query. FIGURE B-27 Query setup for average wage rate of employees When you run the query, your output should resemble the one in Figure B-28. FIGURE B-28 Output of query for average wage rate of employees Recall the convention that salaried workers are assigned zero dollars an hour. Suppose you want to eliminate the output line for zero dollars an hour because only hourly-rate workers matter for the query. The query setup is shown in Figure B-29. FIGURE B-29 Query setup for nonsalaried workers only Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 25 26 Tutorial B When you run the query, you will get output for nonsalaried employees only, as shown in Figure B-30. FIGURE B-30 Query output for nonsalaried workers only Thus, it is possible to use Criteria in a Totals query, just as you would with a “regular” query. You do not need to print or save the query output, so return to Design view and close the query. AT THE KEYBOARD Assume that you want to see two pieces of information for hourly workers: (1) the average wage rate, which you will call Average Rate in the output, and (2) 110 percent of the average rate, which you will call the Increased Rate. To get this information, you can make a calculated field in a new query from a Totals query. In other words, you use one query as a basis for another query. Create the first query; you already know how to perform certain tasks for this query. The revised heading for the average rate will be Average Rate, so type Average Rate: Wage Rate in the Field cell. Note that you want the average of this field. Also, the grouping will be by the Salaried field. (To get hourly workers only, enter Criteria: No.) Confirm that your query resembles the one in Figure B-31, then save the query and close it. FIGURE B-31 A totals query with average Now begin a new query. However, instead of bringing in a table to the query design, select a query. To start a new query, click the Create tab and then click the Query Design button in the Queries group. The Show Table window appears. Click the Queries tab instead of using the default Tables tab, and select the query you just saved as a basis for the new query. The most difficult part of this query is to construct the expression for the calculated field. Conceptually, it is as follows: Increased Rate: 1.1 * [The current average] You use the new field name in the new query as the current average, and you treat the new name like a new field: Increased Rate: 1.1 * [Average Rate] Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access The query within a query is shown in Figure B-32. FIGURE B-32 A query within a query Figure B-33 shows the output of the new query. Note that the calculated field is formatted. FIGURE B-33 Output of an Expression in a Totals query You do not need to print or save the query output, so return to Design view and close the query. Using the Date() Function in Queries Access has two important date function features: • • The built-in Date() function gives you today’s date. You can use the function in query criteria or in a calculated field. The function “returns” the day on which the query is run; in other words, it inserts the value where the Date() function appears in an expression. Date arithmetic lets you subtract one date from another to obtain the difference—in number of days—between two calendar dates. For example, suppose you create the following expression: 10/9/2020 2 10/4/2020 Access would evaluate the expression as the integer 5 (9 minus 4 is 5). As another example of how date arithmetic works, suppose you want to give each employee a one-dollar bonus for each day the employee has worked. You would need to calculate the number of days between the employee’s date of hire and the day the query is run, and then multiply that number by $1. You would find the number of elapsed days by using the following equation: Date() 2 [Date Hired] Also suppose that for each employee, you want to see the last name, employee ID, and bonus amount. You would set up the query as shown in Figure B-34. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 27 28 Tutorial B FIGURE B-34 Date arithmetic in a query Assume that you set the format of the Bonus field to Currency. The output will be similar to that in ­Figure B-35, although your Bonus data will be different because you used a different date. FIGURE B-35 Output of query with date arithmetic Using Time Arithmetic in Queries Access also allows you to subtract the values of time fields to get an elapsed time. Assume that your database has a Job Assignments table showing the times that nonsalaried employees were at work during a day. The definition is shown in Figure B-36. FIGURE B-36 Date/Time data definition in the Job Assignments table Assume that the DateWorked field is formatted for Long Date and that the ClockIn and ClockOut fields are formatted for Medium Time. Also assume that for a particular day, nonsalaried workers were scheduled as shown in Figure B-37. FIGURE B-37 Display of date and time in a table Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access You want a query showing the elapsed time that your employees were on the premises for the day. When you add the tables, your screen may show the links differently. Click and drag the Job Assignments, Employee, and Wage Data table icons to look like those in Figure B-38. FIGURE B-38 Query setup for time arithmetic Figure B-39 shows the output, which looks correct. For example, employee 09911 was at work from 8:30 a.m. to 4:30 p.m., which is eight hours. But how does the odd expression that follows yield the correct answers? FIGURE B-39 Query output for time arithmetic ([ClockOut] 2 [ClockIn]) * 24 Why wouldn’t the following expression work? [ClockOut] 2 [ClockIn] Here is the answer: In Access, subtracting one time from the other yields the decimal portion of a 24-hour day. Returning to the example, you can see that employee 09911 worked eight hours, which is one-third of a day, so the time arithmetic function yields .3333. That is why you must multiply by 24—to convert from ­decimals to an hourly basis. Hence, for employee 09911, the expression performs the following calculation: 1/3 3 24 5 8. Note that parentheses are needed to force Access to do the subtraction first, before the multiplication. Without parentheses, multiplication takes precedence over subtraction. For example, consider the following expression: [ClockOut] 2 [ClockIn] * 24 In this example, ClockIn would be multiplied by 24, the resulting value would be subtracted from ­ClockOut, and the output would be a nonsensical decimal number. Deleting and Updating Queries The queries presented in this tutorial so far have been Select queries. They select certain data from specific tables based on a given criterion. You also can create queries to update the original data in a database. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 29 30 Tutorial B Businesses use such queries often, and in real time. For example, when you order an item from a Web site, the company’s database is updated to reflect your purchase through the deletion of that item from the company’s inventory. Consider an example. Suppose you want to give all nonsalaried workers a $0.50 per hour pay raise. Because you have only three nonsalaried workers, it would be easy to change the Wage Rate data in the table. However, if you had 3,000 nonsalaried employees, it would be much faster and more accurate to change the Wage Rate data by using an Update query that adds $0.50 to each nonsalaried employee’s wage rate. AT THE KEYBOARD Now you will change each of the nonsalaried employees’ pay via an Update query. Figure B-40 shows how to set up the query. FIGURE B-40 Query setup for an Update query So far, this query is just a Select query. Click the Update button in the Query Type group, as shown in ­Figure B-41. FIGURE B-41 Selecting a query type Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access Notice that you now have another line on the QBE grid called Update To:, which is where you specify the change or update the data. Notice that you will update only the nonsalaried workers by using a filter under the Salaried field. Update the Wage Rate data to Wage Rate plus $0.50, as shown in Figure B-42. Note that the update involves the use of brackets [ ], as in a calculated field. FIGURE B-42 Updating the wage rate for nonsalaried workers Now run the query by clicking the Run button in the Results group. If you cannot run the query because it is blocked by Disabled Mode, click the Enable Content button on the Security Warning message bar. When you successfully run the query, the warning message in Figure B-43 appears. FIGURE B-43 Update query warning When you click Yes, the records are updated. Check the updated records by viewing the Wage Data table. Each nonsalaried wage rate should be increased by $0.50. You could add or subtract data from another table as well. If you do, remember to put the field name in square brackets. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 31 32 Tutorial B Another type of query is the Delete query, which works like Update queries. For example, assume that your company has been purchased by the state of Delaware, which has a policy of employing only state residents. Thus, you must delete (or fire) all employees who are not exclusively Delaware residents. To do that, you would create a Select query. Using the Employee table, you would click the Delete button in the Query Type group, then bring down the State field and filter only those records that were not in Delaware (DE). Do not perform the operation, but note that if you did, the setup would look like the one in Figure B-44. FIGURE B-44 Deleting all employees who are not Delaware residents Using Parameter Queries A Parameter query is actually a type of Select query. For example, suppose your company has 5,000 employees and you want to query the database to find the same kind of information repeatedly, but about different employees each time. For example, you might want to know how many hours a particular employee has worked. You could run a query that you created and stored previously, but run it only for a particular employee. AT THE KEYBOARD Create a Select query with the format shown in Figure B-45. FIGURE B-45 Design of a Parameter query beginning as a Select query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access In the Criteria line of the QBE grid for the Employee ID field, type what is shown in Figure B-46. FIGURE B-46 Design of a Parameter query, continued Note that the Criteria line uses square brackets, as you would expect to see in a calculated field. Now run the query. You will be prompted for the employee’s ID number, as shown in Figure B-47. FIGURE B-47 Enter Parameter Value window Enter your own employee ID. Your query output should resemble the one in Figure B-48. FIGURE B-48 Output of a Parameter query MAKING SEVEN PRACTICE QUERIES This portion of the tutorial gives you additional practice in creating queries. Before making these queries, you must create the specified tables and enter the records shown in the “Creating Tables” section of this tutorial. The output shown for the practice queries is based on those inputs. AT THE KEYBOARD For each query that follows, you are given a problem statement and a “scratch area.” You also are shown what the query output should look like. Set up each query in Access and then run the query. When you are satisfied with the results, save the query and continue with the next one. Note that you will work with the Employee, Hours Worked, and Wage Data tables. 1. Create a query that shows the employee ID, last name, state, and date hired for employees who live in Delaware and were hired after 12/31/99. Perform an ascending sort by employee ID. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 33 34 Tutorial B First click the Sort cell of the field, and then choose Ascending or Descending. Before creating your query, use the table shown in Figure B-49 to work out your QBE grid on paper. Field Table Sort Show Criteria Or: FIGURE B-49 QBE grid template Your output should resemble the one in Figure B-50. FIGURE B-50 Number 1 query output 2. Create a query that shows the last name, first name, date hired, and state for employees who live in Delaware or were hired after 12/31/99. The primary sort (ascending) is on last name, and the secondary sort (ascending) is on first name. The Primary Sort field must be to the left of the Secondary Sort field in the query setup. Before creating your query, use the table shown in Figure B-51 to work out your QBE grid on paper. Field Table Sort Show Criteria Or: FIGURE B-51 QBE grid template If your name were Joseph Brady, your output would look like the one in Figure B-52. FIGURE B-52 Number 2 query output Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access 3. Create a query that sums the number of hours worked by U.S. citizens and the number of hours worked by non-U.S. citizens. In other words, create two sums, grouped on citizenship. The heading for total hours worked should be Total Hours Worked. Before creating your query, use the table shown in Figure B-53 to work out your QBE grid on paper. Field Table Total Sort Show Criteria Or: FIGURE B-53 QBE grid template Your output should resemble the one in Figure B-54. FIGURE B-54 Number 3 query output 4. Create a query that shows the wages owed to hourly workers for Week 1. The heading for the wages owed should be Total Owed. The output headings should be Last Name, Employee ID, Week #, and Total Owed. Before creating your query, use the table shown in Figure B-55 to work out your QBE grid on paper. Field Table Sort Show Criteria Or: FIGURE B-55 QBE grid template If your name were Joseph Brady, your output would look like the one in Figure B-56. FIGURE B-56 Number 4 query output Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 35 36 Tutorial B 5. Create a query that shows the last name, employee ID, hours worked, and overtime amount owed for hourly employees who earned overtime during Week 2. Overtime is paid at 1.5 times the normal hourly rate for all hours worked over 40. Note that the amount shown in the query should be just the overtime portion of the wages paid. Also, this is not a Totals query—amounts should be shown for individual workers. Before creating your query, use the table shown in Figure B-57 to work out your QBE grid on paper. Field Table Sort Show Criteria Or: FIGURE B-57 QBE grid template If your name were Joseph Brady, your output would look like the one in Figure B-58. FIGURE B-58 Number 5 query output 6. Create a Parameter query that shows the hours employees have worked. Have the Parameter query prompt for the week number. The output headings should be Last Name, First Name, Week #, and Hours. This query is for nonsalaried workers only. Before creating your query, use the table shown in Figure B-59 to work out your QBE grid on paper. Field Table Sort Show Criteria Or: FIGURE B-59 QBE grid template Run the query and enter 2 when prompted for the week number. Your output should look like the one in Figure B-60. FIGURE B-60 Number 6 query output Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access 7. Create an Update query that gives certain workers a merit raise. First, you must create an ­additional table, as shown in Figure B-61. FIGURE B-61 Merit Raises table Create a query that adds the Merit Raise to the current Wage Rate for employees who will receive a raise. When you run the query, you should be prompted with You are about to update two rows. Check the original Wage Data table to confirm the update. Before creating your query, use the table shown in Figure B-62 to work out your QBE grid on paper. Field Table Update to Criteria Or: FIGURE B-62 QBE grid template CREATING REPORTS Database packages let you make attractive management reports from a table’s records or from a query’s output. If you are making a report from a table, the Access report generator looks up the data in the table and puts it into report format. If you are making a report from a query’s output, Access runs the query in the background (you do not control it or see it happen) and then puts the output in report format. There are different ways to make a report. One method is to create one from scratch in Design view, but this tedious process is not explained in this tutorial. A simpler way is to select the query or table on which the report is based and then click Report on the Create tab. This streamlined method of creating reports is explained in this tutorial. Creating a Grouped Report This tutorial assumes that you already know how to create a basic ungrouped report, so this section teaches you how to make a grouped report. If you do not know how to create an ungrouped report, you can learn by following the first example in the upcoming section. AT THE KEYBOARD Suppose you want to create a report from the Hours Worked table. Select the table by clicking it once. Click the Create tab, then click Report in the Reports group. A report appears, as shown in Figure B-63. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 37 38 Tutorial B FIGURE B-63 Initial report based on a table On the Design tab, select the Group & Sort button in the Grouping & Totals group. Your report will have an additional selection at the bottom, as shown in Figure B-64. FIGURE B-64 Report with grouping and sorting options Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access Click the Add a group button at the bottom of the report, and then select Employee ID. Your report will be grouped as shown in Figure B-65. FIGURE B-65 Grouped report To complete this report, you need to total the hours for each employee by selecting the Hours column heading. Your report will show that the entire column is selected. On the Design tab, click the Totals button in the Grouping & Totals group, and then choose Sum from the menu, as shown in Figure B-66. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 39 40 Tutorial B FIGURE B-66 Totaling the hours Your report will look like the one in Figure B-67. FIGURE B-67 Completed report Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access Your report is currently in Layout view. To see how the final report looks when printed, click the Design tab and select Report View from the Views group. Your report looks like the one in Figure B-68, although only a portion is shown in the figure. FIGURE B-68 Report in Report view NOTE To change the picture or logo in the upper-left corner of the report when in Layout view, click the notebook symbol and press the Delete key. You can insert a logo in place of the notebook by clicking the Design tab and then clicking the Insert Image button in the Controls group. Moving Fields in Layout View If you group records based on more than one field in a report, the report will have an odd “staircase” look or display repeated data, or it will have both problems. Next, you will learn how to overcome these problems in Layout view. Suppose you make a query that shows an employee’s last name, first name, week number, and hours worked, and then you make a report from that query, grouping on last name only. See Figure B-69. FIGURE B-69 Query-based report grouped on last name Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 41 42 Tutorial B As you preview the report, notice the repeating data from the First Name field. In the report shown in Figure B-69, notice that the first name repeats for each week worked—hence, the staircase effect. The Week # and Hours fields are shown as subordinate to Last Name, as desired. Suppose you want the last name and first name to appear on the same line. If so, take the report into Layout view for editing. Click the first record for the First Name (in this case, Zarif) and drag the name up to the same line as the Last Name (in this case, Amari). Your report will now show the First Name on the same line as Last Name, thereby eliminating the staircase look, as shown in Figure B-70. FIGURE B-70 Report in Layout view with Last Name and First Name on the same line You can now add the sum of Hours for each group. Also, if you want to add more fields to your report, such as Street Address and Zip, you can repeat the preceding procedure. IMPORTING DATA Text or spreadsheet data is easy to import into Access. In business, it is often necessary to import data because companies use disparate systems. For example, assume that your healthcare coverage data is on the human resources manager’s computer in a Microsoft Excel spreadsheet. Open the Excel application and then create a spreadsheet using the data shown in Figure B-71. FIGURE B-71 Excel data Save the file and then close it. Now you can easily import the spreadsheet data into a new table in Access. With your Employee database open, click the External Data tab, then click New Data Source in the Import & Link group. In the drop-down list, choose From File 2 Excel. Browse to find the Excel file you just created, and make sure the first radio button is selected to import the source data into a new table in the current database (see Figure B-72). Click OK. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-72 Importing Excel data into a new table If necessary, choose the correct worksheet, as illustrated in Figure B-73. If the Excel file has only one sheet, move on to the next step, as shown in Figure B-74. FIGURE B-73 First screen in the Import Spreadsheet Wizard Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 43 44 Tutorial B Choose Next, and then make sure to select the First Row Contains Column Headings box, as shown in Figure B-74. FIGURE B-74 Choosing column headings in the Import Spreadsheet Wizard Choose Next. Accept the default setting for each field you are importing on the screen. Each field is assigned a text data type, which is correct for this table. Your screen should look like the one in Figure B-75. FIGURE B-75 Choosing the data type for each field in the Import Spreadsheet Wizard Choose Next. In the next screen of the wizard, you will be prompted to create an index—that is, to define a primary key. Because you will store your data in a new table, choose your own primary key (Employee ID), as shown in Figure B-76. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-76 Choosing a primary key field in the Import Spreadsheet Wizard Continue through the wizard, giving your table an appropriate name. After importing the table, take a look at its design by right-clicking the table and choosing Design View. Note that each field is very wide. Adjust the field properties as needed. MAKING FORMS Forms simplify the process of adding new records to a table. Creating forms is easy, and they can be applied to one or more tables. When you base a form on one table, you simply select the table, click the Create tab, and then select Form from the Forms group. The form will then contain only the fields from that table. When data is entered into the form, a complete new record is automatically added to the table. Forms with two tables are discussed next. Making Forms with Subforms You also can create a form that contains a subform, which can be useful when the form is based on two or more tables. Return to the example Employee database to see how forms and subforms would be useful for viewing all of the hours that each employee worked each week. Suppose you want to show all of the fields from the Employee table; you also want to show the hours each employee worked by including all fields from the Hours Worked table as well. To create the form and subform, first create a simple one-table form on the Employee table. Follow these steps: 1. Click once to select the Employee table. Click the Create tab, then click Form in the Forms group. After the main form is complete, it should resemble the one in Figure B-77. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 45 46 Tutorial B FIGURE B-77 2. The Employee form To add the subform, take the form into Design view. On the Design tab, make sure that the Use Control Wizards option is selected, scroll to the bottom row of buttons in the Controls group, and click the Subform/Subreport button, as shown in Figure B-78. Subform/Subreport button FIGURE B-78 The Subform/Subreport button Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access 3. FIGURE B-79 4. FIGURE B-80 Use your cursor to stretch out the box under your main form. You might need to expand the area beneath the main form. The window shown in Figure B-79 appears. Adding a subform Select Use existing Tables and Queries, click Next, and then select Table: Hours Worked from the Tables/Queries drop-down list. Select all available fields. Click Next, select Choose from a list, click Next again, and then click Finish. Select the Form view. Your form and subform should resemble Figure B-80. You may need to stretch out the subform box in Design view if all fields are not visible. Form with subform Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 47 48 Tutorial B FORMING RELATIONSHIPS At times you might want to form relationships between the tables in an Access database to enforce referential integrity. Relationships are similar to the joins made in queries; however, referential integrity requires that a value in a table’s foreign key match the other table’s primary key. A foreign key is a field in a table that links to a primary key in another table. If a relationship is formed, then the tables in a query will not need to be manually joined. To form a relationship between two tables, such as the Employee table and the Hours Worked table, the two fields to be joined are both named Employee ID. In Access, you follow these steps: 1. Choose Database Tools, then select Relationships, and then select Relationships (see Figure B-81). FIGURE B-81 Forming a relationship 2. 3. In the Show Table dialog box, choose the Employee table and the Hours Worked table. Close the dialog box. Draw a join line between the two tables on Employee ID. A dialog box appears (see Figure B-82). FIGURE B-82 Edit Relationships dialog box 4. 5. Choose Enforce Referential Integrity and click Create. A one-to-many relationship is formed automatically (see Figure B-83). Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access FIGURE B-83 A one-to-many relationship TROUBLESHOOTING COMMON PROBLEMS Access is a powerful program, but it is complex and sometimes difficult for new users. People sometimes unintentionally create databases that have problems. Some of these common problems are described below, along with their causes and corrections. 1. 2. 3. 4. 5. “I saved my database file, but I can’t find it on my computer! Where is it?” You saved your file to a fixed disk or a location other than the Documents folder. Use the Windows Search option to find all files ending in .accdb (search for * .accdb). If you saved the file, it is on the hard drive (C:\) or a network drive. Your site assistant can tell you the drive designators. “What is a ‘duplicate key field value’? I’m trying to enter records into my Sales table. The first record was for a sale of product X to customer 101, and I was able to enter that one. But when I try to enter a second sale for customer #101, Access tells me I already have a record with that key field value. Am I allowed to enter only one sale per customer?” Your primary key field needs work. You may need a compound primary key—a combination of the customer number and some other field(s). In this case, the customer number, product number, and date of sale might provide a unique combination of values, or you might consider using an invoice number field as a key. “My query reads ‘Enter Parameter Value’ when I run it. What is that?” This problem almost always indicates that you have misspelled a field name in an expression in a Criteria field or calculated field. Access is very fussy about spelling; for example, it is case sensitive. Access is also “space sensitive,” meaning that when you insert a space in a field name when defining a table, you must also include a space in the field name when you reference it in a query expression. Fix the typo in the query expression. “I’m getting an enormous number of rows in my query output—many times more than I need. Most of the rows are duplicates!” This problem is usually caused by a failure to link all of the tables you brought into the top half of the query generator. The solution is to use the manual click-and-drag method to link the common fields between tables. The spelling of the field names is irrelevant because the link fields need not have the same spelling. “For the most part, my query output is what I expected, but I am getting one or two duplicate rows or not enough rows.” You may have linked too many fields between tables. Usually, only a single link is needed between two tables. It is unnecessary to link each common field in all combinations of tables; it is usually sufficient to link the primary keys. A simplistic explanation for why overlinking causes problems is that it causes Access to “overthink” and repeat itself in its answer. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 49 50 Tutorial B On the other hand, you might be using too many tables in the query design. For example, you brought in a table, linked it on a common field with some other table, but then did not use the table. In other words, you brought down none of its fields, and/or you used none of its fields in query expressions. In this case, if you got rid of the table, the query would still work. Click the unneeded table’s header at the top of the QBE area and press the Delete key to see if you can make the few duplicate rows disappear. 6. “I expected six rows in my query output, but I got only five. What happened to the other one?” Usually, this problem indicates a data entry error in your tables. When you link the proper tables and fields to make the query, remember that the linking operation joins records from the tables on common values (equal values in the two tables). For example, if a primary key in one table has the value “123,” the primary key or the linking field in the other table should be the same to allow linking. Note that the text string “123” is not the same as the text string “ 123”—the space in the second string is considered a character too. Access does not see unequal values as an error. Instead, Access moves on to consider the rest of the records in the table for linking. The solution is to examine the values entered into the linked fields in each table and fix any data entry errors. 7. “I linked fields correctly in a query, but I’m getting the empty set in the output. All I get are the field name headings!” You probably have zero common (equal) values in the linked fields. For example, suppose you are linking on Part Number, which you declared as text. In one field, you have part numbers “001,” “002,” and “003”; in the other table, you have part numbers “0001,” “0002,” and “0003.” Your tables have no common values, which means that no records are selected for output. You must change the values in one of the tables. 8. “I’m trying to count the number of today’s sales orders. A Totals query is called for. Sales are denoted by an invoice number, and I made that a text field in the table design. However, when I ask the Totals query to ‘Sum’ the number of invoice numbers, Access tells me I cannot add them up! What is the problem?” Text variables are words! You cannot add words, but you can count them. Use the Count Totals operator (not the Sum operator) to count the number of sales, each being denoted by an invoice number. 9. “I’m doing time arithmetic in a calculated field expression. I subtracted the Time In from the Time Out and got a decimal number! I expected eight hours, and I got the number .33333. Why?” [Time Out] 2 [Time In] yields the decimal percentage of a 24-hour day. In your case, eight hours is one-third of a day. You must complete the expression by multiplying by 24: ([Time Out] 2 [Time In]) * 24. Don’t forget the parentheses. 10. “I formatted a calculated field for Currency in the query generator, and the values did show as currency in the query output; however, the report based on the query output does not show the dollar sign in its output. What happened?” Go to the report Design view. A box in one of the panels represents the calculated field’s value. Click the box and drag to widen it. That should give Access enough room to show the dollar sign as well as the number in the output. 11. “I cannot get a query output field to format to a specific number of decimals using the standard format with a specified number of decimal places.” In the property sheet format box, choose Fixed, not Standard. The Fixed setting will force the specified number of decimal places. 12. “I told the Report Wizard to fit all of my output to one page. It does print to one page, but some of the data is missing. What happened?” Access fits all the output on one page by leaving data out. If you can tolerate having the output on more than one page, deselect the Fit to a Page option in the wizard. One way to tighten output is to enter Design view and remove space from each box that represents output values and labels. Access usually provides more space than needed. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Microsoft Access 13. “I grouped three fields in the Report Wizard, and the wizard prints the output in a staircase fashion. I want the grouping fields to be on one line. How can I do that?” Make adjustments in Design view and Layout view. See the “Creating Reports” section of this tutorial for instructions on making these adjustments. 14. “When I create an Update query, Access tells me that zero rows are updating or more rows are updating than I want. What is wrong?” If your Update query is not set up correctly (for example, if the tables are not joined properly), Access will either try not to update anything, or it will update all of the records. Check the query, make corrections, and run it again. 15. “I made a Totals query with a Sum in the Group By row and saved the query. Now when I go back to it, the Sum field reads ‘Expression,’ and ‘Sum’ is entered in the field name box. Is that wrong?” Access sometimes changes the Sum field when the query is saved. The data remains the same, and you can be assured your query is correct. 16. “I cannot run my Update query, but I know it is set up correctly. What is wrong?” Check that you have clicked the Enable Content button on the Security Warning message bar. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 51 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 1 PRELIMINARY CASE: DOG HIKES Setting Up a Relational Database to Create Tables, Forms, Queries, and Reports PREVIEW In this case, you will create a relational database for a start-up service company that takes city dogs for hikes in the country. First, you will create three tables and populate them with data. Next, you will create a form and subform for recording customers and their dogs. You will create five queries: a select query, a totals query, a delete query, a parameter query, and a query used as the basis for a report. Finally, you will create the report from the fifth query. PREPARATION • • Before attempting this case, you should have some experience using Microsoft Access. Complete any part of Tutorial B that your instructor assigns, or refer to the tutorial as necessary. BACKGROUND Your friend, Shin-Mu, is an animal science major at your university. She knows you are a lifelong animal lover, so Shin-Mu has approached you about a start-up business she has created. While growing up in Chicago, she noticed that many apartment dwellers have dogs and often wondered if the dogs get enough exercise living in confined quarters. As an experiment, she asked a few residents of her apartment building if they would let her take their dogs to the country for a hike during the day while they were at work. Reaction was enthusiastic. What began as an experiment is now a strong business model with a growing list of clients. Shin-Mu knows you are taking a course that requires the use of databases, and she has enlisted your help to computerize her system. Here is how the business works: Customers register their dogs with Shin-Mu and sign up for weekly hikes. Each dog is picked up for the hike in Shin-Mu’s station wagon. Shin-Mu’s friend, Matt, comes along to help handle the dogs. Each dog is fitted with a GPS collar in case any stray from the hike in the country. Currently, Shin-Mu uses a third party that takes care of credit card payments of $85 per hike. She wants you to concentrate on the booking side of the business. You suggest creating a Microsoft Access database to track and record all customers, dogs, and hikes for her small business. You have experience using the program from your information systems coursework. Your first tasks are to design the database, create the tables, and populate them with current data. You have decided to begin in a simple fashion, so your database design includes only three tables, as shown in Figures 1-1, 1-2, and 1-3: • • • Customers, which maintains records for each customer, including their name, address, telephone number, and email address. Dogs, which includes each dog’s name, breed, and owner ID. Hikes, which includes the appointment date of each hike and the ID number of the dog taken on the hike. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 54 Case 1 After the database tables are complete and populated with data, you want to computerize several common tasks. First, you need a streamlined way to add information about customers and their dogs to the growing business. You recognize that a form and subform would be ideal for recording information about them. Shin-Mu lives on Oakmound Road and would like to identify customers who also live there so she can walk to pick up their dogs. A query will easily answer that question. Shin-Mu is curious about how many hikes each dog has taken. She is especially keen to find out which dogs take the most hikes. You are confident that a totals query will allow Shin-Mu to identify those frequent hikers. If the weather is poor or a dog is sick, owners might need to cancel their appointment. You know you can easily eliminate a record from the database with a delete query. Because you will need this capability soon, you want to practice creating a delete query now. Shin-Mu hires professional photographers to join her on the dog hikes because she finds that they can capture the true feelings of city dogs in the country. The photographs are used for social media advertising. Shin-Mu has found that certain breeds advertised on social media readily bring in new customers. So, she might like to identify which dogs are Labradors or beagles, for example, and schedule photographers for those hikes. You think that a parameter query would be a perfect tool for this task. Finally, Shin-Mu would like a comprehensive summary report that lists each customer, what dogs they own, and when they took hikes. You decide that the best solution is to use a query that feeds into the report. ASSIGNMENT 1: CREATING TABLES Use Microsoft Access to create tables that contain the fields shown in Figures 1-1 through 1-3; you learned about these tables in the Background section. Populate the database tables as shown. Add your name to the Customers table with a fictitious ID number; complete the entry by adding your name, address, telephone number, and email address. Allocate yourself two different dogs and have them each take two hikes. This database contains the following three tables: FIGURE 1-1 The Customers table FIGURE 1-2 The Dogs table Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Preliminary Case: Dog Hikes FIGURE 1-3 The Hikes table ASSIGNMENT 2: CREATING A FORM, QUERIES, AND A REPORT Assignment 2A: Creating a Form Create a form for easy recording of new customers and their dogs. The main form should be based on the ­Customers table, and the subform should include the fields from the Dogs table. Save the form as Customers and Dogs. (Hint: If you form a relationship between the two tables, you can create their query in one step.) View one record; if required by your instructor, print the record. Your output should resemble that shown in Figure 1-4. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 55 56 Case 1 FIGURE 1-4 The Customers and Dogs form with subform Assignment 2B: Creating a Select Query Create a query to list all customers who live on Oakmound Road. Include columns that display the First Name, Last Name, Street Address, and Telephone Number. Save the query as Customers on Oakmound Road. (Hint: You may want to use a wildcard.) Your output should resemble that shown in Figure 1-5, but the data may vary. Print the output if desired. FIGURE 1-5 Customers on Oakmound Road query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Preliminary Case: Dog Hikes Assignment 2C: Creating a Totals Query Create a totals query that lists the number of hikes each dog has taken. In the output, display columns for Dog Name, Breed, and Number of Hikes. Sort the list of dogs from most hikes to least. Note that Number of Hikes is a change in column heading from the default setting in the query generator. Save your query as Number of Hikes. Your output should resemble that shown in Figure 1-6. Print the output if desired. FIGURE 1-6 Number of Hikes query Assignment 2D: Creating a Delete Query Create a query that deletes a specified record from the Hikes table. Using a parameter, prompt for the Appointment Date and the Dog ID. Test the query. When prompted to delete the record, answer “No.” Save the query as Delete a Hike. Assignment 2E: Creating a Parameter Query Create a parameter query that prompts for a dog breed and then lists all the customers who have that breed of dog. The query should include columns for Breed, Dog Name, and the customer’s First Name, Last Name, and Email Address. Save the query as Dog Owners by Breed. Your output should resemble Figure 1-7 after you enter “Labrador” at the prompt. FIGURE 1-7 Dog Owners by Breed query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 57 58 Case 1 Assignment 2F: Generating a Report Generate a report based on a query that summarizes the dogs’ hikes. The query should display columns for customers’ First Name, Last Name, Dog Name, and Appointment Date. Save the query as Summary Report. From that query, create a report that groups each customer’s name and then groups each dog that belongs to the customer. Each appointment date should show under the dog’s name. Make any needed adjustments to the output to avoid repeating names and to ensure that all fields and data are visible. Ensure that “Summary Report” appears as the title at the top of the report, and save the report under the same name. Your report output should resemble that shown in Figure 1-8, although only a portion of the report appears in the figure. FIGURE 1-8 Summary report DELIVERABLES Assemble the following deliverables for your instructor, either electronically or in printed form: 1. Three tables 2. Form and subform: Customers and Dogs 3. Query 1: Customers on Oakmound Road 4. Query 2: Number of Hikes 5. Query 3: Delete a Hike 6. Query 4: Dog Owners by Breed 7. Query 5: Summary Report 8. Report: Summary Report 9. Any other required printouts or electronic media Staple all the pages together. Write your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 2 THE PARKS AND RECREATION DATABASE Designing a Relational Database to Create Tables, Forms, Queries, and Reports PREVIEW In this case, you will design a relational database for a Parks and Recreation program that offers classes for children and young adults. After your design is complete and correct, you will create database tables and populate them with data. You will then produce two forms, five queries, and two reports. The queries will address the following questions or tasks: Which class members do not have a health certificate on file? How many children have registered in each class? Who is the top participant in the program? What classes does a particular instructor teach? How many members are 5 years old or younger? Your reports will summarize the program’s list of parent contacts and class members and the master class list. PREPARATION • • • Before attempting this case, you should have some experience in database design and in using Microsoft Access. Complete any part of Tutorial A that your instructor assigns. Complete any part of Tutorial B that your instructor assigns or refer to the tutorial as necessary. BACKGROUND You are looking for a summer job and come across a notice on your hometown’s Facebook page for an ­internship to create a database for the town’s Parks and Recreation program. Because you have experience in database design and database implementation with Microsoft Access, you apply and obtain the job. On your first day, you meet the coordinator of the program, Steven Strickland. He quickly explains the program, which offers classes for children and young adults. Steven also explains that the information for all families, children, classes, instructors, and class sign-ups are recorded in a single Excel spreadsheet. The Parks and Rec program has grown so much recently that it is impossible to find information quickly using the current system. Steven says he wants to migrate over to a small database system to try to understand how it might work. Eventually, the plan is to move to a larger database system that will interface with an online registration system. For now, your job is to design the database tables and implement this prototype system using Microsoft Access. Steven further explains that all money paid to the Parks and Rec department will be done in person at the office. In other words, you do not have to worry about including any prices, costs, or payments in your ­prototype database. After your conversation with Steven, you sit down with the Parks and Rec team to learn as much as you can about the program. The team describes the sign-up process. First, parents must register with the Parks and Rec department by filling in a form that includes their full names, addresses, telephone numbers, and email addresses. The team says that Parks and Rec classes are very popular, and they anticipate that the number of offerings and students will grow. A team member mentions that some parents might have the same name, so you suggest that an identification number would be appropriate to uniquely identify each parent contact. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 60 Case 2 When parents sign up, they also need to register their children. Each child’s first name must be recorded; you are told you can assume that a child has the same last name as the parent. In addition, Parks and Rec needs to know each child’s birthdate, an emergency contact phone number, and whether the child has a health certificate on file. Health certificates are important for certain physical activities in some of the Parks and Rec classes. The team reminds you that many parents have multiple children; therefore, children can have the same last name. Again, you suggest that a unique identification be created for each child. The team goes through other details about the Parks and Rec system for you. Classes are offered on different days of the week and at different times. To avoid confusion, you suggest giving each class a unique identification. Each class has its own instructor, and an instructor might teach more than one class. Again, to avoid any confusion, you will create an ID number for each instructor. Finally, there needs to be a way for each child to sign up for classes. Back in Steven’s office, you continue discussing how the preceding information fits within the new database system. First, there needs to be a way to input information for new parents and children (contacts and members, respectively). In addition, there should be an efficient way to sign up children for classes. You suggest forms for each of these tasks, as they are an excellent method for inputting data by untrained clerks. Steven is often searching for information in the spreadsheet that is hard to find. For example, he needs a list of the children who do not have a health certificate on file. For scheduling purposes, he also needs to keep track of how many children have signed up for each class. You are confident that both issues can be handled by queries. The Parks and Rec department likes repeat students. The marketing person, Sheila, is always searching for new methods to attract further participation. She would like to see a list of children who often participate in the classes and perhaps use them as examples in her new marketing campaign. She also would like to see how many young children (5 years old or less) participate in the program, in the hopes that more classes can be added for preschoolers. You tell Sheila that you can develop queries to produce this information. Another request from the team is a searchable query. For example, parents might drop by the office and ask if a specific instructor is currently offering any classes, because their children enjoy being taught by that instructor. You are confident that a parameter query will answer this question. Finally, Steven requests two summary reports that will be useful for review purposes. One is a list of all the contacts in the database and their family members. The second report is a master class list. You assure Steven that these straightforward reports will be generated by the database. ASSIGNMENT 1: CREATING THE DATABASE DESIGN In this assignment, you design your database tables using a word-processing program. Pay close attention to the logic and structure of the tables. Do not start developing your Access database in Assignment 2 before getting feedback from your instructor on Assignment 1. Keep in mind that you need to examine the requirements in Assignment 2 to design your fields and tables properly. It is good programming practice to look at the required outputs before beginning your design. When designing the database, observe the following guidelines: • • • • • First, determine the tables you will need by listing the name of each table and the fields it should contain. Avoid data redundancy. Do not create a field if it can be created by a calculated field in a query. You will need a transaction table. Think about the business event that occurs with each child’s registration. Keep in mind that some children sign up for multiple classes. Avoid duplicating data. Document your tables using the table feature of your word processor. Your tables should resemble the format shown in Figure 2-1. You must mark the appropriate key field(s) by entering an asterisk (*) next to the field name. Keep in mind that some tables might need a compound primary key to uniquely identify a record within a table. Print the database design. Table Name Field Name Data Type (text, numeric, currency, etc.) … … … … FIGURE 2-1 Table design Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Parks and Recreation Database NOTE Have your design approved before beginning Assignment 2; otherwise, you may need to redo Assignment 2. ASSIGNMENT 2: CREATING THE DATABASE, QUERIES, AND REPORTS In this assignment, you first create database tables in Access and populate them with data. Next, you create two forms, five queries, and two reports. Assignment 2A: Creating Tables in Access In this part of the assignment, you create your tables in Access. Use the following guidelines: • • • • • Enter at least eight parent records that include names, addresses, email addresses, and telephone numbers. Each parent should have at least two children. Record yourself as one child. Consider using a fake name-and-address generator on the Web to eliminate typing. For simplicity, create eight classes and at least four instructors. Populate a table that lists the sign-ups for the classes. Have each child sign up for at least one class and have a few sign up for three. Appropriately limit the size of the text fields; for example, a telephone number does not need the default length of 255 characters. Print all tables if your instructor requires it. Assignment 2B: Creating Forms, Queries, and Reports You must generate two forms, five queries, and two reports, as outlined in the Background section of this case. Form 1 Create a form based on your Contacts and Members tables (or whatever you named the tables). Save the form as Add Contacts and Members. Your form should resemble the one in Figure 2-2. FIGURE 2-2 Add Contacts and Members form Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 61 62 Case 2 Form 2 Create a form based on your Classes and Sign Up tables (or whatever you named the tables). Save the form as Add Class Sign Up. Your form should resemble the one in Figure 2-3. FIGURE 2-3 Add Class Sign Up form Query 1 Create a select query called Members without Health Certificate that lists all members who do not have a health certificate on file. In the output, display columns for each member’s First Name, Last Name, Email Address, and Telephone Number. Your output should resemble that in Figure 2-4, although your data will be different. FIGURE 2-4 Members without Health Certificate query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Parks and Recreation Database Query 2 Create a query called Class Registration that lists the number of students in each class. Display columns for Class Name and Number Signed Up. List the classes from most popular to least popular. Note the column heading change from the default setting provided by the query generator. Your output should look like that in Figure 2-5, although your data will be different. FIGURE 2-5 Class Registration query Query 3 Create a query called Top Participant. This query shows which students have signed up for classes and calculates how many classes they have signed up to attend. The query should include columns for First Name, Last Name, and Number of Classes. Sort the output so that the student with the most classes is shown at the top of the list. Note the column heading change from the default setting provided by the query generator. Your output should resemble the format shown in Figure 2-6, but the data will be different (also, only a portion is showing). FIGURE 2-6 Top Participant query Query 4 Create a query called Instructor Search that prompts for an instructor’s first name and then displays his or her first name and last name as well as the names, days, and times of the classes the instructor teaches. Your output should resemble the format shown in Figure 2-7, but the data will be different. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 63 64 Case 2 FIGURE 2-7 Instructor Search query Query 5 Create a query called Number of Members 5 or Younger that counts the number of children enrolled in the program who are 5 years old or younger. Note the column heading change from the default setting provided by the query generator. Your output should resemble the format shown in Figure 2-8, but the number may be different. FIGURE 2-8 Number of Members 5 or Younger query Report 1 Create a report named Contact and Member List that summarizes the parents and children registered with the Parks and Rec program. The report’s output should display headings for the parent’s last name and first name, the child’s first name and birthdate, and an emergency contact phone number. You need to create a query first to bring the fields from different tables together. Group the report on the contact’s last name. Adjust your output so that a parent’s first and last names are on the same line and all fields are formatted and visible. Depending on your data, the output should resemble that in Figure 2-9. Note that only a portion of the report appears in the figure. FIGURE 2-9 Contact and Member List report Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Parks and Recreation Database Report 2 Create a report named Master Class List that summarizes each class’s participants. The report’s output should show headings for the class name, the instructor’s first name and last name, and each child’s first name and last name. You need to create a query first to bring the fields from different tables together. Group the report on the Class Name. Adjust your output so that an instructor’s first and last names are on the same line and all fields are formatted and visible. Depending on your data, the output should resemble that in Figure 2-10. Note that only a portion of the report appears in the figure. FIGURE 2-10 Master Class List report DELIVERABLES Assemble the following deliverables for your instructor, either electronically or in printed form: 1. Word-processed design of tables 2. Tables created in Access 3. Form 1: Add Contacts and Members 4. Form 2: Add Class Sign Up 5. Query 1: Members without Health Certificate 6. Query 2: Class Registration 7. Query 3: Top Participant 8. Query 4: Instructor Search Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 65 66 Case 2 9. Query 5: Number of Members 5 or Younger 10. Query for Report 1 11. Report 1: Contact and Member List 12. Query for Report 2 13. Report 2: Master Class List 14. Any other required printouts or electronic media Staple all the pages together. Write your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 3 THE SENIOR CONCIERGE DATABASE Designing a Relational Database to Create Tables, Forms, Queries, and Reports PREVIEW In this case, you will design a relational database for a senior concierge service. After your design is complete and correct, you will create database tables and populate them with data. You will then produce one form with a subform, eight queries, and one report. The queries will show a count of current customers, prompt for a service and then display its price, calculate how many hours are worked for each customer, and display which service is the most time consuming. Other queries will list the most profitable service, the best customers, and the top workers. Still another query will update the price of a service. You will also produce a report that summarizes all customers and the money charged for their services. PREPARATION • • • Before attempting this case, you should have some experience in database design and in using Microsoft Access. Complete any part of Tutorial A that your instructor assigns. Complete any part of Tutorial B that your instructor assigns, or refer to the tutorial as necessary. BACKGROUND Two of your good friends at the university, Beth and Alonzo, enjoy spending time with their grandmothers. When Beth and Alonzo returned from winter break, they both expressed concern that their grandmothers are slowing down and need help with various everyday tasks such as grocery shopping. Amid the concern for their grandmothers, Beth and Alonzo also realized they had discovered a business opportunity. With very little investment planned apart from a computer and a car, they decide to start a senior concierge service. Because you are studying database design and Access, you know that their business model is a good fit for a small ­database system. Beth and Alonzo are excited that you are willing to work with them to create a system that will help them keep track of customers and their services. You agree to meet for lunch the next day to discuss the business. Beth tells you about the information she would like to capture for each customer. Obviously, their names and addresses are essential pieces of information. Along with those, Beth would like their telephone numbers, mobile phone numbers, and email addresses. Credit card information would also have to be stored to charge the seniors for services. Beth explains that some senior couples will register separately, so two customers might have the same last name. You say that a unique identification is important for each customer. Also, Beth and Alonzo are hiring workers to help them with the jobs; you’ll need contact information to keep track of the workers and a way of uniquely identifying each worker. Alonzo then discusses the services that he would like to perform for the senior customers. He’s noticed that his grandmother would like to shop online because her mobility is limited, but she’s not sure how the process works. In addition, she is sometimes confused about the bills she receives and can’t always recall which have been paid or when they are due. Alonzo would like to begin the business by offering four different services: online shopping, grocery shopping, miscellaneous shopping, and bill paying. Each service would have a different hourly fee. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 68 Case 3 Beth says the database you design must include a way to log hours worked. So, for example, if one of the workers does grocery shopping for a customer named Evan Brown, Beth and Alonzo want to record the name of the worker, the date of the shopping trip, and the start and end times, because all services are charged by the hour. Beth also wants to be able to calculate totals for all service hours. You suggest that a form is an excellent way to log each service and the time it takes. Beth and Alonzo go on to tell you what information they want from the database. First, they would like to keep track of how many customers they have so far. They also explain that seniors call them to ask about prices, so Beth and Alonzo would like to be able to type in the name of a service and quickly see its price. In terms of popularity, they would like to monitor which customers have requested the most services and which services are requiring the most time. You are confident that queries can handle these requests. Because the goal of their senior concierge service is not only to help elderly customers but also to make money, Beth and Alonzo would like to know what service brings in the most revenue and who the top customers are. Again, queries can easily handle these requests, you say. In addition, you suggest they might like to know which workers have put in the most hours. In looking at their initial numbers, Beth and Alonzo suspect that they might lose money on the miscellaneous shopping jobs. These trips can require a large amount of time and expense when it comes to transportation. Beth feels that the service price for miscellaneous shopping jobs should be higher. You suggest that an update query will enable them to update the price of this service. Finally, the pair would like a report that summarizes their customers, the services provided to them, and the amount of money brought in for each service. This report will give them a “snapshot” of how the business is operating. ASSIGNMENT 1: CREATING THE DATABASE DESIGN In this assignment, you design your database tables using a word-processing program. Pay close attention to the logic and structure of the tables. Do not start developing your Access database in Assignment 2 before getting feedback from your instructor on Assignment 1. Keep in mind that you need to examine the requirements in Assignment 2 to design your fields and tables properly. It is good programming practice to look at the required outputs before beginning your design. When designing the database, observe the following guidelines: • • • • • First, determine the tables you will need by listing the name of each table and the fields it should contain. Avoid data redundancy. Do not create a field if it can be created by a calculated field in a query. You will need a transaction table. Think about the business events that occur when customers employ a service. Avoid duplicating data. Document your tables using the table feature of your word processor. Your tables should resemble the format shown in Figure 3-1. You must mark the appropriate key field(s) by entering an asterisk (*) next to the field name. Keep in mind that some tables might need a compound primary key to uniquely identify a record within a table, and that some fields might not need the number of spaces allocated by default in the database table. Print the database design, if required. Table Name Field Name Data Type (text, numeric, currency, etc.) … … … … FIGURE 3-1 Table design NOTE Have your design approved before beginning Assignment 2; otherwise, you may need to redo Assignment 2. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Senior Concierge Database ASSIGNMENT 2: CREATING THE DATABASE, QUERIES, AND REPORTS In this assignment, you first create database tables in Access and populate them with data. Next, you create one form, eight queries, and a report. Assignment 2A: Creating Tables in Access In this part of the assignment, you create your tables in Access. Use the following guidelines: • • • • • Enter data for at least eight customers and six workers, as outlined in the Background section of this case. Use your name as one of the workers. Enter home addresses, telephone numbers, and email addresses. Create four different jobs that can be performed: grocery shopping, miscellaneous shopping, online shopping, and bill paying. Create at least 20 transactions of a worker performing a job for a customer. Appropriately limit the size of the text fields; for example, a phone number does not need the default length of 255 characters. Print all tables if your instructor requires it. Assignment 2B: Creating Forms, Queries, and Reports You will generate one form with a subform, eight queries, and a report, as outlined in the Background section of this case. Form 1 Create a form and subform based on your Customers table and the Hours Worked table (or whatever you named the tables). Save the form as Customers and Services. Your form should resemble the one in Figure 3-2. FIGURE 3-2 Customers and Services form and subform Query 1 Create a select query called Count of Current Customers. The query should calculate and then display a column that reports the number of customers served by the business. Note the column heading change from the default setting provided by the query generator. Your output should resemble that shown in Figure 3-3, although your data may be different. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 69 70 Case 3 FIGURE 3-3 Count of Current Customers query Query 2 Create a parameter query called Service Price Prompt that shows the price per hour for a specified service. The query prompts the user to enter a service and then displays headings for the Service and Price Per Hour. For example, when you enter the service “Misc Shopping,” the output should resemble that shown in Figure 3-4, although your data will be different. FIGURE 3-4 Service Price Prompt query Query 3 Create a query that calculates the number of hours worked for each customer. Display columns for each ­customer’s Last Name, First Name, Telephone, Email Address, and the Hours worked. Sort the output so that customers who use the service the most appear at the top. Save the query as Hours Worked per Customer. Your data will differ, but the output should look similar to that shown in Figure 3-5. FIGURE 3-5 Hours Worked per Customer query Query 4 Create a query called Most Time Spent on Service that lists the number of hours spent on providing each service. Display columns for the Service and Time Spent. Sort the output so that the most time-consuming service is shown at the top. Make sure your output is formatted correctly, as shown in Figure 3-6, including any column heading change. Your output should resemble the format shown in the figure, but the data will be different. FIGURE 3-6 Most Time Spent on Service query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Senior Concierge Database Query 5 Create a query called Most Profitable Services that displays a column for the Service and then calculates and displays a second column named Money In. Sort the output so that the service that generates the most revenue is shown at the top. Ensure that your query output is properly formatted. Your output should r­ esemble the format shown in Figure 3-7, but the data will be different. FIGURE 3-7 Most Profitable Services query Query 6 Create a query called Best Customer that displays columns for the customer’s Last Name, First Name, Email Address, and Money In, which is a calculated field. Sort the output so that the best customer is shown at the top. Ensure that your query output is properly formatted. Your output should resemble the format shown in Figure 3-8, but the data will be different. FIGURE 3-8 Best Customer query Query 7 Create a query called Top Worker that calculates how many hours each employee has worked. The query should display columns for each worker’s First Name, Last Name, Email, and Total Hours Worked. Sort the output so that the most active worker appears on top. Ensure that your query output is properly formatted. Your output should resemble the format shown in Figure 3-9, but the data will be different. FIGURE 3-9 Top Worker query Query 8 Create an update query called Update Price for Misc Shopping. The query should increase the hourly price of the Misc Shopping service by 10 percent. Run the query to test it, view the results in the table, and save the query. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 71 72 Case 3 Report Create a report called Summary Report that summarizes all work for customers. First create a query that displays each customer’s Last Name, First Name, Address, Email Address, Service, Start Time, and the calculated amount of money charged for each service. Name the calculated field “Total Price.” Bring the query into the report generator, and group the report on the customer name. Subtotal each customer’s Total Price. Make sure all headings are visible and that the data is formatted correctly, as shown. Depending on your data, the output should resemble that shown in Figure 3-10. Note that only a portion of the report is displayed. FIGURE 3-10 Summary report DELIVERABLES Assemble the following deliverables for your instructor, either electronically or in printed form: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Word-processed design of tables Tables created in Access Form and subform: Customers and Services Query 1: Count of Current Customers Query 2: Service Price Prompt Query 3: Hours Worked per Customer Query 4: Most Time Spent on Service Query 5: Most Profitable Services Query 6: Best Customer Query 7: Top Worker Query 8: Update Price for Misc Shopping Query for report Report: Summary Report Any other required printouts or electronic media Staple all the pages together. Include your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 4 THE FRESH FISH DISTRIBUTOR DATABASE Designing a Relational Database to Create Tables, Forms, Queries, and Reports PREVIEW In this case, you will design a relational database for a business that distributes freshly caught fish to local restaurants. After your design is complete and correct, you will create database tables and populate them with data. You will then produce two forms with subforms, six queries, and two reports. Two queries will report lists of customers in a specified city and shipments on a specified date. Two queries will update the inventory of fish by adding any new shipments and subtracting any orders. Other queries will show the business owner what type of fish is ordered the most in a particular month and how much money is spent on fish in a particular month. You will also produce two reports based on queries that summarize orders and shipments. PREPARATION • • • Before attempting this case, you should have some experience in database design and in using Microsoft Access. Complete any part of Tutorial A that your instructor assigns. Complete any part of Tutorial B that your instructor assigns, or refer to the tutorial as necessary. BACKGROUND Being a university business student, you have a keen interest in how companies work. You meet your Uncle Dave at a Memorial Day barbecue and spend some time with him discussing his business. Uncle Dave has lived in Maine all his life and has built a small business on being the middleman for fishermen and local restaurants that serve the local catch. Dave is friends with many of the fishermen. They bring him their harvest and he distributes the fish to restaurants on the coast of Maine that boast fresh—not frozen—local seafood. Uncle Dave’s business has always been run on pads of paper, but he suspects after talking with you that he can become much more efficient if he uses a computer system. Because you have been studying databases, Uncle Dave enlists your help over the summer to create a small database and then train him on the system. If he embraces the computer system, he’ll move all of his paper-based records to electronic files. On the first day of your summer job, you meet with Uncle Dave to learn how the business works. He describes the information he keeps on paper. First, he has an address book of all the restaurants that order from his distribution company. In that address book, he has the name of each customer, which is a restaurant name, along with the restaurant’s address, phone number, and an email contact. Uncle Dave has a hard time keeping track of some of the restaurants because they have similar names. You jot down that statement and realize that each customer needs an identification number to keep everything straight. Uncle Dave also deals with three friends who are his suppliers of fresh fish. He keeps the business cards of these friends taped to the wall near his desk. The business cards list each fishing company’s name, address, and phone number. Dave has laminated a large sheet that lists all the types of fish he deals in, including their prices per pound. As you examine this list, you find it confusing because many fish have the same names but come in different sizes or varieties. Again, you make a mental note to create a unique identification for each Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 74 Case 4 type of fish. Next to each fish listed, Uncle Dave has written an amount with a marker. Because the sheet is ­laminated, he can wipe the numbers off the sheet and rewrite them to reflect any updates of shipments as they arrive in the warehouse and as orders depart the warehouse. After seeing this system, you realize that Uncle Dave needs a database to help him keep track of incoming shipments and outgoing orders without ­relying on his mental math and marker erasures. Dave personally delivers the fish to his client restaurants on a daily basis. To keep driving to a minimum, he likes to group his orders by city. You explain that a query will help him determine which restaurants placed orders on a given day so he can ensure he doesn’t miss any deliveries in a particular city. Uncle Dave would also like to know what shipments are coming in each day to ensure immediate and proper storage. You explain to your uncle that his method of keeping track of inventory is outdated, inefficient, and perhaps inaccurate at times. You realize that a series of transaction tables to capture all shipments and orders are important to this design. These tables will be used to create a daily update of the main table that holds the inventory. Therefore, you know you must create two update queries that will allow the system to add new shipments to inventory and subtract fish that has been ordered. After you spend some time with Uncle Dave, he realizes that the proposed computer system can produce good information, so he gives you his “wish list.” He would like to be able to see which fish is the most popular order in a given month. He would also like to track how much money he spends on fish in a month. You proudly tell him that both of those requests are easily fulfilled with queries. Finally, you suggest two reports that will give your uncle a good understanding of his customers and ­suppliers. The first report will summarize the orders of fish for each restaurant. The second report will summarize shipments from each fish supplier and calculate how much money is spent on those shipments. ASSIGNMENT 1: CREATING THE DATABASE DESIGN In this assignment, you design your database tables using a word-processing program. Pay close attention to the logic and structure of the tables. Do not start developing your Access database in Assignment 2 before getting feedback from your instructor on Assignment 1. Keep in mind that you need to examine the requirements in Assignment 2 to design your fields and tables properly. It is good programming practice to look at the required outputs before beginning your design. When designing the database, observe the following guidelines: • • • • • First, determine the tables you will need by listing the name of each table and the fields it should contain. Avoid data redundancy. Do not create a field if it can be created by a calculated field in a query. You will need transaction tables. Think about the business events that occur with each order and each shipment. Avoid duplicating data. Document your tables using the table feature of your word processor. Your tables should ­resemble the format shown in Figure 4-1. You must mark the appropriate key field(s) by entering an asterisk (*) next to the field name. Keep in mind that some tables might need a compound primary key to uniquely identify a record within a table. Print the database design, if required. Table Name Field Name Data Type (text, numeric, currency, etc.) … … … … FIGURE 4-1 Table design NOTE Have your design approved before beginning Assignment 2; otherwise, you may need to redo Assignment 2. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Fresh Fish Distributor Database ASSIGNMENT 2: CREATING THE DATABASE, QUERIES, AND REPORTS In this assignment, you first create database tables in Access and populate them with data. Next, you create two forms, six queries, and two reports. Assignment 2A: Creating Tables in Access In this part of the assignment, you create your tables in Access. Use the following guidelines: • • • • Enter data for at least 10 restaurants, 3 fishing companies, and 15 different types of fish. Consider searching the Internet for name-and-address generators, which will create the necessary details for your data. These generators often create lists in Microsoft Excel. You can then import the Excel spreadsheet into Microsoft Access and adjust for any changes to field types. Create at least 10 orders and 10 incoming shipments with multiple types of fish in many of the orders and shipments. Consider using Microsoft Excel and the Randbetween function to generate a large amount of data. Appropriately limit the size of the text fields; for example, a phone number does not need the default length of 255 characters. Print all tables if your instructor requires it. Assignment 2B: Creating Forms, Queries, and Reports You will generate two forms with subforms, six queries, and two reports, as outlined in the Background section of this case. Form 1 Create a form and subform based on your Orders table and Order Line Item table (or whatever you named the tables). Save the form as Orders. Your form should resemble the one in Figure 4-2. FIGURE 4-2 Orders form and subform Form 2 Create a form and subform based on your Incoming Shipments table and Incoming Shipment Line Item table (or whatever you named the tables). Save the form as Incoming Shipments. Your form should resemble the one in Figure 4-3. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 75 76 Case 4 FIGURE 4-3 Incoming Shipments form and subform Query 1 Create a select query called Customers in What City that uses a wildcard after the first letter of the city on the criteria line and then displays columns for the Customer Name, Customer Address, Customer City, and Customer Phone. If your query shows cities beginning with “W,” your output should resemble that shown in Figure 4-4, although your data will be different. FIGURE 4-4 Customers in What City query Query 2 Create a query called Shipments on What Date. The query prompts for a date. When the date is entered, the query displays columns for Date, Fish, Quantity, and Supplier. The output for October 1, 2019 should ­resemble that shown in Figure 4-5, although your data will be different. FIGURE 4-5 Shipments on What Date query Query 3 Create an update query that adds the quantity of fish shipped to the business into the fish inventory. Run the query to test it and update the data. Check the updated table to ensure that the update is correct. Query 4 Create an update query that subtracts the fish that has been ordered from inventory. Run the query to test it and update the data. Check the updated table to ensure that the update is correct. Query 5 Create a query called Most Popular Fish Ordered in October that displays the list of fish and the quantities ordered in the month of October (or whatever month your data covers). Sort the output to show the most popular Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Fresh Fish Distributor Database fish order first. Your output should resemble the format shown in Figure 4-6, but the data will be different. Also, note that the column heading has been changed from the default setting provided by the query generator. FIGURE 4-6 Most Popular Fish Ordered in October query Query 6 Create a query called Money Spent on Fish in October that displays columns for Fish and Total Cost for the month of October (or whatever month your data might cover). Display the type of fish for which the company has spent the most money at the top of the list. Your output should resemble the format shown in Figure 4-7, but the data will be different. FIGURE 4-7 Money Spent on Fish in October query Report 1 Create a report called Order Report that summarizes orders of fish. First, you need to create a query to amass the required data. The report should include headings for Customer Name, Customer Address, Customer City, Fish, and Quantity. Group the report by the customer’s name. Include subtotals that display the total quantity ordered by each customer. Make sure all headings are visible and that the data is formatted correctly, as shown. Depending on your data, the output should resemble that in Figure 4-8, although only a portion of the output is shown. FIGURE 4-8 Order report Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 77 78 Case 4 Report 2 Create a report called Shipment Report that summarizes all shipments of fish to the business. First, you need to create a query to gather the required data. The report should include headings for each Supplier Name, Supplier City, Fish, Quantity, and Cost, which is a calculated field. Group the report by the supplier’s name. Include subtotals that display the total cost of all shipments. Make sure all headings are visible and that the data is formatted correctly, as shown. Depending on your data, the output should resemble that in Figure 4-9, although only a portion of the output is shown. FIGURE 4-9 Shipment report DELIVERABLES Assemble the following deliverables for your instructor, either electronically or in printed form: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Word-processed design of tables Tables created in Access Form 1 and subform: Orders Form 2 and subform: Incoming Shipments Query 1: Customers in What City Query 2: Shipments on What Date Query 3: Adding Incoming Shipments to Inventory Query 4: Subtracting Orders from Inventory Query 5: Most Popular Fish Ordered in October Query 6: Money Spent on Fish in October Report 1: Order Report 2: Shipment Data analysis memo Presentation materials Any other required printouts or electronic media Staple all the pages together. Include your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 5 THE VOLUNTEER FIRE COMPANY DATABASE Designing a Relational Database to Create Tables, Forms, Queries, and Reports PREVIEW In this case, you will design a relational database for your local volunteer fire company. After your tables are designed and created, you will populate the database and create a form with subforms, five queries, and a report. The form and subforms will allow for easy logging of dispatches, response details, and member information. The queries will address the following questions: What types of fire calls are most frequent? Which volunteers respond to the most fire calls? What is the total value of the properties at risk? How many volunteers respond to each call? A fifth query will calculate the amount of money saved by the township by using volunteers. The report will summarize the call details. PREPARATION • • • Before attempting this case, you should have some experience in database design and in using Microsoft Access. Complete any part of Tutorial A that your instructor assigns. Complete any part of Tutorial B that your instructor assigns, or refer to the tutorial as necessary. BACKGROUND In 1736, Benjamin Franklin co-founded the Union Fire Company, also known as the “Bucket Brigade.” It was the first formally organized, all-volunteer fire company in the American colonies, and it was shaped after ­Boston’s Mutual Fire Societies. The difference between the fire societies of Boston and Franklin’s Union Fire Company was that the former protected its members only, while the latter protected the entire community. A lot has changed since colonial times, but volunteer fire companies remain a cornerstone of emergency ­services in our country. You met with the president of your local fire company, Hester Ordonez, and she explained the need to create an information system to track dispatches and call details. The system is needed in order to better manage the company and allow it to apply for various grants at the state and federal levels. For years, the fire company has been logging calls and their details using paper forms. All volunteer fire companies rely heavily on grants to fund their operations, so any grant application needs to demonstrate compliance with any new requirements in the application process. Hester understands the need to modernize record keeping for data gathering and analysis; however, the most pressing driver behind the need to modernize the information system is the state and federal reporting requirements for grant eligibility. Since you’ve been taking your information systems class, you’ve realized that a lot of the work involved in managing a fire company is keeping the information logically organized. You have experience in database design, so you decided to volunteer your time to solve this problem. You have spent a week observing the ­day-to-day operations of the fire company to get acquainted with its inner workings and procedures, and you have also reviewed their paper process to log each call. Hester has provided you with a blank copy of the call log sheet, as shown in Figure 5-1. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 80 Case 5 FIGURE 5-1 Call log sheet Armed with your observations and the call log sheet, you begin to draft the design for the database. You also note the following details: • • The company has five emergency response vehicles, each with a primary purpose. o Engine: Water pumping operations o Quint: Aerial operations o Rescue: Vehicle accidents and rescue operations o Utility: General support operations and traffic management o Chief’s Vehicle: Command vehicle, generally first to respond The top portion of the company members list in Figure 5-2 shows whether a member is qualified to drive an official vehicle and/or is a qualified interior firefighter. Name Address DOB Telephone Email Interior Qualified? Driver Qualified? John Smith 123 Main St 8/21/1984 302.831.1000 John.Smith@email.com YES NO Amal Alamuddin 850 Hoover St 9/17/2000 302.555.5548 Amal.Alamuddin@email.com YES YES FIGURE 5-2 Members list Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Volunteer Fire Company Database Once your database is designed and implemented, you know that a number of forms, queries, and reports will be useful. Forms will help company members enter relevant data into the database. For example, you will create a form that lists all of a call’s details and a response summary, and a subform that will list all members and vehicles that respond to a call. Next, you will create queries. For example, a list of which volunteers respond most frequently to calls will be helpful because the top five volunteers will be formally recognized at the annual banquet. Another query will report the distribution of call types throughout the year; this is an important detail needed for some grant applications. The company also needs to be able to aggregate the “value at risk” for all calls for a requested period of time. Value at risk is a measure of the total monetary value of assets that are at risk in a fire. Other queries will show how many volunteers respond to each call and calculate the monetary savings to the township by using volunteers. On an ad hoc basis, the fire company needs to produce a report to submit along with grant applications. For a specified period, the report will list a summary of calls, including total value at risk, value lost, and call type distribution. ASSIGNMENT 1: CREATING THE DATABASE DESIGN In this assignment, you design your database tables using a word-processing program. Pay close attention to the logic and structure of the tables. Do not start developing your Access database in Assignment 2 before getting feedback from your instructor on Assignment 1. Keep in mind that you need to examine the requirements in Assignment 2 to design your fields and tables properly. It is good programming practice to look at the required outputs before beginning your design. When designing the database, observe the following guidelines: • • • • • First, determine the tables you will need by listing the name of each table and the fields it should contain. Avoid data redundancy. Do not create a field if it can be created by a calculated field in a query. You will need a few transaction tables to record response summaries. Document your tables using the table feature of your word processor. Your tables should resemble the format shown in Figure 5-3. You must mark the appropriate key field(s) by entering an asterisk (*) next to the field name. Keep in mind that some tables might need a compound primary key to uniquely identify a record within a table. Print the database design. Table Name Field Name Data Type (text, numeric, currency, etc.) … … … … FIGURE 5-3 Table design NOTE Have your design approved before beginning Assignment 2; otherwise, you may need to redo Assignment 2. Your design should account for all the information included in this case, as well as assumptions you can make about the operations of the fire company. ASSIGNMENT 2: CREATING THE DATABASE, FORMS, QUERIES, AND REPORT In this assignment, you first create database tables in Access and populate them with data. Next, you create a form and subforms, five queries, and a report. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 81 82 Case 5 Assignment 2A: Creating Tables in Access In this part of the assignment, you create your tables in Access. Use the following guidelines: • • • Create records for 20 fire company members with fictitious names, addresses, dates of birth, telephone numbers, and email addresses. Also, note whether each member is qualified to drive an official vehicle and/or is a qualified interior firefighter. Consider searching the Internet for a list of random names and addresses to alleviate typing. Create records for each of the five response vehicles. Create records for at least 10 fire calls. Each call should have at least five responding members and at least one emergency vehicle. Assignment 2B: Creating Forms, Queries, and a Report You will create a form and subforms, five queries, and one report, as outlined in the Background section of this case. Form Create a form and subforms based on your Calls, Responding Members, and Responding Vehicles tables (or whatever you called those tables). Save the form as Calls. Your form should look similar to the one in Figure 5-4. FIGURE 5-4 Calls form Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Volunteer Fire Company Database Query 1 Hester needs to know which five members respond to the most fire calls. Create a query that lists each ­member name and calculates his or her total number of responses. Save your query as Top 5. Your output should look like that shown in Figure 5-5, although only the top portion of the report appears in the figure. FIGURE 5-5 Top 5 query Query 2 You need to determine how many calls of each type occur each month. Create a query called Monthly Call Distribution by Type that calculates the total number of calls by incident type; display Incident Type, Month, and Count as the column headings. Your data will differ, but the layout of the query should look like that shown in Figure 5-6. FIGURE 5-6 Monthly Call Distribution by Type query Query 3 The company also needs to be able to aggregate the “value at risk” for all calls in a given year. Create a prompt query that asks the user to enter the incident year and then calculates the total value at risk for that year. Save the query as Value at Risk for the Year. The results should look like those in Figure 5-7. FIGURE 5-7 Value at Risk for the Year query Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 83 84 Case 5 Query 4 Hester needs to know the average number of responding members per call throughout the year. Create a query that averages the total number of responding members per call for every month of a given year. You may need to create a series of queries in order to have the right data to create the correct answer. Save the query as Response Average. Your output might look like that shown in Figure 5-8. FIGURE 5-8 Response Average query Query 5 As part of fund-raising efforts, the company calculates the savings to the township by using volunteers rather than hiring full-time firefighters. Using the national average hourly rate of $20 for firefighters, create a query that tallies the amount saved each month, based on how many members responded to a call and for how long. You may need to create a series of queries in order to have the right data to create the correct answer. Save the query as Township Savings. Your output should look like that shown in Figure 5-9. FIGURE 5-9 Township Savings query Report Create a report called Grant Report. First, create a query that will feed into this report. The query should also be named and saved as Grant Report. Display columns for Incident Type, Dispatch Date, Value at Risk, and Value Lost. Bring the query into the report generator and group the data by Incident Type, then by Dispatch Date. Your output should resemble that shown in Figure 5-10, although only the top portion of the report appears in the figure. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Volunteer Fire Company Database FIGURE 5-10 Grant report DELIVERABLES Assemble the following deliverables for your instructor, either electronically or in printed form: 1. Word-processed design of tables 2. Tables created in Access 3. Form: Calls 4. Query 1: Top 5 5. Query 2: Monthly Call Distribution by Type 6. Query 3: Value at Risk for the Year 7. Query 4: Response Average 8. Query 5: Township Savings 9. Report: Grant Report Staple all the pages together. Write your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 85 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. PART 2 DECISION SUPPORT CASES USING MICROSOFT EXCEL SCENARIO MANAGER TUTORIAL C Building a Decision Support System in Excel, 89 CASE 6 The Ski Resort Investment Decision, 113 CASE 7 The College Town Budget, 121 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. TUTORIAL C BUILDING A DECISION SUPPORT SYSTEM IN EXCEL A decision support system (DSS) is a computer program that can represent a problem a user needs to solve. Such a representation is in effect a model of a problem. Here’s how a DSS program works: The program accepts input from the user or accesses data in the system’s files and then runs the input and any other necessary data through the model. The program’s output is the information the user needs to solve a problem. Some DSS programs recommend a solution to a problem. A DSS can be written in any programming language that lets a programmer represent a problem. For example, a DSS can be built in a third-generation language such as Visual Basic or in a database package such as Access. A DSS can also be written in a spreadsheet package such as Excel. Excel has standard, built-in arithmetic functions as well as many statistical and financial functions. Thus, many kinds of problems—such as those in accounting, operations, and finance—can be modeled in Excel. This tutorial is organized into four sections as follows: • • • • Spreadsheet and DSS Basics—In this section, you’ll learn how to create a DSS program in Excel. Your program will be in the form of a cash flow model. This section will give you practice in spreadsheet design and in building a DSS program. Using Scenario Manager—In this section, you’ll learn how to use an Excel tool called Scenario Manager. With any DSS package, one problem with playing “what if” is deciding where to physically record the results from running each set of data. A user could write the inputs and related results on a sheet of paper. Then, the user might have to enter the data back into a spreadsheet for further analysis. Scenario Manager solves this problem. It can be set up to capture inputs and related results as “scenarios,” which are then summarized on a separate sheet in the Excel workbook. Practicing with Scenario Manager—You will work on a new case problem using Scenario Manager. Reviewing Excel Basics—This section reviews additional information you may need to do the spreadsheet cases that follow this tutorial. SPREADSHEET AND DSS BASICS Assume it is late in Year 1 of a three-year period, and you are trying to build a model of a company’s net income (profit) and cash flow for Years 2 and 3. The problem is to forecast net income and cash flow in those years. The company is likely to use the forecasts to make decisions, so the estimates should be as accurate as you can make them. After researching the problem, you decide that the estimates should be based on three factors: (1) Year 1 results, (2) estimates of the underlying economic variables, and (3) the cost of products the company sells. Your model will use an income statement and cash flow framework. The user can enter values for two possible states of the economy in Years 2 and 3: an O for an optimistic outlook or a P for a pessimistic outlook. The state of the economy is expected to affect the number of units the company can sell as well as each unit’s selling price. In a good (optimistic) economy, more units can be sold at a higher price. The user can also enter values into your model to see two possible trends in the cost of goods sold: U for up or D for down. A U means that the cost of an item sold will be higher than it was in Year 1; a D means that the cost will be less. Presumably, the company will do better in a good economy and with lower input costs—but how much better? The user can play “what if” with the input variables and note the effect on net income and y ­ ear-end Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 90 Tutorial C cash levels. For example, a user can ask these questions: What if the economy is good and costs go up? What will net income and cash flow be in that case? What will happen if the economy is down and costs go down? What will be the company’s net income and cash flow in that case? With an Excel software model, the answers to such questions can be quantified. Organization of the DSS Model Your spreadsheets should have the following sections: • • • • • Constants Inputs Summary of Key Results Calculations of values that will be used in the Income and Cash Flow statements Income and Cash Flow statements Here, as an extended illustration, a DSS model is built for the forecasting problem described. Next, you’ll look at each spreadsheet section. Figures C-1 and C-2 show how to set up the spreadsheet. (You can also use the spreadsheet skeleton if you prefer; this will save you time. Select Tutorial C in your data files, and then select TutC.xlsx.) FIGURE C-1 Tutorial skeleton 1 FIGURE C-2 Tutorial skeleton 2 Each spreadsheet section is discussed next. Constants Section This section of Figure C-1 records values that are used in spreadsheet calculations. In a sense, the constants are input values used by the model, except that they do not change. In this tutorial, the constants are Tax Rate and the Number of Business Days. Inputs Section The inputs shown in Figure C-1 are for the Economic Outlook and Purchase Price Outlook (the outlook for manufacturing input costs). Inputs could conceivably be entered for each year the model is covered (here, Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel Year 2 and Year 3), which would let you enter an O for Year 2’s economy in one cell and a P for Year 3’s economy in another cell. Alternatively, one input for the two-year period could be entered in one cell. For simplicity, the latter approach is used in this example. Summary of Key Results Section This section of the spreadsheet captures Year 2 and Year 3 Net Income After Taxes (profit) and End-of-Year Cash On Hand, which you should assume are the two relevant outputs of this model. The summary merely repeats results in one easy-to-see location; otherwise, these results could appear in various places in the spreadsheet. Collecting key results in one place also makes for easier charting. Calculations Section This area is used to compute the following data: • • • • The Number of units sold in a day, which is a function of the Year 1 value and the economic outlook input value The Selling price per unit, which is similarly derived The Cost of goods sold per unit, which is a function of the Year 1 value and the purchase-price outlook value The Number of units sold in a year, which equals the number of units sold in a day multiplied by the number of business days in a year The formulas could be embedded in the Income Statement and Cash Flow Statement section of the spreadsheet, which will be described shortly. Doing that, however, would result in expressions that are complex and difficult to understand. Putting the intermediate calculations into a separate Calculations section breaks up the work into modules. This is good form because it simplifies your programming. Income Statement and Cash Flow Statement Section This section is the “body” of the spreadsheet. It shows the following: • • • • • • • Beginning-of-year cash on hand, which equals cash at the end of the prior year. Sales (Revenue), which equals the units sold during the year multiplied by the unit selling price. Cost of goods sold, which is units sold during the year multiplied by the price paid to acquire or make the unit sold. Income before taxes, which equals sales minus cost of goods sold. Income tax expense, which is zero when there are losses; otherwise, it is the income before taxes multiplied by the tax rate. Net income after taxes, which equals income before taxes minus income tax expense. End-of-year cash on hand, which is beginning-of-year cash on hand plus net income. In the real world, cash flow estimates must also account for changes in other accounts, such as receivables and payables. In this case, assume that sales are collected immediately—that is, there are no receivables or bad debts. Also assume that suppliers are paid immediately—that is, there are no payables. Constructing the Spreadsheet Model Next, you will work through the following three steps to build your spreadsheet model: • • • Make a “skeleton” of the spreadsheet. Fill in the “easy” cell formulas. Enter the “hard” spreadsheet formulas. Making a Skeleton Your first step is to set up a skeleton worksheet. Alternatively, you can use the skeleton file, as ­previously noted. The worksheet should have headings, text string labels, and constants—but no formulas yet. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 91 92 Tutorial C To set up the skeleton, you must first grasp the problem conceptually. The best way to do that is to work backward from what the “body” of the spreadsheet will look like. Here, the body is the Income Statement and Cash Flow Statement section. Set up the body in your mind or on paper, and then do the following: • • • • • Decide what amounts should be in the Calculations section. In the income statement of this tutorial’s model, Sales (Revenue) will be Number of units sold in a day multiplied by Selling price per unit. You will calculate the intermediate amounts (Number of units sold in a year and Selling price per unit) in the Calculations section. Set up the Summary of Key Results section by deciding what outputs are needed to solve the problem. The Inputs section should be reserved for amounts that can change: the controlling variables, which here are the Economic Outlook and the Purchase Price Outlook. Use the Constants section for values you will need to use but that are not in doubt; that is, you will not have to input them or calculate them. The Tax Rate is a good example of such a value. Type in the Excel skeleton shown in Figures C-1 and C-2. NOTE A designation of NA means that a cell will not be used in any formula in the worksheet. The Year 1 values are needed only for certain calculations, so for the most part, the Year 1 column’s cells show NA. (Recall that the forecast is for Years 2 and 3.) Also be aware that you can “break” a text string in a cell by pressing the Alt and Enter keys at the same time at the break point, which makes the cell “taller.” To show centered data and create borders in cells, see “Formatting Cells” later in this tutorial. Entering the “Easy” Formulas You can enter formulas in any order you choose. We recommend entering the conceptually easier formulas first and then moving on to more difficult ones. Thus, the next step is to enter the “easy” formulas, starting with those in the Summary of Key Results section. To prepare, you should format the section’s cells as currency with zero decimals. (For details, see “Formatting Cells” later in this tutorial.) As previously mentioned, the Summary of Key Results section (see Figure C-3) simply echoes results shown in other places. Consider Figures C-1 and C-2, and note that cell C27 in Figure C-2 holds the Year 2 Net income after taxes. You need to echo that amount to cell C12, so the formula in C12 is simply 5C27. The simple logic is: “Copy what is in C27 into C12.” NOTE With the insertion point in C12, the cell’s contents—in this case, the formula 5C27—appear in the editing window above the lettered column indicators, as shown in Figure C-3. FIGURE C-3 Echoing Year 2 Net Income After Taxes to Summary of Key Results section At this point, cell C27 has a zero value, but that does not prevent you from copying the formula in the cell. Copy cell C12’s formula to the right, to cell D12. Copying puts 5D27 into D12, which is what you want. (Year 3’s Net income after taxes is in D27.) Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel To perform the copy operation, you can use the following steps: 1. 2. 3. 4. 5. Click in the cell or range of cells that you want to copy. Hold down the Control key and press C (Ctrl1C). Select the destination cell. If a range of cells is the destination, select the upper-left cell of the destination range. Hold down the Control key and press V (Ctrl1V). Press the Escape key to deactivate the copied cell or range. You can also take the following steps to copy cell contents: 1. 2. 3. 4. 5. 6. Select the Home tab. Click in the cell or range of cells that you want to copy. In the Clipboard group, select Copy. Select the destination cell. If a range of cells is the destination, select the upper-left cell of the destination range. In the Clipboard group, select Paste. Press the Escape key to deactivate the copied cell or range. As you can see in Figure C-4, End-of-Year Cash On Hand for Year 2 cash is echoed to cell C13. Echo the cash results in cell C28 to cell C13. (Enter the formula 5C28 in cell C13, as shown in Figure C-4.) Copy the formula from C13 to D13. FIGURE C-4 Echoing Year 2 End-of-Year Cash On Hand to Summary of Key Results section At this point, the Calculations section formulas will not be entered because they are not all “easy” f­ormulas. We will move on to the easier formulas in the Income and Cash Flow Statements section, as if the Calculations section formulas were already done. Again, the fact that the Calculations section cells are empty does not stop you from referencing the cells in other formulas. You should format the cells in the Income ­Statement and Cash Flow Statement section for currency with zero decimals. As you can see in Figure C-5, Beginning-of-year cash on hand is the cash on hand at the end of the prior year. Cell B28 has the End-of-year cash on hand for Year 1. In cell C22 for Year 2, type 5B28, as shown in ­Figure C-5. FIGURE C-5 Echo of Year 1 End-of-year cash on hand to Year 2 Beginning-of-year cash on hand Your next step is to copy the formula in cell C22 to the right. Sales (Revenue) is the Number of units sold in a year multiplied by Selling price per unit. In cell C23, enter 5C17 * C19, as shown in Figure C-6. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 93 94 Tutorial C FIGURE C-6 Entering the formula to compute Year 2 sales The formula 5C17 * C19 multiplies the unit selling price by the units sold for the year. (Cells C17 and C19 are empty now, which is why Sales shows a zero after the formula is entered.) Copy the formula to the right, to cell D23. The Cost of goods sold is handled similarly. In C24, enter 5C18 * C19, which equals Cost of goods sold per unit multiplied by Number of units sold in a year. Copy the formula to the right. In cell C25, the formula for Income before taxes is 5C23–C24. Enter the formula and copy it to the right. Income taxes are paid only on positive income before taxes. In cell C26, the Income tax expense is zero when the Income before taxes is zero or less; otherwise, Income tax expense equals the Tax Rate multiplied by income before taxes. The Tax Rate is a constant (in cell C4). An IF statement is needed to express this logic: IF(Income before taxes is <5 0, then put zero tax in C26, else, in C26, put a number equal to multiplying the Tax Rate by the income before taxes) C25 stands for Income before taxes, and C4 stands for Tax Rate. In Excel, substitute those cell addresses: 5IF(C25 <5 0, 0, C4 * C25) Copy the income tax expense formula to the right. In cell C27, Net income after taxes is Income before taxes minus Income tax expense: 5C25−C26. Enter the formula and then copy it to the right. The End-of-year cash on hand is the Beginning-of-year cash on hand plus Net income after taxes. In cell C28, enter 5C221C27. Copy the formula to the right. The Income Statement and Cash Flow Statement ­section at this point is shown in Figure C-7. FIGURE C-7 Status of Income Statement and Cash Flow Statement Entering the “Hard” Formulas The next step is to finish the spreadsheet by filling in the “hard” formulas. In our example, formulas that use Inputs section values are considered the “hard” ones. In cell C8, enter an O for Optimistic, and in C9, enter a U for Up. There is nothing special about these ­values—they just give the worksheet formulas input values to process. Recall that the inputs will cover Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel both Year 2 and Year 3. Enter NA in cells D8 and D9 to remind yourself that those cells will not be used for input or be referenced by other worksheet formulas. Your Inputs section should look like the one shown in Figure C-8. FIGURE C-8 Entering two input values Recall that cell addresses in the Calculations section are already referred to in formulas in the Income Statement and Cash Flow Statement section. The next step is to enter formulas for those calculations. Before doing that, format the Number of units sold in a day and Number of units sold in a year for zero decimals, and format the Selling price per unit and Cost of goods sold per unit for currency with two decimals. The easiest formula in the Calculations section is the Number of units sold in a year, which is the Number of Business Days (in C5) multiplied by the Number of units sold in a day, as shown in cell C16. In C19, enter 5C5 * C16, as shown in Figure C-9. FIGURE C-9 Entering the formula to compute Year 2 Number of units sold in a year Copy the formula to cell D19 for Year 3. Assume that if the Economic Outlook is Optimistic, the Year 2 Number of units sold in a day will be 6 percent more than in Year 1; in Year 3, they will be 6 percent more than in Year 2. Also assume that if the Economic Outlook is Pessimistic, the Number of units sold in a day in Year 2 will be 1 percent less than those sold in Year 1; in Year 3, they will be 1 percent less than those sold in Year 2. An IF statement is needed in cell C16 to express this logic: IF(economy variable 5 Optimistic, Then Number of units sold in a day will go UP 6 percent, Else Number of units sold in a day will go DOWN 1 percent) Substituting cell addresses: 5IF($C$8 5 “O”, B16 * 1.06, B16 * .99) NOTE In Excel, quotation marks denote text. The input is one letter of text, so quotation marks are needed around the O. Also note that multiplying by 1.06 results in a 6 percent increase, whereas multiplying by 0.99 results in a 1 percent decrease. Enter the entire IF formula into cell C16, as shown in Figure C-10. Absolute addressing is needed when referring to the input value ($C$8), because the address is in a formula that gets copied and you do not want Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 95 96 Tutorial C the cell reference to change (to D8, which has the value NA) when you copy the formula to the right. Absolute addressing maintains the $C$8 reference when the formula is copied. FIGURE C-10 Entering the formula to compute Year 2 Number of units sold in a day Copy the formula in C16 to D16 for Year 3. The Selling price per unit is also a function of the Economic Outlook. Assume that the two-part rule is as follows: • • If the Economic Outlook is Optimistic, the Selling price per unit in Year 2 will be 1.07 times that of Year 1; in Year 3, it will be 1.07 times that of Year 2. On the other hand, if the Economic Outlook is Pessimistic, the Selling price per unit in Year 2 and Year 3 will equal the per-unit price in Year 1; that is, the price will not change. Test your understanding of the selling price calculation by figuring out the formula for cell C17. Enter the formula and copy it to the right. (Hint: You will need to use absolute addressing properly.) The Cost of goods sold per unit is a function of the Purchase Price Outlook. Assume that the two-part rule is as follows: • • If the Purchase Price Outlook is Up (U), Cost of goods sold per unit in Year 2 will be 1.25 times that of Year 1; in Year 3, it will be 1.25 times that of Year 2. On the other hand, if the Purchase Price Outlook is Down (D), the multiplier in years 2 and 3 will be 1.01. Again, to test your understanding, figure out the formula for cell C18. Enter and copy the formula to the right. Again, you will need to use absolute addressing. Your formulas for selling price and cost of goods sold, given Optimistic and Up input values, should yield the calculated values shown in Figure C-11. FIGURE C-11 Calculated values given Optimistic and Up input values Assume that you change the input values to Pessimistic and Down. Your formulas should yield the calculated values shown in Figure C-12. FIGURE C-12 Calculated values given Pessimistic and Down input values That completes the body of your spreadsheet. The values in the Calculations section ripple through the Income Statement and Cash Flow Statement section because the income statement formulas reference the Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel calculations. Assuming inputs of Optimistic and Up, the income and cash flow numbers should look like those in Figure C-13. FIGURE C-13 Completed Income Statement and Cash Flow Statement section USING SCENARIO MANAGER You are now ready to use Excel’s Scenario Manager to capture inputs and results as you play “what if” with the spreadsheet. There are four possible combinations of input values: O-U (Optimistic-Up), O-D (Optimistic-Down), P-U (Pessimistic-Up), and P-D (Pessimistic-Down). Financial results for each combination will be different. Each combination of input values can be referred to as a scenario. Scenario Manager records the results of each combination of input values as a separate scenario and then shows a summary of all scenarios in a separate worksheet. Those summary worksheet values can be used as a raw table of numbers and then printed or copied into a Microsoft Word document. The table of data can then be the basis for an Excel chart, which can also be printed or inserted into a document. The four sets of input values produce different financial results. When you use Scenario Manager, you define the four scenarios; then you have Excel (1) sequentially run the input values “behind the scenes” and (2) put the results for each input scenario in a summary sheet. When you define a scenario in Scenario Manager, you give it a name and identify the input cells and input values. Then you identify the output cells so Excel can capture the output values in a summary sheet. To start, select the Data tab. In the Forecast group, click the drop-down arrow on the What-If Analysis icon, and then click the Scenario Manager option. Initially, no scenarios are defined, as you can see in Figure C-14. FIGURE C-14 Initial Scenario Manager window You can use this window to add, delete, or edit scenarios. Toward the end of the process, you create the summary sheet. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 97 98 Tutorial C NOTE When working with this window and its successors, do not press the Enter key to navigate. Use mouse clicks to move from one step to the next. To start defining a scenario, click the Add button. In the resulting Add Scenario window, name the first scenario Opt-Up. Then type the input cells in the Changing cells field—here, they are C8:C9. (Note that C8 and C9 are contiguous input cells. Noncontiguous input cell ranges are separated by a comma.) Excel may add dollar signs to the cell address, but do not be concerned about that. The window should look like the one shown in Figure C-15. FIGURE C-15 Entering Opt-Up as a scenario Now click OK, which moves you to the Scenario Values window. Here you indicate what the input values will be for the scenario. The values in the current spreadsheet cells will be displayed. They might or might not be correct for your scenario. For the Opt-Up scenario, you need to enter an O and a U, if not the current values. Enter those values if needed, as shown in Figure C-16. FIGURE C-16 Entering Opt-Up scenario input values Click OK, which takes you back to the Scenario Manager window. Enter the other three Opt-Down, PessUp, and Pess-Down scenarios, including the related input values. When you finish, you should see that the names and changing cells for the four scenarios have been entered, as in Figure C-17. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel FIGURE C-17 Scenario Manager window with all scenarios entered You can now create a summary sheet that shows the results of running the four scenarios. Click the Summary button to open the Scenario Summary window. You must provide Excel with the output cell addresses— they will be the same for all four scenarios. (The output values in those output cells change as input values are changed, but the addresses of the output cells do not change.) Assume that you are interested primarily in the results that have accrued at the end of the two-year period. These results are your two Year 3 Summary of Key Results section cells for Net Income After Taxes and End-ofYear Cash On Hand (D12 and D13). Type those addresses in the window’s input area, as shown in Figure C-18. (Note that if the Result cells are noncontiguous, the address ranges can be entered and separated by a comma.) FIGURE C-18 Entering Result cell addresses in Scenario Summary window Then click OK. Excel runs each set of inputs “behind the scenes” and collects results as it goes. (You do not see this happening on the screen.) Excel creates a new sheet called the Scenario Summary (denoted by the sheet’s lower tab) and takes you there, as shown in Figure C-19. FIGURE C-19 Scenario Summary sheet created by Scenario Manager Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 99 100 Tutorial C One slightly annoying visual element is that the Current Values in the spreadsheet are given an output column that duplicates one of the four defined scenarios. To delete the extra column, select it, select the Home tab, select the Delete icon’s drop-down arrow within the Cells group, and select Delete Sheet Columns. NOTE To delete a sheet’s row, follow the steps in the preceding sentence, but select Delete Sheet Rows instead of Delete Sheet Columns. Another annoyance is that column A goes unused. You can click and delete it as you’ve been doing to move everything to the left. That should make columns of data easier to see on the screen without scrolling. Other ways to make the worksheet easier to read include: • • • Entering text in column A to describe the input and output cells Centering cell values by using the Center icon in the Home tab’s Alignment group Showing data in Currency format by using the Number Format drop-down menu within the Home tab’s Number group When you finish, your summary sheet could resemble the one shown in Figure C-20. FIGURE C-20 Scenario Summary sheet after formatting Note that column C shows the Optimistic-Up case. The Net Income After Taxes in that scenario is $728,909, and End-of-Year Cash On Hand is $1,535,753. Columns D, E, and F show the other scenario results. As an important postscript to this exercise, note that DSS spreadsheets are used to guide decision making, which means that the spreadsheet’s results must be interpreted in some way. Here are two practice questions based on the results in Figure C-20: • • What combination of Year 3 Net Income After Taxes and End-of-Year Cash On Hand would be best? Clearly, Optimistic-Down (O-D) is the best result, right? It yields the highest income and highest cash. What is the worst combination? Pessimistic-Up (P-U), right? It yields the lowest income and lowest cash. Results are not always that easy to interpret, but the analytical method is the same. You have a situation that you cannot understand very easily without software assistance. You build a model of the situation in the spreadsheet, enter the inputs, collect the results, and then interpret the results to help with decision making. Using Summary Sheets When you complete Scenario Manager case studies, you’ll need to manipulate summary sheets and their data. Next, you will look at some of those operations. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel Rerunning Scenario Manager The Scenario Summary sheet does not update itself when the spreadsheet formulas or inputs change. To see an updated Scenario Summary sheet, you must rerun Scenario Manager by clicking the Summary button in the Scenario Manager dialog box and then clicking OK. Another summary sheet is created; it does not overwrite a prior one. Deleting Unwanted Scenario Manager Summary Sheets Suppose you want to delete a summary sheet. With the summary sheet on the screen, follow this procedure: 1. 2. 3. Select the Home tab. Within the Cells group, select the Delete icon’s drop-down arrow. Select Delete Sheet. When asked if you really want to delete the sheet, click Delete. You can also delete a sheet by right-clicking its tab at the bottom of the screen. In the resulting menu, select Delete. Click Delete again when asked if you really want to delete the sheet. Charting Summary Sheet Data The summary sheet results can be conveniently charted using the Chart Wizard. Copying Summary Sheet Data to the Clipboard If you want to put the summary sheet data into the Clipboard to use in a Microsoft Word document, follow these steps: 1. 2. 3. 4. 5. Select the data range. Copy the data range into the Clipboard by following the copying operation described earlier in this tutorial. Open your Microsoft Word document. Click the cursor where you want the upper-left part of the data to be positioned. Paste the data into the document by selecting Paste in the Home tab’s Clipboard group. PRACTICING WITH SCENARIO MANAGER Suppose you have an uncle who works for a large company. He has a good job and makes a decent salary (currently, $80,000 a year). At age 65, which will be in three more years, he must retire from his company and start drawing his pension. However, the company has an early-out plan in which employees are paid to quit early. The company pays all employees in the plan a bonus in the year they retire and each year thereafter, before the official retirement date. (After the official retirement date, employees start to receive their actual pension—in your uncle’s case, after three more years of work.) If your uncle left the company early, he could find a part-time hourly job to make ends meet in the years before taking his normal pension. The opportunity to leave early is open for three years after the end of the current year, which is now ending. That means your uncle could leave the company any year in the next three years, getting the early-out bonuses in the years he is retired early. Thus, if he works another year, he would lose the bonus for that year. If he works two more years, he would lose two years of early-out bonuses, and so forth until he must retire. Another factor in your uncle’s thinking is whether to continue his country club membership. He likes the club, but it is a cash drain. The retirement decision can be revisited each year, but the decision about the country club membership must be made now. If your uncle does not withdraw now, he says he will remain a member (and incur costs) indefinitely. Your uncle has called you in to make a spreadsheet model of his situation in Scenario Manager. Your spreadsheet would let him play “what if” with the preretirement and country club possibilities and see his various projected personal finances for each of the next three years. With each scenario, your uncle wants to know what “cash on hand” will be available for each year in the period. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 101 102 Tutorial C Complete the spreadsheet for your uncle. Your Summary of Key Results, Calculations, and Income Statement and Cash Flow Statement section cells must show values by cell formula. In other words, do not hard-code amounts in those sections. Also, do not use the address of a cell if its contents are NA in any of your formulas. Set up your spreadsheet skeleton as shown in the figures that follow. Name your spreadsheet UNCLE.xlsx. You can also use the spreadsheet skeleton named UNCLE.xlsx from your data files. Constants Section Your spreadsheet should have the constants shown in Figure C-21. An explanation of line items follows the figure. FIGURE C-21 Constants section values • • • • • Salary increase factor—Your uncle’s salary as of the current working year just ended (Year 0) is $80,000. As you can see, raises are expected each year; for example, a 3 percent raise is expected in the upcoming year (Year 1). If your uncle does not retire in a year, he will get his ­salary (including a raise) for the year. Part-time wages expected—For the next three years, your uncle has estimated his part-time wages in a year that he is retired from the company and working part-time (Years 1 to 3). For example, he thinks he could earn $10,000 in part-time wages in Year 1 if he retired. Buyout amount—The amounts for the company’s preretirement buyout plan are shown. For example, if your uncle retires now (and does not work for the company in Years 1 through 3), he gets $45,000, $30,000, and $10,000 in Year 1 through Year 3. If he works another year, then leaves before Year 2 starts, he will give up the $45,000 payment for Year 1 but will get $30,000 and $10,000 in Year 2 and Year 3. Cost of living (not retired)—Your uncle has estimated how much cash he needs to meet his living expenses, assuming he continues to work for the company. His cost of living would be $41,000 in Year 1, increasing each year thereafter. Country club dues—Country club dues will be $12,000 for Year 1. Dues increase each year thereafter, as shown. Inputs Section Your spreadsheet should have the inputs shown in Figure C-22. An explanation of line items follows the figure. FIGURE C-22 • • Inputs section Retired or Working—Enter an R if your uncle would be retired in the year or a W if he would still be working. If he is working the next three years, you should enter the pattern WWW. If he plans to retire now (that is, not work Year 1), you would enter the pattern RRR. If he works for one year and then retires, you should enter the pattern WRR. Stay in club?—If your uncle stays in the club, you should enter a Y. If your uncle leaves the club now, you should enter an N. The decision applies to all years. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel Summary of Key Results Section Your spreadsheet should show the results in Figure C-23. FIGURE C-23 Summary of Key Results section Each year’s End-of-year cash on hand value is echoed from cells in the spreadsheet body. Calculations Section Your spreadsheet should calculate, by formula, the values shown in Figure C-24. Calculated amounts are used later in the spreadsheet. An explanation of line items follows the figure. FIGURE C-24 • • • • Calculations section Tax rate—Your uncle’s tax rate depends on whether he is retired. Retired people have lower ­overall tax rates. If he is retired in a year, your uncle’s rate is expected to be 15 percent of income before taxes. In a year in which he works full time, the rate will be 30 percent. Cost of living—In any year that your uncle continues to work for the company, his cost of living is the amount shown in the Cost of living (not retired) field of the Constants section in Figure C-21. But, if he chooses to retire, his cost of living will be $15,000 less than the amount shown in Figure C-21. Yearly salary or part-time wages—If your uncle keeps working, his salary increases each year. The yearly percentage increases are shown in the Constants section. Thus, salary earned in Year 1 would be 3 percent more than that earned in Year 0, salary earned in Year 2 would be 3 percent more than that earned in Year 1, and salary earned in Year 3 would be 2 percent more than that earned in Year 2. If your uncle retires in a certain year, he will make the part-time wages shown in the Constants section. Country club dues paid—If your uncle leaves the club, the dues are zero each year; otherwise, the dues are as shown in the Constants section. Income Statement and Cash Flow Statement Section This section begins with the cash on hand at the beginning of the year, followed by the income statement, and concluding with the calculation of cash on hand at the end of the year. The format is shown in Figure C-25. An explanation of line items follows the figure. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 103 104 Tutorial C FIGURE C-25 Income Statement and Cash Flow Statement section • • • • • • • • • • • Beginning-of-year cash on hand—This amount is the cash on hand at the end of the prior year. Note that cash on hand at the end of the current year is $30,000. Salary or wages—This amount is a yearly calculation, which can be echoed here. Buyout income—This amount is the year’s buyout amount if your uncle is retired that year. Buyout amounts are shown in the Constants section. Total cash inflow—This amount is the sum of salary or part-time wages and the buyout amount. Country club dues paid—This amount is a calculation, which can be echoed here. Cost of living—This amount is a calculation, which can be echoed here. Total costs—This amount is the sum of the Cost of living and Country club dues paid. Income before taxes—This amount is the Total cash inflow minus Total costs. Income tax expense—This amount is zero when Income before taxes is zero or less; otherwise, the calculated tax rate is applied to the Income before taxes. Net income after taxes—This amount is Income before taxes minus Income tax expense. End-of-year cash on hand—This amount is the Beginning-of-year cash on hand plus the year’s Net income after taxes. Scenario Manager Analysis Set up Scenario Manager and create a Scenario Summary sheet. Your uncle wants to look at the following four possibilities: • • • • Retire now, staying in the club (“Loaf-In”). Retire now, leaving the club (“Loaf-Out”). Work three more years (that is, do not take any buyout bonuses), staying in the club (“Delay-In”). Work three more years, leaving the club (“Delay-Out”). You should enter the noncontiguous input cell ranges as follows: C10:E10, C11. The only output cell should be the Year 3 End-of-year cash on hand cell in the Summary of Key Results section. Your uncle will choose the option that yields the highest Year 3 End-of-year cash on hand. You must look at your Scenario Summary sheet to see which strategy yields the highest amount. To check your work, you should attain the values shown in Figure C-26. You should format the S ­ ummary sheet appropriately; for example, see Figure C-26. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel FIGURE C-26 Scenario Summary REVIEWING EXCEL BASICS In this section, you’ll begin by reviewing how to perform some basic operations. Then you’ll work through more cash flow calculations. Working through this section will help you complete the spreadsheet cases in this book. Basic Operations You’ll review the following topics: formatting cells, showing Excel cell formulas, understanding circular references, using the AND and OR functions in IF statements, and using nested IF statements. Formatting Cells You may have noticed that some data in this tutorial’s first spreadsheet was centered in the cells. Follow these steps to center data in cells: 1. 2. 3. 4. Highlight the cell range to format. Select the Home tab. In the Alignment group, select the Middle Align icon to change the vertical alignment. In the Alignment group, select the Center icon to change the horizontal alignment. You can also put a border around cells, which might be desirable for highlighting cells in the Inputs ­section. Follow these steps: 1. 2. 3. 4. Highlight the cell that needs a border. Select the Home tab. In the Font group, select the drop-down arrow of the Borders icon. Choose the desired border from the menu. You can format numerical values for Currency by following these steps: 1. 2. 3. Highlight the cell or range of cells that should be formatted. Select the Home tab. In the Number group, use the Number Format drop-down arrow to select Currency and the ­number of decimals, and then click OK. You can format numerical values for decimal places using this procedure: 1. 2. 3. Highlight the cell or range of cells that should be formatted. Select the Home tab. In the Number group, click the Increase Decimal icon once to add one decimal value. Click the Decrease Decimal icon to eliminate a decimal value. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 105 106 Tutorial C You can use the available automatic styles to change the appearance of the text: 1. 2. 3. Highlight the cell or range of cells that you want to change. Select the Home tab. Within the Styles group, click the Cell Styles drop-down arrow, and then choose the style you want to apply, such as Heading 1 or Title in the Titles and Headings group. You can increase or decrease the indentation used for your row headings, which makes the text under each section much easier to see: 1. 2. 3. Highlight the cell or range of cells that you want to change. Select the Home tab. In the Alignment group, click the Increase Indent button (or Decrease Indent, as the case may be). You can copy all the format properties of a certain cell to other cells using the Format Painter: 1. 2. 3. Select the cell whose format you want to transfer elsewhere. Click the Format Painter button (the paintbrush icon) in the Home tab’s Clipboard group. When you click the button, the mouse pointer turns into a paintbrush. Select the cells that you want to format. This feature now turns itself off automatically. Showing Excel Cell Formulas If you want to see Excel cell formulas, follow these steps: 1. 2. Press the Ctrl key and the back quote key (‘) at the same time. The back quote faces the opposite direction from a normal quotation mark; on most keyboards, it shares the key with the tilde (~) mark. To restore, press the Ctrl and back quote keys again. Understanding a Circular Reference A formula has a circular reference when it refers to itself either directly or indirectly. In this book’s cases, Excel cannot properly evaluate such a formula. The problem is best described by an example. Suppose the formula in cell C18 is 5C18–C17. Excel is trying to compute a value for cell C18, so it must evaluate the formula, then put the result on the screen in C18. Excel tries to subtract the contents of C17 from the contents of C18, but nothing is in C18. Can you see the circularity? To establish a value for C18, Excel must know what is in C18. However, that value is what you are trying to compute in the first place. The process is circular—hence, the term “circular reference.” As another simple example, consider a formula in one cell that refers to a formula in a second cell, and the formula in the second cell that refers to the formula in the first cell. For example, cell C7 has the formula 5C6, and cell C6 is 5C7. To be sure that Excel will point out circular references, you should do the following: 1. 2. 3. 4. Click the File tab. Click Options in the left column menu. Click Formulas in the left column of the Excel Options window. In the Calculation Options section, deselect the “Enable iterative calculation” check box, and then click OK. Now when you enter a formula that has a circular reference, you will receive a warning message. You can close the message, but that will not fix the problem. You must fix the formula that has the circular reference if you want the spreadsheet to give you accurate results. Using the AND Function and the OR Function in IF Statements An IF statement has the following syntax: IF(test condition, result if test is True, result if test is False) Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel The test conditions in this tutorial’s IF statements tested only one cell’s value, but a test condition can test more than one value of a cell. Here is an example from this tutorial’s first spreadsheet, in which selling price was a function of the economy. Assume for the sake of illustration that Year 2’s selling price per unit depends on the economy and on the purchase-price outlook. There are two possibilities: (1) If the economic outlook is optimistic and the ­company’s purchase-price outlook is down, the selling price will be 110 percent times the prior year’s price. (2) In all other cases, the selling price will be 103 percent times the prior year’s price. The first possibility’s test requires two things to be true at the same time: C8 5 “O” AND C9 5 “D.” To implement the test, the AND() function is needed. The code in cell C17 would be as follows: 5IF(AND($C$8 5 “O”, $C$9 5 “D”), B17 * 1.10, B17 * 1.03) When the test that uses the AND() function evaluates to True, the result is B17 * 1.10. When the test evaluates to False, the result is the second possibility’s outcome: B17 * 1.03. Now suppose the first possibility is as follows: If the economic outlook is optimistic or the purchase-price outlook is down, the selling price will be 110 percent times the prior year’s price. Assume in all other cases that the selling price will be 103 percent times the prior year’s price. Now the test requires only one of two things to be true: C8 5 “O” OR C9 5 “D.” To implement that test, the OR() function is needed. The code in cell C17 would be: 5IF(OR($C$8 5 “O”, $C$9 5 “D”), B17 * 1.10, B17 * 1.03) Using IF Statements Inside IF Statements (“Nesting IFs”) Recall from the previous section that an IF statement has this syntax: IF(test condition, result if test is True, result if test is False) In the examples shown thus far, only two courses of action were possible, so only one test was needed in the IF statement. However, there can be more than two courses of action; if so, the “result if test is False” clause needs to show further testing. Look at the following example. Assume again that the Year 2 selling price per unit depends on the economy and the purchase-price outlook. Here is the logic: (1) If the economic outlook is optimistic and the purchase-price outlook is down, the selling price will be 110 percent times the prior year’s price. (2) If the economic outlook is optimistic and the purchase-price outlook is up, the selling price will be 107 percent times the prior year’s price. (3) In all other cases, the selling price will be 103 percent times the prior year’s price. The code in cell C17 would be as follows: 5IF(AND($C$8 5 “O”, $C$9 5 “D”), B17 * 1.10, IF(AND($C$8 5 “O”, $C$9 5 “U”), B17 * 1.07, B17 * 1.03)) The first IF statement tests to see if the economic outlook is optimistic and the purchase-price outlook is down. If not, further testing is needed to see whether the economic outlook is optimistic and the purchaseprice outlook is up, or whether some other situation prevails. NOTE The line is broken in the previous example because the page is not wide enough, but in Excel, the formula would appear on one line. The embedded “IF” is not preceded by an equal sign. Cash Flow Calculations: Borrowing and Repayments The Scenario Manager cases in this book may require you to account for money that the company borrows or repays. Possible borrowing and repayment calculations are discussed next. At times, you will be asked to think about a question and fill in the answer. Correct responses are found at the end of this section. Assume two things about a company’s borrowing and repayment of debt. First, assume that the company wants to have a certain minimum cash level at the end of a year, and thus at the start of the next year. Second, assume that a bank will provide a loan to make up the shortfall if year-end cash falls short of the desired minimum cash level. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 107 108 Tutorial C Here are some examples to test your understanding. Assume that NCP stands for “net cash position” and that NCP equals beginning-of-year cash plus net income after taxes for the year. In other words, the NCP is the cash available at year’s end before any borrowing or repayment. For the three examples in Figure C-27, compute the amounts the company needs to borrow to reach its minimum year-end cash level. Example NCP Minimum Cash Required Amount to Borrow 1 $50,000 $10,000 ? 2 $8,000 $10,000 ? 3 −$20,000 $10,000 ? FIGURE C-27 Examples of borrowing One additional assumption you can make is that the company will use its excess cash at year’s end to pay off as much debt as possible without going below the minimum-cash threshold. Excess cash is the NCP minus the minimum cash required on hand—amounts over the minimum are available to repay any debt. In the examples shown in Figure C-28, compute excess cash and then compute the amount to repay. To aid your understanding, you may also want to compute ending cash after repayments. Example NCP Minimum Cash Required Beginning-of-year Debt Repay? Ending Cash 1 $12,000 $10,000 $4,000 ? ? 2 $12,000 $10,000 $10,000 ? ? 3 $20,000 $10,000 $10,000 ? ? 4 $20,000 $10,000 $0 ? ? 5 $60,000 $10,000 $40,000 ? ? 6 −$20,000 $10,000 $10,000 ? ? FIGURE C-28 Examples of repayment In the Scenario Manager cases, your spreadsheet will need two bank financing sections beneath the Income and Cash Flow Statements section. The first section will calculate any needed borrowing or repayment at year’s end to compute year-end cash. The second section will calculate the amount of debt owed at the end of the year, after borrowing or repayment of debt. The first new section, in effect, extends the end-of-year cash calculation, which was shown in Figure C-13. Previously, the amount equaled cash at the beginning of the year plus the year’s net income. Now the calculation will include cash obtained by borrowing and cash repaid. Figure C-29 shows the structure of the calculation. FIGURE C-29 Calculation of end-of-year cash on hand Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel The heading in cell A28 was previously End-of-year cash on hand (see Figure C-13). However, borrowing increases cash and repayment of debt decreases cash. So, End-of-year cash on hand is now computed two rows down (in C32 for Year 2, in the example). The value in row 29 must be a subtotal for the Beginning-ofyear cash on hand plus the year’s Net income after taxes. That subtotal is the NCP. Note that the formula in cell C22 for Beginning-of-year cash on hand would now be 5B32. The second new section computes end-of-year debt and is called Debt Owed, as shown in Figure C-30. FIGURE C-30 Debt Owed section As you can see in Figure C-30, $15,000 was owed at the end of Year 1. The End-of-year debt owed equals the Beginning-of-year debt owed plus any new Borrowing from bank (which increases debt owed), minus any Repayment to bank (which reduces it). So, in the example, the formula in cell C38 would be: 5C351C362C37 Assume that the amounts for Borrowing from bank and Repayment to bank are calculated in the first new section. Thus, the formula in cell C36 would be 5C30. The formula in cell C37 would be 5C31. Beginningof-year debt owed is equal to the debt owed at the end of the prior year, of course. The formula in cell C35 for Beginning-of-year debt owed would be an echoed formula. Can you see what it would be? Now that you have seen how the borrowing and repayment data are shown, we can discuss the logic of the borrowing and repayment formulas. Calculation of Borrowing from Bank The logic of this calculation in English is: If (cash on hand before financing transactions is greater than the minimum cash required, then borrowing is not needed; else, borrow enough to get to the minimum cash). Or (a little more precisely): If (NCP is greater than the minimum cash required, then Borrowing from bank 5 0; else, borrow enough to get to the minimum cash). Suppose the desired minimum cash at year’s end is $10,000, which is a constant in your spreadsheet’s cell C6. Assume that the NCP is shown in your spreadsheet’s cell C29. The logic of the borrowing formula (assumed to be in cell C30) would be as follows: IF(NCP > Minimum Cash, 0; otherwise, borrow enough to get to the minimum). You have cell addresses that stand for NCP (cell C29) and Minimum Cash (C6). To develop the formula for cell C30, substitute the cell addresses for NCP and Minimum Cash. The harder logic is for the “else” clause. At this point, you could look ahead to the Borrowing answers in Figure C-31. In Example 2, $2,000 was borrowed. Which cell was subtracted from which other cell to calculate that amount? Substitute cell addresses in the Excel formula for Year 2’s borrowing formula in cell C31: 5IF( >5 , 0, - ) The answer is at the end of this section in Figure C-33. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 109 110 Tutorial C Calculation of Repayment to Bank The logic of this calculation in English is: IF(beginning of year debt 5 0, repay 0 because nothing is owed, but IF(NCP is less than the minimum, repay zero, because you must borrow, but IF(extra cash available equals or exceeds the debt, repay the whole debt, ELSE(to stay above the minimum cash, repay only the extra cash available)))) Look at the following formula skeleton. Assume that the repayment will be in cell C31. Assume also that debt owed at the beginning of the year is in cell C35 and minimum cash is in cell C6. “Extra cash” is the excess of NCP over the minimum cash needed. Substitute cell addresses for concepts to complete the formula for Year 2 repayment. (Clauses appear on different lines because of page width limitations.) 5IF( 5 0, 0, IF( <5 , 0, IF( ( – ) >5 , ____, (– ) ))) The answer is shown at the end of this section in Figure C-34. Answers to Questions about Borrowing and Repayment Calculations Figures C-31 and C-32 answer the questions about borrowing and repayment calculations. Example NCP Minimum Cash Required Amount to Borrow Comments 1 $50,000 $10,000 $0 NCP > Minimum, no need to borrow 2 $8,000 $10,000 $2,000 Need $2K to get to Minimum ($10K–$8K) 3 −$20,000 $10,000 $30,000 Need $30K to get to Minimum ($10K – (–$20K)) FIGURE C-31 Answers to examples of borrowing Example NCP Minimum Cash Required Beginning-of-year Debt Repay? Ending Cash 1 $12,000 $10,000 $4,000 $2,000 $10,000 2 $12,000 $10,000 $10,000 $2,000 $10,000 3 $20,000 $10,000 $10,000 $10,000 $10,000 4 $20,000 $10,000 $0 $0 $20,000 5 $60,000 $10,000 $40,000 $40,000 $20,000 6 −$20,000 $10,000 $10,000 $0 NA FIGURE C-32 Answers to examples of repayment Note the following points about the repayment calculations shown in Figure C-32. • • • In Examples 1 and 2, only $2,000 “extra” cash is available for debt repayment (12,000 – 10,000) to avoid going below the minimum cash. In Example 3, extra cash available for repayment is $10,000 (20,000 – 10,000), so all beginning debt can be repaid, leaving the minimum cash. In Example 4, no debt is owed, so no debt need be repaid. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System in Excel • • In Example 5, cash available for repayment is $50,000 (60,000 – 10,000), so all of the $40,000 beginning debt can be repaid, leaving more than the minimum cash. In Example 6, no cash is available for repayment. The company must borrow. Figures C-33 and C-34 show the formulas to calculate borrowing and repayment of debt. 5IF(C29 >5 C6, 0, C6 – C29) FIGURE C-33 Calculation of borrowing 5IF(C35 5 0, 0, IF(C29 <5 C6, 0, IF ((C29 – C6) >5 C35, C35, C29 – C6))) FIGURE C-34 Calculation of repayment Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 111 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 6 THE SKI RESORT INVESTMENT DECISION Decision Support Using Microsoft Excel PREVIEW In this case, you will use Microsoft Excel to help a ski resort establish a budget for the next three years and decide whether to expand activities into the summer months. PREPARATION • • • • • Review spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any part of Tutorial C that your instructor assigns. You may need to review the use of If statements and the section called “Cash Flow Calculations: Borrowing and Repayments.” Review file-saving procedures for Windows programs. Refer to Tutorial E as necessary. BACKGROUND Ski areas across the United States have seen external pressures on their profit margins recently. Profit margin, a key performance indicator, has been negative in the past few years due to high operating costs and diminishing revenue. A medium-sized ski area in Vermont is concerned about its profit margins and has hired you, a proficient Excel user, to help generate a spreadsheet budget and create a “what-if” analysis. The aging of baby boomers, who in the past have been active skiers, has caused the total number of skiers to drop in many areas across the country. Baby boomers represent an estimated 20 percent of all skiers. Younger people are skiing, but not as often as their parents and grandparents did. Younger people tend to have other interests; also, they work longer hours and have more debt, which means they have less cash to spend on an expensive sport. Another huge factor affecting the ski industry is climate change. The east coast of the United States has seen higher temperatures and fluctuations in the amount of snowfall recently. For example, Vermont has had less snowfall, especially over the last five years. Finally, the economy affects the ski industry. When potential skiers are out of work or underemployed, they do not have the disposable income to spend on lift tickets, rentals, food, transportation, and lodging. Snow Top Ski Area is located in the Green Mountains of Vermont. The resort currently has capacity for about 5,000 skiers per day, and it averages about 3,000 daily skiers. Snow Top also sells about 500 season tickets per year to local enthusiasts. The season tickets are sold at a significant discount compared with the daily tickets, but the management at Snow Top realizes that season-ticket holders also spend money at the resort on food and other incidentals. Snow Top generates income not only from ticket sales but from concessions and ski rentals. Most daily skiers rent equipment, either because they do not own it themselves or they want to avoid the hassle of bringing equipment on flights or train rides to Vermont. There is also an “other” revenue source generated from the ski store, where skiers buy items they left at home: goggles, balaclavas (ski masks), gloves, and so on. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 114 Case 6 The owners of Snow Top are concerned about their negative profit margins, and are wondering if they should expand their offerings and keep the ski area open all year. The summer months could bring in revenue from hiking, mountain biking, and gondola riding. The owners could also install a zip line for added adventure to attract more visitors. The owners would like you to finish setting up their budget in an Excel spreadsheet and run different scenarios. These scenarios would indicate the effects of changes in the number of skiers, different economic outlooks, and climate change. Then, the owners would like you to add projected revenues from the summer activities to see how they might affect some of the numbers. ASSIGNMENT 1: CREATING A SPREADSHEET FOR DECISION SUPPORT In this assignment, you will produce a spreadsheet that models Snow Top’s financial situation. Then, in Assignment 2, you will run Scenario Manager twice to explore various financial scenarios and write a memorandum that documents your analysis and findings. First, you will create the spreadsheet model of the decision. The model covers the three years from 2020 to 2022. This section helps you set up each of the following spreadsheet components before entering cell formulas: • • • • • • Constants Inputs Summary of Key Results Calculations Income and Cash Flow statements Debt Owed A discussion of each section follows. The spreadsheet skeleton for this case is available for you to use; it will save you time. To access the spreadsheet skeleton, go to your data files, select Case 6, and then select Ski Resort.xlsx. Constants Section Your spreadsheet should include the constants shown in Figure 6-1. An explanation of the line items follows the figure. FIGURE 6-1 Constants section Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Ski Resort Investment Decision • • • • • • • • • • • • • • • Tax Rate—The rate at which Snow Top’s net income is taxed is shown for each year. Cash Needed to Start Next Year—The local Vermont bank wants Snow Top to have at least $4 million cash at the beginning of each year. Assume that the ski resort could borrow from the bank at the end of a year in order to begin the new year with the needed amount. Interest Rate on Debt—This is the interest rate that the bank charges Snow Top on any outstanding debt. The interest is calculated for the year based on the debt owed at the beginning of the year. Daily Lift Ticket Price—This is the amount that Snow Top charges a customer to ski for an entire day at the resort. Annual Lift Ticket Price—This is the yearly amount (a one-time fee) that a skier will pay for an annual pass to the ski area. Skiers can then ski as many times as they choose. Average Daily Money Spent on Food—This is the average amount of money that skiers will spend on food and drink in the concession stands and restaurants at Snow Top. Average Ski School Daily Price—If skiers choose to take a lesson, this is the average price they will pay for the lesson. Average Daily Rental Price—If skiers rent equipment, such as boots, poles, skis, and helmets, this is the average price they will pay for one day’s rental. Number of Ski Days per Year—This is the average number of days in Vermont’s ski season. Snow Top is open for business for this number of days per year. Other Daily Revenue—Skiers often forget or lose gloves, goggles, hats, or other equipment required to make skiing pleasurable. The resort has a shop that supplies these items along with souvenirs. This amount of other revenue is what Snow Top expects each day. Summer Potential Revenue—If Snow Top decides to open for the summer and develop activities to attract visitors, it can expect this amount of revenue from the activities. Operating Costs – Snow Making—Snow making is required most of the season due to the recent lack of natural snow. Snow making is a huge expense for the ski industry. Luckily, snow-making equipment continues to become more efficient, so the costs are not expected to increase. Operating Costs – Summer—These are the expected costs that Snow Top will incur if it operates over the summer. Daily Other Winter Operating Costs—This is the additional daily cost of operating Snow Top, beyond the costs already noted. Fixed Costs—This is the amount of fixed costs per year; this number is not a function of how many days Snow Top is open each year. Inputs Section Your spreadsheet should include the following inputs for the years 2020 to 2022, as shown in Figure 6-2. FIGURE 6-2 • • • • Inputs section Rate of Change in Skiers—This percentage could be positive or negative, depending on how the resort thinks the number of future skiers will change. Economic Outlook—If the economy is going well and is expected to continue to hum along, enter “Good” in the cell. If the economy is faltering and is expected to be lackluster, enter “Poor.” Climate Change Factor—This percentage factor, expressed as a negative number, indicates the severity of climate change and its effect on the number of skiers. Summer Operations—If Snow Top decides to operate in the summer, enter “Y” in this cell. If not, the input is “N.” Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 115 116 Case 6 Summary of Key Results Section Your spreadsheet should include the results shown in Figure 6-3. FIGURE 6-3 Summary of Key Results section For each year, your spreadsheet should compute net income after taxes, cash on hand at the end of the year, debt owed at the end of the year, and profit margin. These values are computed elsewhere in the spreadsheet and should be echoed here for all years. Calculations Section You should calculate intermediate results that will be used in the income and cash flow statement that follows. The Calculations section is shown in Figure 6-4. When called for, use absolute referencing properly. Values must be computed by cell formula. Cell formulas should not reference a cell with a value of “NA,” which stands for “not applicable.” An explanation of each item in this section follows the figure. FIGURE 6-4 • • • • Calculations section Percentage Change in Daily Skiers—This number is a function of the rate of change in skiers, the economic outlook, and the climate change factor. If the economic outlook is poor, then the rate of change in skiers will decrease by 2 percent. The climate change factor will also be applied to the rate of change in skiers. For example, if the economic outlook is poor and the climate change factor is minus 3 percent, then the total rate of change in skiers will be the rate of change minus 2 percent minus 3 percent. Number of Daily Skiers—This number is a function of the percentage change in daily skiers and the previous year’s number of daily skiers. Number of Season Skiers—This number is a function of the rate of change in skiers. The rate of change in skiers is applied to the prior year. Yearly Total Skier Revenue—This number is a function of the number of daily skiers, the average lift ticket price, and the number of ski days per year, plus a function of the number of annualpass skiers and the annual lift ticket price. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Ski Resort Investment Decision • • • • • • Daily Ski School Attendees—This number is a function of the number of daily skiers. Assume that 10 percent of the daily skiers will take ski school lessons. Yearly Ski School Revenue—This number is a function of the daily ski school attendees, the average ski school daily price, and the number of ski days per year. Daily Equipment Rental Users—This number is 75 percent of the daily number of skiers. Yearly Rental Revenue—This number is a function of the daily equipment rental users, the average daily rental price, and the number of ski days per year. Yearly Food Concession Revenue—This number is a function of the total number of skiers per year and the average daily money spent on food. Assume that 90 percent of skiers buy food. Other Yearly Revenue—This number is a function of the other daily revenue and the number of ski days per year. Income and Cash Flow Statements The forecast for net income and cash flow starts with the cash on hand at the beginning of the year. This value is followed by the income statement and the calculation of cash on hand at year’s end. For readability, format cells in this section as currency with zero decimals. Values must be computed by cell formula; hard-code numbers in formulas only if you are told to do so. Cell formulas should not reference a cell with a value of “NA.” Your spreadsheets should look like those in Figures 6-5 and 6-6. A discussion of each item in the section follows each figure. FIGURE 6-5 • • • • • • Income and cash flow statements section Beginning-of-the-Year Cash on Hand—This value is the cash on hand at the end of the prior year. Revenue – Skiers—This value was computed elsewhere in the spreadsheet and can be echoed here. Revenue – Ski School—This value was computed elsewhere in the spreadsheet and can be echoed here. Revenue – Equipment Rental—This value was computed elsewhere in the spreadsheet and can be echoed here. Revenue – Food Concession—This value was computed elsewhere in the spreadsheet and can be echoed here. Revenue – Other—This value was computed elsewhere in the spreadsheet and can be echoed here. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 117 118 Case 6 • • • • • • • • • • • • Revenue – Potential Summer—If Snow Top decides to include summer activities and therefore operate in the summer, then the value for the revenue is echoed here from the Constants s­ ection. If Snow Top chooses not to include summer activities, then the value here is zero. Total Revenue—This amount is the sum of the revenue from the skiers, the ski school, the equipment rental, the food concession, other revenue, and perhaps the summer revenue, if chosen. Operating Costs – Snow Making—This value is recorded in the Constants section and echoed here. Summer Operating Costs—If Snow Top chooses to operate in the summer, then the value for the operating costs can be found in the Constants section and echoed here. If Snow Top chooses not to operate in the summer, then this value is zero. Yearly Winter Operating Costs—This value is a function of the daily other winter operating costs and the number of ski days per year. Fixed Costs—This value is recorded in the Constants section and echoed here. Total Costs—This is the sum of the operating costs of snow making, the summer operating costs, if chosen, the yearly winter operating costs, and the fixed costs. Income Before Interest and Taxes—This value is the difference between the total revenue and the total costs. Interest Expense—This value can be calculated from the interest rate, which is a value in the Constants section, and the debt owed at the beginning of the year. Income Before Taxes—This value is the difference between Income Before Interest and Taxes and the Interest Expense. Income Tax Expense—This value is based on the tax rate, which is a value in the Constants ­section, and the Income Before Taxes. This value should be calculated only for income that is a positive number. In other words, no tax is applied if the income before taxes is less than zero. Net Income After Taxes—This number is the difference between the Income Before Taxes and the Income Tax Expense. The following values must be computed by cell formula; hard-code numbers in formulas only when you are told to do so. Cell formulas should not reference a cell with a value of “NA.” An explanation of each item follows the figure. FIGURE 6-6 • • • • End-of-year cash on hand section Net Cash Position (NCP) Before Borrowing and Repayment of Debt—This amount equals cash at the beginning of the year plus net income after taxes. Add: Borrowing from Bank—Assume that Snow Top can borrow from bankers at the end of the year to reach the minimum cash needed to start the next year; this minimum is a value in the Constants section. If the NCP is less than this minimum, the company would borrow enough to start the next year with the minimum. Borrowing increases cash on hand, of course. Less: Repayment to Bank—The resort will use its excess cash at year’s end to pay off as much debt as possible without going below the minimum cash threshold. Excess cash is the NCP minus the minimum cash required on hand. Amounts over the minimum are available to repay any debt. The resort must repay as much as it can if it has any money available. Equals: End-of-Year Cash on Hand—This amount is the NCP plus any bank borrowing minus any repayments. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Ski Resort Investment Decision Debt Owed Section This section shows a calculation of debt owed at the end of a year (see Figure 6-7). Year 2019 values are NA except for End-of-year debt owed, which is $2 million. Values must be computed by cell formula. Cell formulas should not reference a cell with a value of “NA.” An explanation of each item follows the figure. FIGURE 6-7 • • • • Debt Owed section Beginning-of-Year Debt Owed—Debt owed at the beginning of a year equals the debt owed at the end of the prior year. Add: Borrowing from Bank—This amount has been calculated elsewhere and can be echoed to this section. Borrowing increases the amount of debt owed. Less: Repayment to Bank—This amount has been calculated elsewhere and can be echoed to this section. Repayments reduce the amount of debt owed. Equals: End-of-the-Year Debt Owed—This is the amount owed at the beginning of a year, plus borrowing during the year, minus repayments during the year. ASSIGNMENT 2: USING THE SPREADSHEET FOR DECISION SUPPORT Complete the case by (1) using the spreadsheet to gather data about possible financial scenarios and (2) ­documenting your findings in a memo. Snow Top managers would like you to explore two sets of three scenarios. They request that the first set not include any summer expansion. The input values for these scenarios are as follows: 1. 2. 3. Optimistic—The number of skiers will increase each year by 1 percent, and the economic outlook is good. The climate change factor will be zero in 2020 and 2021, and will be -3 percent in 2022. Neutral—The number of skiers will remain the same (no percentage increase or decrease), and the economic outlook is good. The climate change factor will be -2 percent in 2020 and 2021, and will be -6 percent in 2022. Pessimistic—The number of skiers will decrease each year by 3 percent, and the economic outlook is poor. The climate change factor will be -8 percent in 2020, 2021, and 2022. The management would also like to see the same scenarios with summer expansion in 2022. (It will take a few years to gear up for summer activities.) Assignment 2A: Using the Spreadsheet to Gather Data You have built the spreadsheet to model the company’s financial situation. You will run “what-if” scenarios with the various sets of input values using Scenario Manager. Set up the three scenarios and run them twice— one without the summer expansion and one with the summer expansion. Label one scenario summary sheet “Without Summer Expansion” and the other summary sheet “With Summer Expansion.” The relevant output cells are 2022 net income, 2022 cash on hand, 2022 debt owed, and 2022 profit margin. Run Scenario Manager to gather the data into a scenario summary report. When you finish, print the spreadsheet with the inputs for any one of the scenarios, print the Scenario Manager summary report sheets, and then save the spreadsheet file one final time. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 119 120 Case 6 Assignment 2B: Documenting Your Results in a Memo Write a brief memo that documents your analysis and results. You can address the memo to the management at Snow Top. Observe the following requirements: • • • • • Set up your memo as described in Tutorial E. In the first paragraph, briefly state the financial situation and the purpose of your analysis. Next, describe the scenarios tested and the related results. State your conclusions: What is the best action for Snow Top? Feel free to do additional research about climate change to predict what might happen to the resort in the future. Support your statements graphically, as your instructor requires. Your instructor may ask you to return to Excel and copy the Scenario Manager summary sheet results into the memo. You may be asked to include a summary table built in Microsoft Word based on the Scenario Manager summary sheet results. (Making a Word table is described in Tutorial E.) DELIVERABLES Your completed case should include the following deliverables for your instructor: • • • A printed copy of your memo Printouts of your spreadsheet and the Scenario Manager summary report sheet Electronic media, which should include your memo, the Scenario Manager main spreadsheet, and its summary sheet results Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 7 THE COLLEGE TOWN BUDGET Decision Support Using Microsoft Excel PREVIEW In this case, you will use Microsoft Excel to help a college town’s city council establish a budget for the next three years. PREPARATION • • • • • Review spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any part of Tutorial C that your instructor assigns. You may need to review the use of If statements and the section called “Cash Flow Calculations: Borrowing and Repayments.” Review file-saving procedures for Windows programs. Refer to Tutorial E as necessary. BACKGROUND The main campus of your state’s public university is in your hometown. The university has thousands of ­students, many of whom are housed in university-run dormitories. University dormitories are expensive to operate, and university officials would like to start phasing out of the dormitory business. They would like to start shutting dorms down, which would require students to live in apartments in town. The only problem with the plan is that the town does not have excess apartment units. There are, however, open spaces in town where real estate developers could build new apartment buildings. In fact, many streets in the older part of town (where the university campus is located) have become vacant or somewhat run down. Old buildings in this area could be taken down and apartment buildings constructed. Local developers have been petitioning the city council for construction permits to do just that, but the council has been slow to act. Now, given the university’s proposed policy on dormitories, the council will need to do something. In recent years, the city council has worked hard to put the city’s finances on a better footing. The city’s major revenues and expenses are discussed next. City Revenues • • • Water revenue—The city buys water from a state-run water authority, then resells it to citizens. The university runs its own water system. Students living in new apartment units would be new water customers for the city. Surveys have shown that students use about as much water as the average family living in an apartment or house. Electricity revenue—The city buys electricity from a state-run cooperative, then resells it to citizens. The university has its own electricity supplier, so students living in new apartment units would be new electricity customers for the city. Electricity revenue is by far the city’s major revenue source. Surveys have shown that students use about as much electricity as the average family living in an apartment or house. Property tax revenue—Property taxes are levied by housing unit. Each house and apartment is considered a unit for this purpose. Taxes are levied per unit, not based on a unit’s square footage. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 122 Case 7 • • • Parking revenue—The city runs parking lots and has meters on the main streets. City planners do not think that parking revenue would be affected by students moving from the dorms to apartments. Real estate transfer fees—Every time a piece of real estate is bought and sold in the city limits, a fee is levied. City planners do not think that transfer fee revenue would be affected by students moving from the dorms to apartments. Apartment permits—A developer must pay a fee to the city for the right to put up an apartment. This is a one-time building permit—in other words, the fee is paid once per apartment constructed. City Expenses • • • • Cost of water, cost of electricity—The outside agencies that supply water and electricity have historically raised the per-unit cost by 2 percent each year. The city has little leverage, so a 2 ­percent increase is built into the budget each year. Cost of employees—Citizens complain when the city adds staff, so the city has maintained the rolls at 250 employees for a few years now. Holding the costs of wages, salaries, and (especially) employee benefits in line is a challenge. City planners expect a 1 percent increase in average employee costs each year. Contractual and other costs—The city contracts out many operations—for example, garbage collection, cleaning city buildings, and maintaining the city’s vehicles. This cost is expected to creep up each year. Adding apartments will add to this cost. Interest on debt owed—The city has good relationships with local banks. If the city runs short of cash, the city borrows the shortfall from the banks. The banks want 10 percent of the balance owed at the beginning of a year to be repaid during the year. For this flexibility, the city pays a somewhat high interest rate of 8 percent. City financial management thinks it is prudent to have a certain minimum level of cash on hand at the start of each year, and the bankers want the city to have this safety net as well. City council members know that the city’s infrastructure needs to be upgraded, particularly its roads, water piping, and electric grid. An ambitious capital program is planned. The amounts budgeted assume city expansion of some sort, so this outlay is not expected to be affected by new apartment building construction. In recent years, city financial management has been difficult. The city’s fiscal managers persuaded council members to push through frequent increases in property taxes, water rates, and electric rates. Finally, the city is taking in more revenue than it pays out in expenses. However, this progress has come at a political cost. Council budget hearings are open public meetings. Citizens show up to vent long and loud about tax and utility rate increases; senior citizens living on fixed incomes are particularly vocal. Council members do not want to be voted out of office, so some unwritten financial planning rules now prevail. Tax and utility rate increases need to be low, if at all possible, even if expected cost increases will be high. If property taxes are raised in a year, they cannot be raised in the next two years. If property taxes are raised in a year, water and electric rates cannot be raised in that year. More apartments would mean more tax revenue and more utility revenue. So, at first blush, you would think the university’s plan to have students lease apartments in the city would be welcomed by the council. But, most of the apartments would be built in the older parts of town, where the senior citizens who complain about finances live. By and large, they like their town the way it has been all these years. Also, who wants the city’s streets clogged up by a lot of construction? Thus, some council members are not happy about the university’s plan. The university operates as its own political entity, and council members know they cannot stop the movement of students into the city. City planners think as many as 500 new apartments could be built in a year, and that is the number university officials have suggested. However, some council members would want developers to build only half that many apartments each year, and they think the university could live with that rate. Council members want to see budget alternatives and plans for both 500 and 250 new apartments per year, assuming modest increases in some cost and revenue items, and assuming that the ambitious capital Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The College Town Budget expenditure plan is approved. The city’s financial planners want revenues to continue to exceed expenses, and they would not want the amount of debt owed to local bankers to exceed $10 million under any circumstances. ASSIGNMENT 1: CREATING A SPREADSHEET FOR DECISION SUPPORT In this assignment, you will produce a spreadsheet that models the college town’s financial situation. Then, in Assignment 2, you will use the spreadsheet to gather decision support data about possible financial scenarios and write a memorandum that documents your analysis and findings. First, you will create the spreadsheet model of the decision. The model covers the three years from 2020 to 2022. This section helps you set up each of the following spreadsheet components before entering cell formulas: • • • • • • Constants Inputs Summary of Key Results Calculations Income and Cash Flow Statements Debt Owed A discussion of each section follows. The spreadsheet skeleton for this case is available for you to use; it will save you time. To access the spreadsheet skeleton, go to your data files, select Case 7, and then select CollegeTownBudget.xlsx. Constants Section Your spreadsheet should include the constants shown in Figure 7-1. An explanation of the line items follows the figure. • • • FIGURE 7-1 Minimum Cash Needed to Start Year—The city council wants to have at least $3 million cash at the beginning of each year. Assume that the town could borrow from a friendly banker at the end of a year in order to begin the new year with that amount. Number of Employees—The city’s baseline number of employees is expected to be 250, but that number would increase, depending on added apartments. Avg Gallons of Water Used per Household—A household (actual house or apartment) is expected to use an average of 100 gallons a year. Constants section Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 123 124 Case 7 • • • • • • • • • Avg Kilowatt Hours Used per Household—A household (actual house or apartment) is expected to use an average of 42.5 kilowatt hours a year. Parking Fees—The city earns money from parking lots and on-street meters. This amount is expected to be $3 million a year. Realty Transfer Fees—The city earns a fee when real estate changes hands. This amount is expected to be $1.5 million a year. Expected Increase in Employee Cost—The expected average cost of salary, wages, and benefits is expected to rise 1 percent each year. Expected Increase in Water Cost—The city buys water, which it then resells to citizens in town. The cost of the water purchased by the city is expected to increase 2 percent each year. Expected Increase in Kilowatt Cost—The city buys electricity, which it then resells to citizens in town. The cost of the electricity purchased by the city is expected to increase 2 percent each year. Apartment Permit Fee—A real estate developer must pay the city $100 for each apartment put in place in 2020. The fee will increase in 2021 and 2022. This is a one-time payment for each apartment. Expected Capital Expenditures—The council expects to spend money each year on city infrastructure, as shown. Expected Interest Rate on Debt—The notes are expected to carry an 8 percent interest rate. Inputs Section Your spreadsheet should include the following inputs for the years 2020 to 2022, as shown in Figure 7-2. • • • • FIGURE 7-2 Increase in Water Selling Price—The city would like to increase the selling price per gallon. If the expected price per gallon increase in a year is 1 percent, enter .01 in this cell; or, if you format these cells for percentage, you can enter a 1. Increase in Kilowatt Selling Price—The city would like to increase the selling price per kilowatt. If the expected price per kilowatt increase in a year is 1 percent, enter .01 in this cell; or, if you format these cells for percentage, you can enter a 1. Property Tax Increase—The city would like to raise property taxes. If the tax increase in a year is 1 percent, enter .01 in this cell; or, if you format these cells for percentage, you can enter a 1. Accelerated Apartment Construction (Y/N)—Enter a Y if the city will opt for 500 new apartments a year; otherwise, enter an N. Inputs section You must observe certain rules of thumb that the city council has learned in bruising budget battles of yore: • • • Water and electricity rates can be raised in the same year. Water and electricity rates cannot be raised in a year in which property taxes are raised. The property tax rate, once raised, cannot be raised in either of the next two years. These rules need not be encoded in your formulas, but you must keep them in mind when making manual entries. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The College Town Budget Summary of Key Results Section Your spreadsheet should include the results shown in Figure 7-3. FIGURE 7-3 Summary of Key Results section For each year, your spreadsheet should compute net income, cash on hand at the end of the year, and debt owed at the end of the year. These values are computed elsewhere in the spreadsheet and should be ­echoed here. Calculations Section You should calculate intermediate results (see Figure 7-4) that will be used in the income and cash flow statements that follow. When called for, use absolute referencing properly. Values must be computed by cell ­formula. Cell formulas should not reference a cell with a value of “NA,” which stands for “not applicable.” An explanation of each item in this section follows the figure. FIGURE 7-4 • • • • • Calculations section Number of Employees—If apartments are built on an accelerated basis, two employees will have to be added to the baseline number of employees, which is a value from the Constants section. Otherwise, the city council thinks they can get by with just the baseline number of employees in the year. Average Property Tax per Unit—The average property tax per unit (house or apartment) in a year will be a function of the prior year’s tax per unit and the tax rate increase expected. The expected tax increase in a year is a value from the Inputs section. For example, if a 1 percent increase was expected for 2020, the tax per unit would be 1.01 times the 2019 tax. Average Employment Cost per Employee—The average employment cost in a year will be a function of the prior year’s cost and the increase expected in the year. The expected increase is a value from the Constants section. For example, if a 1 percent increase was expected for 2020, the average cost would be 1.01 times the 2019 cost. Number of Apartments Built in Year—If accelerated construction is expected, 500 units will be added per year; otherwise, 250 will be added per year. Number of Housing Units—The number of housing units in town is a function of the number of units in town in a prior year and the number of apartments added in the year. For example, if 500 apartment units are added in 2020, the number of housing units in 2020 will be the existing number in 2019 plus 500. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 125 126 Case 7 • • • • • • • Cost of a Gallon of Water—The cost of a gallon of water to the city in a year will be a function of the prior year’s cost and the increase expected in the year. The expected increase is a value from the Constants section. Cost of a Kilowatt Hour—The cost of a kilowatt hour to the city in a year will be a function of the prior year’s cost and the increase expected in the year. The expected increase is a value from the Constants section. Selling Price of a Gallon of Water—The selling price of a gallon of water in a year will be a function of the prior year’s selling price and the increase expected in the year. The expected selling price increase is a value from the Inputs section. Selling Price of a Kilowatt Hour—The selling price of a kilowatt hour in a year will be a function of the prior year’s selling price and the increase expected in the year. The expected selling price increase is a value from the Inputs section. Number of Gallons of Water Sold—The number of gallons sold is a function of the number of housing units in a year (a value from elsewhere in the Calculations section) and the average gallons of water used by a household in the year (a value from the Constants section). Number of Kilowatts Sold—The number of kilowatts of electricity sold is a function of the number of housing units in a year (a value from elsewhere in the Calculations section) and the average kilowatts used by a household in the year (a value from the Constants section). Contractual and Other Costs—If construction occurs on an accelerated basis, contractual and other costs are expected to increase 3 percent over the prior year’s cost. Otherwise, contractual and other costs are expected to increase 1 percent over the prior year’s cost. Income and Cash Flow Statements The forecast for net income and cash flow starts with the cash on hand at the beginning of the year. This value is followed by the income statement and the calculation of cash on hand at year’s end. For readability, format cells in this section as currency with zero decimals. Values must be computed by cell formula; hard-code numbers in formulas only if you are told to do so. Cell formulas should not reference a cell with a value of “NA.” Your spreadsheets should look like those shown in Figures 7-5 and 7-6. A discussion of each item in the section follows each figure. FIGURE 7-5 Income and Cash Flow statements section Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The College Town Budget • • • • • • • • • • • • • • • Beginning-of-the-Year Cash on Hand—This value is the cash on hand at the end of the prior year. Water Revenue—Water revenue is a function of the gallons sold and the selling price per gallon, both of which are values from the Calculations section. Electric Revenue—Electricity revenue is a function of the number of kilowatts sold and the selling price per kilowatt, both of which are values from the Calculations section. Property Tax Revenue—Property tax revenue is a function of the number of housing units and the property tax per housing unit, both of which are values from the Calculations section. Parking Revenue—This value is recorded in the Constants section and can be echoed here. Realty Transfer Fees—This value is recorded in the Constants section and can be echoed here. Apartment Permits—This value is a function of the number of apartment units added in the year (a value from the Calculations section) and the per-unit permit fee (from the Constants section). Total Revenue—This amount is the sum of water, electricity, property tax, parking, transfer fee, and permit revenues. Cost of Water—This cost is a function of the number of gallons sold and the cost per gallon, both of which are values from the Calculations section. Cost of Electricity—This cost is a function of the number of kilowatts sold and the cost per kilowatt, both of which are values from the Calculations section. Employment Cost—This cost is a function of the number of employees in the year and the average employee cost in the year, both of which are values from the Calculations section. Contractual and Other Costs—This value is recorded in the Calculations section and can be echoed here. Interest on Debt Owed—This amount is the product of debt owed at the beginning of the year and the interest rate, which is a value from the Constants section. Total Expenses—This amount is the sum of the costs of water, electricity, employment, contractual and other, and interest on debt owed. Net Income—This amount is the difference between total revenue and total expenses. (Note that no taxes are paid by this governmental unit.) Line items for the year-end cash calculation are shown in Figure 7-6. In the figure, column B represents 2019, column C is for 2020, and so on. Year 2019 values are NA except for end-of-year cash on hand, which is $3 million. Values must be computed by cell formula; hard-code numbers in formulas only when you are told to do so. Cell formulas should not reference a cell with a value of “NA.” An explanation of each item follows the figure. FIGURE 7-6 • • • End-of-year cash on hand section Expected Capital Expenditures—These outlays are shown in the Constants section. They reduce cash on hand. Repayment to Note Holders—$5 million in notes is owed to the banks at the end of 2019. The agreement is that 10 percent of the notes outstanding at the end of the prior year will be repaid in the current year. You can hard-code the value “10” as a denominator in your formula. ­Repayment of debt reduces cash on hand. Net Cash Position (NCP) Before Borrowing—This amount equals cash at the beginning of the year plus the year’s net income, minus scheduled capital expenditures and minus repayments to note holders. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 127 128 Case 7 • • Add: Borrowing from Bank—Assume that the city can borrow from their friendly bankers at the end of the year to reach the minimum cash needed to start the next year; this minimum is a value from the Constants section. If the NCP is less than this minimum amount, the city will borrow enough to start the next year with the minimum. Borrowing increases cash on hand, of course. Equals: End-of-the-Year Cash on Hand—This amount is the NCP plus any bank borrowing. Debt Owed Section This section shows a calculation of debt owed at the end of a year, as shown in Figure 7-7. Year 2019 values are NA except for end-of-year debt owed, which is $5 million. Values must be computed by cell formula. Cell formulas should not reference a cell with a value of “NA.” An explanation of each item follows the figure. FIGURE 7-7 • • • • Debt Owed section Beginning-of-the-Year Debt Owed—Debt owed at the beginning of a year equals the debt owed at the end of the prior year. Add: Borrowing from Bank—This amount has been calculated elsewhere and can be echoed to this section. Borrowing increases the amount of debt owed. Less: Repayment to Note Holders—This amount has been calculated elsewhere and can be echoed to this section. Repayments reduce the amount of debt owed. Equals: End-of-the-Year Debt Owed—This is the amount owed at the beginning of a year plus borrowing during the year, minus repayments to noteholders during the year. ASSIGNMENT 2: USING THE SPREADSHEET FOR DECISION SUPPORT Complete the case by (1) using the spreadsheet to gather data about possible financial scenarios and (2) documenting your findings in a memo. The city council would very much like to get through the next three years without incurring significant bank debt. The key variable is whether to allow accelerated apartment building or not. The council asks you to consider four scenarios for the period, which are labeled Optimistic1, ­Optimistic2, Increase1, and Increase2. The input values for these scenarios are as follows: 1. Optimistic1—Apartments are not built on an accelerated basis. There is no property tax increase. There are no increases in the prices charged to citizens for water or electricity. 2. Optimistic2—Apartments are built on an accelerated basis. There is no property tax increase. There are no increases in the prices charged to citizens for water or electricity. 3. Increase1—Apartments are not built on an accelerated basis. Property taxes are increased 1 percent in 2020 (there are no property tax increases in 2021 and 2022). There is no increase in water or electricity prices in 2020. Water prices will increase by 1 percent in 2021 and in 2022. Electricity prices will increase by 1 percent in 2021 and in 2022. Increase2—Apartments are built on an accelerated basis. Property taxes are increased 1 percent in 2020 (there are no property tax increases in 2021 and 2022). There is no increase in water or electricity prices in 2020. Water prices will increase by 1 percent in 2021 and in 2022. Electricity prices will increase by 1 percent in 2021 and in 2022. 4. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The College Town Budget The city council would like to see a positive net income in each year, but especially in 2022. The council expects an increase in debt owed, but would not want debt to more than double by 2022. So, the question would be: In which scenario or scenarios is it possible to have positive net income and less than $10 million of debt in 2022? If that is not possible, the council will have to consider further cost reduction programs and/or stiffer increases in property taxes, water charges, and electricity charges. Assignment 2A: Using the Spreadsheet to Gather Data You have built the spreadsheet to model the city’s financial situation. You will run “what-if” scenarios with the four sets of input values using Scenario Manager. Set up the four scenarios. (Note that in Scenario Manager you can enter noncontiguous cell ranges, such as C19, D20:F20.) The relevant output cells are 2022 net income, 2022 cash on hand, and 2022 debt owed. Run Scenario Manager to gather the data into a scenario summary report. When you finish, print the spreadsheet with the inputs for any one of the scenarios, print the Scenario Manager summary report sheet, and then save the spreadsheet file one final time. Assignment 2B: Documenting Your Results in a Memo Write a brief memo documenting your analysis and results. You can address the memo to the city council. Observe the following requirements: • • • • • Set up your memo as described in Tutorial E. In the first paragraph, briefly state the financial situation and the purpose of your analysis. Next, describe the scenarios tested and the related results. State your conclusions: Are there scenarios that would be acceptable to the council? Or, will they have to consider stronger measures? Support your statements graphically, as your instructor requires. Your instructor may ask you to return to Excel and copy the Scenario Manager summary sheet results into the memo. You may be asked to include a summary table built in Microsoft Word based on the Scenario Manager summary sheet results. (The process of creating a table in Word is described in Tutorial E.) Your table should be in the format shown in Figure 7-8. Scenario 2022 Net Income 2022 Cash 2022 Debt Optimistic1 Optimistic2 Increase1 Increase2 FIGURE 7-8 Format of table to insert in memo DELIVERABLES Your completed case should include the following deliverables for your instructor: 1. 2. 3. A printed copy of your memo Printouts of your spreadsheet and scenario summary report sheet Electronic media, which should include your memo and Excel Scenario Manager program Staple all the pages together. Write your name and class number at the top of each page. Make sure that your electronic media are labeled, if required. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 129 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. PART 3 DECISION SUPPORT CASES USING MICROSOFT E X C E L S O LV E R TUTORIAL D Building a Decision Support System Using Microsoft Excel Solver, 133 CASE 8 Rose Tree Regional Airline, 151 CASE 9 The Auto Maker Product Mix Problem, 163 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. TUTORIAL D BUILDING A DECISION SUPPORT SYSTEM USING MICROSOFT EXCEL SOLVER Decision support systems (DSS) help people make decisions, as you learned in Tutorial C. Tutorial D teaches you how to use Solver, one of Excel’s built-in decision support tools. For some business problems, decision makers want to know the best, or optimal, solution. Usually that means maximizing a variable or minimizing another variable. For example, you might want to maximize net income or minimize total costs. This optimization is subject to constraints, which are rules that must be observed when solving a problem. Solver computes answers to such optimization problems. This tutorial has four sections: • • • • Using Excel Solver: In this section, you’ll learn how to use Solver in decision making. As an example, you’ll use Solver to create a production schedule for a sporting goods company. This schedule is called the base case. Extending the Example: In this section, you’ll test what you’ve learned about Solver as you ­modify the production schedule of the sporting goods company. This is called the extension case. Using Solver on a New Problem: In this section, you’ll use Solver on a new problem. Troubleshooting Solver: In this section, you’ll learn how to overcome problems you might encounter when using Solver, including what to do if it does not show up in the Excel Ribbon. NOTE Tutorial C offers some guidance on basic Excel concepts, including formatting cells and using functions such as IF(). USING EXCEL SOLVER Suppose a company must set a production schedule for its various products, each of which has a different profit margin. At first, you might assume that the company will maximize production of all profitable products to maximize net income. However, a company typically cannot make and sell an unlimited number of its products because of constraints. One constraint that affects production is the shared resource problem. For example, several products in a manufacturer’s line might require the same raw materials, which are in limited supply. Similarly, the manufacturer might require the same machines to make several of its products. In addition, a limited pool of skilled workers might be available to make the products. In addition to production constraints, management’s policies sometimes impose constraints. For example, management might decide that the company must have a broader product line. As a consequence, a certain production quota must be met for several products, regardless of profit margins. Thus, management must find a production schedule that will maximize profit given the constraints. Optimization programs like Solver look at each combination of products, one after the other, ranking each combination by profitability. Then the program reports the most profitable combination. To use Solver, set up a model of the problem, including the factors that can vary, the constraints on how much they can vary, and the goal—that is, the value you are trying to maximize or minimize. Usually you want to maximize net income or minimize total costs. Solver then computes the best solution. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 134 Tutorial D Setting Up a Spreadsheet Skeleton Suppose your company makes two products—basketballs and footballs. Assume that you will sell all of the balls you produce. To maximize net income, you want to know how many of each kind of ball to make in the coming year. Making each kind of ball requires a certain number of hours, and each ball has a different cost of raw materials. Because you have only a limited number of workers and machines, you can devote a maximum of 40,000 hours to production, which is a shared resource. You do not want that resource to be idle, however. You should not have more than 1,000 hours of downtime in a year, so machines should be used for at least 39,000 hours. Marketing executives say that you cannot make more than 60,000 basketballs or fewer than 30,000. ­Furthermore, they say that you must make at least 20,000 footballs but not more than 40,000. Marketing also says you should produce at least as many basketballs as footballs. What would be the best production plan? You can set up this problem in Solver. The spreadsheet sections are discussed in the pages that follow. AT THE KEYBOARD Start by saving a blank spreadsheet as Sportsl.xlsx. Then enter the skeleton and formulas as they are discussed. You can also use the skeleton file to save time. Select Tutorial D in your data files, and then select Sportsl.xlsx. Changing Cells Section The Changing Cells section contains the variables Solver is allowed to change while it looks for the solution to the problem. Figure D-1 shows the skeleton of this spreadsheet section and the values you should enter. An analysis of the line items follows the figure. FIGURE D-1 Changing Cells section The changing cells are for the number of basketballs and footballs to be made and sold. The changing cells are like input cells, except that Solver plays “what if” with the values, trying to maximize or minimize some value. In this case, you want Solver to maximize net income. You should enter a number in the changing cells each time you set up a problem before running Solver. It is customary to enter 1s in the changing cells, as shown. Solver will change these values when the program is run. Constants Section Your spreadsheet should also have a section for values that will not change. Figure D-2 shows the Constants section values that you should enter. A discussion of the line items follows the figure. NOTE You should format cells in the Constants section for currency or for two decimal place numbers. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver FIGURE D-2 Constants section • • • • • SELLING PRICE—The selling price for a single basketball and a single football. TAX RATE—The rate applied to income before taxes to compute income tax expense. NUMBER OF HOURS—The time needed to make a basketball and a football. Note, for example, that a ball-making machine can produce two basketballs in an hour. COST OF LABOR—A worker makes a ball using a ball-making machine. A worker is paid $10 for each hour of work at the machine. COST OF MATERIALS—The costs of raw materials for a basketball and a football. Profit margin is equal to selling price minus the costs of labor and materials. Notice that the profit margins for the two products are not the same. They have different selling prices and different inputs (raw materials and hours to make), and the inputs have different costs per unit. Also note that you cannot tell from the data how many machine hours of the shared resource will be devoted to basketballs and how many will be devoted to footballs, because you don’t know in advance how many basketballs and footballs will be made. Calculations Section In the Calculations section, you will calculate intermediate results that will be used in the spreadsheet body and as constraints. Before entering formulas, format the cells in the Calculations section for two decimal places. ­Figure D-3 shows the skeleton and formulas you should enter. A discussion of the cell formulas follows the figure. NOTE Cell widths are changed here merely to show the formulas—you need not change the widths in your skeleton file. FIGURE D-3 • • • Cell formulas in the Calculations section TOTAL BASKETBALL HOURS USED—The number of machine hours needed to make all basketballs (B3 * B10) is computed in cell B17. Cell B10 contains the constant for the hours needed to make one basketball. Cell B3, a changing cell, contains the number of basketballs made. Currently, this cell shows one ball, but that number will change when Solver works on the problem. TOTAL FOOTBALL HOURS USED—The number of machine hours needed to make all footballs is calculated similarly. TOTAL MACHINE HOURS USED (BB + FB)—The number of hours needed to make both kinds of balls (cell B19) will be used in the constraints; this value is the sum of the hours calculated for making footballs and basketballs. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 135 136 Tutorial D Notice that constants in the Excel cell formulas in Figure D-3 are referred to by their cell addresses. Use the cell address of a constant rather than hard-coding a number in the Excel expression. If the number must be changed later, you will have to change it only in the Constants section cell, not in every cell formula in which you used the value. Notice that you do not calculate the amounts shown in the changing cells—here, the number of basketballs and footballs to produce. Solver will compute those numbers. Also, notice that you can use the changing cell addresses in your formulas. When you do, you assume Solver has inserted the optimal values in each changing cell; your expression makes use of those numbers. Figure D-4 shows the calculated values after Excel evaluates the cell formulas (with 1s in the changing cells). FIGURE D-4 Cell values in the Calculations section Income Statement Section The target value is calculated in the Income Statement section of the spreadsheet. This is the value that Solver is expected to maximize or minimize. Figure D-5 shows the skeleton and formulas that you should enter. A discussion of the line-item cell formulas follows the figure. NOTE Income statement cells should be formatted for Currency and two decimal places. FIGURE D-5 Cell formulas in the Income Statement section • • • • • REVENUE—The values in cells B22 and B23 equal the number of balls made and sold multiplied by the respective unit selling price. The number of balls is shown in the Changing Cells section, and the selling prices are constants. TOTAL REVENUE—The sum of basketball and football revenue. MATERIALS COST—The values in cells B25 and B26 equal the number of units made multiplied by unit cost. COST OF MACHINE LABOR—The calculated number of machine hours multiplied by the hourly labor rate for machine workers. TOTAL COST OF GOODS SOLD—The sum of the cost of materials and the cost of labor. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver • • • INCOME BEFORE TAXES—The difference between total revenue and total cost of goods sold. INCOME TAX EXPENSE—This is the logic of the Income Tax Expense calculation: If Income Before Taxes is less than or equal to zero, the tax is zero; otherwise, the Income Tax Expense equals the tax rate multiplied by Income Before Taxes. An IF() statement is needed in cell B30. NET INCOME AFTER TAXES—The difference between income before taxes and income tax expense. Excel evaluates the formulas. Figure D-6 shows the results, assuming that 1s are in the changing cells. FIGURE D-6 Cell values in the Income Statement section Constraints Constraints are rules that Solver must observe when computing the optimal answer to a problem. Constraints need to refer to calculated values or to values in the spreadsheet body. You must build the calculations into the spreadsheet design so they are available to your constraint expressions. There is no section in the spreadsheet for constraints. You’ll use a separate window to enter constraints. Figure D-7 shows the Excel expressions for the constraints of the basketball and football production problem. A discussion of the constraints follows the figure. Description of Expression Excel Expression TOTAL MACHINE HOURS .5 39000 B19 .5 39000 TOTAL MACHINE HOURS ,5 40000 B19 ,5 40000 MIN BASKETBALLS 5 30000 B3 .5 30000 MAX BASKETBALLS 5 60000 B3 ,5 60000 MIN FOOTBALLS 5 20000 B4 .5 20000 MAX FOOTBALLS 5 40000 B4 ,5 40000 AT LEAST AS MANY BASKETBALLS AS FOOTBALLS B3 .5 B4 NET INCOME MUST BE POSITIVE B31 .5 0 FIGURE D-7 Solver constraint expressions Notice in the figure that a cell address in a constraint expression can be a cell address in the Changing Cells section, in the Constants section, in the Calculations section, or in the spreadsheet body. When using Solver, you might need to set minimum and maximum boundaries for variables. For example, the number of basketballs (MIN and MAX) varies between 30,000 and 60,000. Often a boundary value is zero because you want Solver to find a non-negative result. In this example, you want only answers that yield a positive net income. You tell Solver that the amount in the net income cell must equal or exceed zero so Solver will not find an answer that produces a loss. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 137 138 Tutorial D Machine hours must be shared between the two kinds of balls. The constraints for the shared resource are B19 .5 39000 and B19 ,5 40000, where cell B19 shows the total hours used to make both basketballs and footballs. The shared resource constraint seems to be the most difficult kind of constraint for students to master when learning Solver. Marketing wants the company to make at least as many basketballs as footballs. The constraint B3 .5 B4 expresses this logic. One other constraint arises out of common sense: Solver should not decide to make a partial ball. Solver will let you specify integer values for balls produced. Running Solver: Mechanics To set up Solver, you must tell it: • • • The cell address of the “target” objective variable that you are trying to maximize or minimize The changing cell addresses The expressions for the constraints Solver will record its answers in the changing cells and in a separate worksheet. Beginning to Set Up Solver AT THE KEYBOARD To start setting up Solver, first select the Data tab. In the Analyze group, select Solver. The Solver Parameters window appears, as shown in Figure D-8. Use the Solver Parameters window to specify the objective cell, the changing cells, and the constraints. FIGURE D-8 Upper portion of the Solver Parameters window Setting the Objective Cell To set an objective cell, use the following procedure: 1. 2. 3. Click the Set Objective box and enter B31, which is the cell for net income. Accept the default Max setting, which stands for “maximize.” Leave the Value Of: button unchecked. Do not press Enter when you finish. You’ll navigate within this window by clicking in the next input box. When you enter the cell address, Solver may insert dollar signs, as if for absolute addressing. Ignore them—do not try to delete them. Setting the Changing Variable Cells The changing cells are the cells for the basketballs and footballs, which are in the range B3:B4. Click the By Changing Variable Cells box and enter B3:B4, as shown in Figure D-9. Do not press Enter. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver FIGURE D-9 Entering data in the By Changing Variable Cells box Entering Constraints You are now ready to enter the constraint formulas one by one. To start, click the Add button in the Solver Parameters window. As shown in Figure D-10, you then see the Add Constraint window. In this example, you enter the constraint for minimum basketball production. FIGURE D-10 Entering data in the Add Constraint window You should do the following when entering constraint expressions: • • • • Type the variable’s cell address in the Cell Reference input box. Select the operator (,5,5,.5, or Int) in the smaller middle box. Enter either a raw number or the cell address of a value in the Constraint box. Click Add to finish entering the constraint. If you change your mind about the expression and do not want to enter it, click Cancel. Enter the minimum basketball constraint now. Later, Solver may insert an equal sign in front of the 30000 and dollar signs in the cell reference. After entering a constraint formula, click the Add button to add the constraint to the Solver model. The Add Constraint window stays open and allows you to enter other constraints. You should enter the rest of the constraints now. See Figure D-7 for the logic. Note that you should use the Int operator in the Add Constraint window to specify that B3 and B4 must be integer values. When you’re done entering constraints, click the Cancel button to return to the Solver Parameters window. In the Solver Parameters window, you will see that the constraints have been entered into the program. In some cases, not all constraints will appear due to the number of constraints and the size of the box, although that is not a problem here. The base case constraints are shown in Figure D-11. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 139 140 Tutorial D FIGURE D-11 Constraints entered in the Solver Parameters window Selecting a Solving Method Figure D-11 shows the Select a Solving Method field. You should select the GRG Nonlinear method, because the If statement in the tax expense calculation makes this a nonlinear problem. The Make Unconstrained Variables Non-Negative box should be checked, as shown in Figure D-11. Computing Solver’s Answer To have Solver calculate answers, click Solve in the lower-right corner of the Solver Parameters window. Solver does its work in the background—you do not see the internal calculations. Next you see a Solver Results window, as shown in Figure D-12. FIGURE D-12 Solver Results window Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver In the Solver Results window, Solver reports that it has found a solution and that the optimality conditions were met. This is a very important message—you should always check for it. It means that an answer was found and the constraints were satisfied. By contrast, your constraints might not allow Solver to find an answer. For example, suppose you had a constraint that said, in effect, “Net income must be at least a billion dollars.” That amount cannot be reached, given so few basketballs and footballs and the prices. Solver would report that no answer is feasible. Solver might also report that it found an answer, but only by ignoring some constraints. In either case, something would be wrong with your model, and you would need to rework it. There are two ways to see your answers. One way is to click OK in the Solver Results window, which lets you see the new changing cell values. A more formal and complete way is to click Answer in the Reports box and then click OK, which inserts detailed results into a new sheet in your Excel book. The new sheet is called an Answer Report. All Answer Reports are numbered sequentially as you run Solver. To see the Answer Report, click its tab, as shown in Figure D-13. In this case, the tab is named Answer Report 1. FIGURE D-13 Answer Report sheet tab The top portion of the report is shown in Figure D-14. FIGURE D-14 Top portion of the Answer Report Figure D-15 shows the remainder of the Answer Report. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 141 142 Tutorial D FIGURE D-15 Remainder of the Answer Report At the beginning of this example, the changing cells had a value of 1, and the income was $9.90 (Original Value). The optimal solution values (Final Value) also are shown: $476,640 for net income (the target) and 56,000 basketballs and 40,000 footballs for the changing cells. The report also shows details for the constraints: the constraint expression and the value of the variable in the optimal solution. Binding means the final answer caused Solver to bump up against the constraint. For example, the maximum number of machine hours was 40,000, which is the value Solver used to find the answer. Not binding means the reverse. A better word for binding might be constraining. For example, the ­maximum limit of 60,000 basketballs did not constrain Solver. The procedures you use to change or delete a constraint are discussed later in this tutorial. Use the File tab to print the worksheets (Answer Report and Sheetl). Save the Excel file using the Save option in the File tab. Then use the Save As option in the File tab to create a new file called Sports2.xlsx, which you will use in the next section of this tutorial. EXTENDING THE EXAMPLE Next, you’ll modify the sporting goods spreadsheet because management wants to know what net income would be if certain constraints were changed. In other words, management wants to play “what if” with certain constraints in the base case. The resulting second case is called the extension case. Here are the changes to the original base case conditions: • • • • Assume maximum production constraints will be removed. Similarly, the basketball-to-football production comparison (B3 .5 B4) will be removed. There still will be minimum production constraints. Assume that at least 30,000 basketballs and 30,000 footballs will be produced. A different and possibly more ambitious profit goal is desired. The ratio of net income after taxes to total revenue should be greater than or equal to .33. This new constraint will replace the constraint that calls for profits greater than zero. The machine-hours shared resource imposes the same limits as in the base case. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver AT THE KEYBOARD Begin by putting 1s in the changing cells. You need to compute the ratio of net income after taxes to total revenue. Enter the formula in cell B20; the formula should include the cell address for net income after taxes in the numerator and the total revenue cell address in the denominator. In the extension case, the value of this ratio for Solver’s optimal answer must be at least .33. Click the Add button and enter the new constraint. Then, in the Solver Parameters window, click to highlight constraints that are no longer needed: the net income .5 0 constraint, the maximum football and basketball constraints, and the basketball-to-football comparison constraint. Delete the constraints by clicking the Delete button. The minimum football constraint must be modified, not deleted. Select that constraint and then click Change to open the Add Constraint window. Edit the constraint so 30,000 is the lower boundary. When you are finished with the constraints, your Solver Parameters window should look like the one shown in Figure D-16. FIGURE D-16 Solver Parameters window for the extension case The constraints now apply only to the minimum production levels, the ratio of net income after taxes to total revenue, the machine-hours shared resource, and whole-number output. Set the Solver method to GRG Nonlinear in the Solver Parameters window. When Solver is run, the values in the Answer Report should look like those in Figure D-17. FIGURE D-17 Answer Report for the extension case Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 143 144 Tutorial D The answer for the extension case differs from the base case answer. Which production schedule should management use: the one that has maximum production limits or the one that has no such limits? This ­question is posed to get you to think about the purpose of using a DSS program. Solver’s very different answers to the base case and the extension case are shown in Figure D-18. Base Case Extension Case Basketballs 56,000 30,000 Footballs 40,000 83,333 FIGURE D-18 Solver’s answers for the two cases Can you use this output alone to decide how many of each kind of ball to produce? No, you cannot. You must also refer to the case objective, which is to maximize net income. Figure D-19 shows the answers with net income data added. Base Case Extension Case Basketballs 56,000 30,000 Footballs 40,000 83,333 Net Income $476,640 $556,198 FIGURE D-19 Solver’s answers for the two cases—with objective data When viewed this way, the extension case’s production schedule looks better because it gives a higher ­target net income. At this point, you should save the Sports2.xlsx file and then close it. Select Close from the File tab. USING SOLVER ON A NEW PROBLEM This section includes a short problem that lets you practice what you have learned about Excel Solver. Setting Up the Spreadsheet Assume that you run a shirt-manufacturing company. You have two products: polo-style T-shirts and dress shirts with button-down collars. You must decide how many T-shirts and button-down shirts to make. Assume that you’ll sell every shirt you make. AT THE KEYBOARD Start a new file called Shirts.xlsx and set up a Solver spreadsheet to handle the problem. You can also use the skeleton file to save time. Select Tutorial D in your data files, and then select Shirts.xlsx. Changing Cells Section Your changing cells should look like those in Figure D-20. FIGURE D-20 Shirt manufacturing changing cells Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver Constants Section Your spreadsheet should contain the constants shown in Figure D-21. A discussion of the constant cells and some of your company’s operations follows the figure. FIGURE D-21 Shirt manufacturing constants • • • • • • • TAX RATE—The rate is .28 on income before taxes. Note that no taxes are paid on losses. SELLING PRICE—You sell polo-style T-shirts for $8 and button-down shirts for $36. VARIABLE COST TO MAKE—It costs $2.50 to make a T-shirt and $14 to make a button-down shirt. These variable costs are for machine operator labor, cloth, buttons, and so on. COTTON USAGE—Each polo T-shirt uses 1.5 pounds of cotton fabric. Each button-down shirt uses 2.5 pounds of cotton fabric. TOTAL COTTON AVAILABLE—You have 13 million pounds of cotton on hand to make all of the T-shirts and button-down shirts. BUTTONS—Each polo T-shirt has three buttons. By contrast, each button-down shirt has one button on each collar tip, eight buttons down the front, and one button on each cuff, for a total of 12 buttons. TOTAL BUTTONS AVAILABLE—You have 110 million buttons on hand to be used in making the shirts. Calculations Section Calculations and related business constraints are discussed next. Your spreadsheet should contain the calculations shown in Figure D-22. FIGURE D-22 Shirt manufacturing calculations • RATIO OF NET INCOME TO TOTAL REVENUE—The minimum return on sales is 0.20. This ratio is net income after taxes divided by total revenue. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 145 146 Tutorial D • • COTTON USED/BUTTONS USED—You have a limited amount of cotton and buttons. The usage of each resource must be calculated and then used in constraints. RATIO OF BUTTON-DOWNS TO T-SHIRTS—You think you must make at least 2 million T-shirts and at least 2 million button-down shirts. You want to be known as a balanced shirt maker, so you think the ratio of button-downs to T-shirts should be no greater than 4:1. Thus, if you produced 9 million button-down shirts and 2 million T-shirts, the ratio would be too high. Income Statement Section Your spreadsheet should have the Income Statement section shown in Figure D-23. FIGURE D-23 Line items in the shirt manufacturing income statement The meaning of the line items should be clear from the sports example shown earlier in this tutorial. ­Solver’s objective is to maximize net income after taxes. You could use the table shown in Figure D-24 to hand-write the constraints before entering them into Solver. Expression Fill in the Excel Expression Net income to revenue ______.5______ Ratio of button-downs to T-shirts ______,5______ Minimum T-shirts ______.5______ Minimum button-downs ______.5______ Usage of buttons ______,5______ Usage of cotton ______,5______ FIGURE D-24 Logic of shirt manufacturing constraints Before running Solver, set the method to GRG Nonlinear in the Solver Parameters window. When you are finished with the program, print the sheets. Select Save from the File tab to save the file, and then select Close from the File tab to close the file. TROUBLESHOOTING SOLVER Use this section to overcome problems with Solver and to review some Windows file-handling procedures. Adding Solver to the Excel Ribbon Before you can use Solver, it must be installed in Excel. To see if it is, start Excel. Click the Data tab in the Ribbon. If you see a group on the right side named Analysis that contains Solver, Solver has been installed. If Solver is not shown, do the following: 1. 2. Click the File tab. Click Options. The Excel Options window should appear. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver 3. 4. 5. In the menu on the left, click Add-Ins to display utilities you can add to Excel. At the bottom of the screen, click the Go button. The Add-ins window appears. Click the box for Solver Add-In. Then click the OK button to close the window and return to the Ribbon. If you click the Data tab again, you should see that the Analyze group contains Solver. Rerunning a Solver Model If you have changed your spreadsheet in some way, you might want to rerun Solver to get a new set of answers. For example, you may have changed a constraint or a formula in your spreadsheet. Before you click Solve to rerun Solver, you should enter a “1” in each of the changing cells. Creating Overconstrained Models It is possible to set up a model that has no logical solution. For example, in the second version of the sporting goods problem, suppose you had specified that at least 1 million basketballs were needed. When you clicked Solve, Solver would have tried to compute an answer but then would have admitted defeat by telling you that no feasible solution was possible, as shown in Figure D-25. FIGURE D-25 Solver Results message: no feasible solution The Reports window would show that no report is available. Such a mistaken model is sometimes referred to as overconstrained. Setting a Constraint to a Single Amount You may want an amount to be a specific number, as opposed to a number in a range. For example, if the number of basketballs needed to be exactly 30,000 in the previous scenario, you would select the “equals” operator, as shown in Figure D-26. FIGURE D-26 Constraining a value to equal a specific amount Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 147 148 Tutorial D Integer Changing Cells The Int operator in the Add Constraint window is used to force cell values to be integers, as described in a prior section. Forcing Solver to find only integer solutions slows it down. In some cases, the change in speed can be noticeable to the user. It can also prevent Solver from seeing a feasible solution when one could be found using noninteger answers. For these reasons, it’s usually best not to impose the integer constraint unless the logic of the problem demands it. Deleting Extra Answer Sheets Suppose you’ve run different scenarios, each time asking for an Answer Report. As a result, you have a number of Answer Report sheets in your Excel file, but you don’t want to keep them all. To get rid of an Answer Report sheet, first select the Home tab. In the Cells group, click the Delete drop-down arrow and select Delete Sheet. You will not be asked to confirm the deletion, so make sure you want to delete the sheet before you act. You can also delete an Answer Report sheet by right-clicking the sheet’s lower tab and then selecting Delete. When prompted to confirm the deletion, click the Delete button. Restarting Solver with All New Constraints Suppose you want to start over with a new set of constraints. In the Solver Parameters window, click Reset All. You will be asked to confirm, as shown in Figure D-27. FIGURE D-27 Reset options warning To reset all options, select OK. You now have a clean slate, with all entries deleted. From this point, you can specify a new model. NOTE If you only want to add, delete, or edit a constraint, do not use Reset All. Use the Add, Delete, or Change buttons as appropriate. Using the Solver Options Window Solver has a number of internal settings that govern its search for an optimal answer. If you click the Options button in the Solver Parameters window, you will see these default settings, as shown in Figure D-28. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Building a Decision Support System Using Microsoft Excel Solver FIGURE D-28 Solver Options window with default settings for Solver parameters The settings in the Solver Options window govern how long Solver works on a problem and how precise it must be in satisfying constraints. You should not have to change these default settings for the cases in this book. If you think that your work in Solver is correct but Solver cannot find a feasible solution, you should check to see that the settings in the Solver Options window are entered as shown in Figure D-28. Printing Cell Formulas in Excel To widen cell formulas on the screen so they can be read more easily, press Ctrl and the left quotation (‘) keys at the same time: Ctrl+‘. The left quotation mark is usually shown on the same key as the tilde (~). You can manually change cell widths by clicking and dragging the column indicator boundaries (A, B, C, etc.). To print the formulas, open the File tab and select Print. Print the sheet as you would normally. To restore the screen to its typical appearance and show values instead of formulas, press Ctrl1‘ again. The command acts like a toggle switch. If you did not change any column widths while in the cell formula view, the widths will remain as they were. Reviewing the Printing, Saving, and Exiting Procedures Print the Solver spreadsheets in the normal way. Activate the sheet, then open the File tab and select Print. You can print an Answer Report sheet the same way. To save a file, open the File tab and select Save or Save As. Make sure you select the proper drive (for example, drive F:) if you want your file to be saved to a flash drive or other disk. When exiting Excel, always start with the File tab. Then select Close. Sometimes Solver will come up with strange results. For instance, your results might differ from the target answers that your instructor provides for a case. Thinking that you’ve done something wrong, you might ask Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 149 150 Tutorial D to compare your cell formulas and constraint expressions with those your instructor created. Lo and behold, you see no differences! Surprisingly, and for no apparent reason, Solver occasionally produces slightly different outputs from inputs that are seemingly the same. This may occur because the order of the constraints matters for your application, or even the order in which they are entered matters. In any case, if you are close to the target answers but cannot see any errors, it’s best to ask your instructor for guidance rather than spin your wheels. As another example, you might ask for changing cell outputs as integers. Solver may tell you that the correct output is 8.0000001 or 7.9999999. In such situations, Solver is apparently not sure about its own rounding. In this case, you should humor Solver and take the result as the integer 8, which is what Solver was trying to report in the first place. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 8 ROSE TREE REGIONAL AIRLINE Decision Support Using Microsoft Excel Solver PREVIEW Rose Tree Regional Airline provides passenger transportation services and small-parcel logistics to major metropolitan areas in the Mountain region. The company operates in a hub-and-spoke fashion with the headquarters in Salt Lake City at its center, serving the following cities: Las Vegas, Albuquerque, Denver, Cheyenne, Boise, Reno, and Phoenix. Considering the tremendous competition that the airline industry has seen in recent years, management has determined that the current manual scheduling system can no longer produce the most cost-effective plane allocation to the various routes. Furthermore, the company is interested in the possibility of selling any unused cargo space to companies like Amazon. You have been hired as a new MIS consultant to develop a DSS model for Rose Tree Regional Airline. Your completed model will be used to assign the plane fleet to its seven destinations while minimizing costs. Also, you will be asked to modify the model to calculate how taking on additional cargo will affect the company’s profitability and operating costs. PREPARATION • • • • Review spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any part of Tutorial D that your instructor assigns, or refer to it as necessary. Review the file-saving procedures for Windows programs in Tutorial C. BACKGROUND You will use your Excel skills to build a decision support model and determine how to best allocate the company’s fleet to various destinations. The model requires the following data, which the management team has compiled for you: • • • • Data for the four different types of planes in the fleet: o Passenger capacity o Cargo space o Operating cost per mile (includes fuel, labor, and overhead) o Number of available planes Ticket pricing to each destination Cargo pricing to each destination Distance from Salt Lake City to each destination In addition, the operations department has given you information about the passenger and cargo demand for each city: • • Expected daily passenger load Expected daily cargo load To satisfy passenger requirements and cargo demand, your Solver model will assign planes by number and type to each destination city. The model will also calculate daily revenues from both passenger service and cargo, as well as the total daily operating cost. The results of these calculations will be used to create a daily Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 152 Case 8 gross profit statement. You will run Solver first to minimize the total operating cost. Next, you will modify the model to examine taking on additional cargo and its effect on the total operating cost and profitability. Finally, you will run the modified model to maximize daily gross profits. Rose Tree Regional Airline Fleet The company’s fleet consists of 50 planes divided into four different types. From an operating cost perspective (highest to lowest), this is the current fleet: • • • • Boeing 717 Bombardier CRJ700 Embraer E170 Airbus A220 ASSIGNMENT 1: CREATING SPREADSHEET MODELS FOR DECISION SUPPORT In this assignment, you will create spreadsheets that model the business decision Rose Tree Regional Airline is seeking. In Assignment 1A, you will create a spreadsheet and attempt to assign the planes manually to minimize the total operating cost. In Assignment 1B, you will copy the spreadsheet to a new worksheet, and then set up and run Solver to minimize the total operating cost. In Assignment 1C, you will copy the Solver solution to a new worksheet and modify it to add calculations for taking on additional cargo. You will then rerun Solver to determine how the extra cargo affects the company’s total operating cost. In Assignment 1D, you will copy the modified Solver spreadsheet and rerun Solver to maximize daily gross profit. This section helps you set up each of the following spreadsheet components before entering the cell formulas: • • • Constants Calculations and Results Income Statement The Calculations and Results section is the heart of the decision model. You will set up columns for travel distance, daily demand, plane assignment by type, plane use, and operating costs. The spreadsheet rows will represent destination cities. The Plane Assignment section will be the range of changing cells for Solver to manipulate. The total operating cost will serve as your optimization cell for Assignments 1B and 1C, and the daily gross profit will be your optimization cell for Assignment 1D. You will add formulas to the additional cargo cells in the Calculations and Results section for Assignments 1C and 1D. Assignment 1A: Creating the Spreadsheet for the Base Case A discussion of each spreadsheet section follows. This information helps you set up each section of the model and learn the logic of the formulas in the spreadsheet. If you choose to enter the data directly, follow the cell structure shown in the figures. You can also download the spreadsheet skeleton if you prefer. To access the base spreadsheet skeleton, select Case 8 from your data files and then select RoseTreeRegionalAirline.xlsx. Constants Section First, build the skeleton of your spreadsheet. Set up the spreadsheet title and Constants section as shown in Figure 8-1. An explanation of the column items follows the figure. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Rose Tree Regional Airline FIGURE 8-1 • • • • • • • • • • • • • Spreadsheet title and Constants section Spreadsheet title—Enter the spreadsheet title in cell B1 and then merge and center the title across cells B1 through Fl. Constants section, Plane Data table—Enter the column headings shown in cells B5 through G5. Plane Type—Enter each of the four planes listed in cells B6 through B9. Passenger Capacity—Enter each of the four passenger capacities listed in cells C6 through C9. Cargo Capacity (ft3)—Enter each of the four cargo capacities listed in cells D6 through D9. Operating Cost per Passenger-Mile—Enter each of the four operating costs per mile listed in cells E6 through E9. Operating Cost per Cargo-Mile—Enter each of the four operating costs per mile listed in cells F6 through F9. Available Fleet—This value is the number of planes of each type that Rose Tree Regional Airline keeps in service. Enter these numbers in cells G6 through G9. Constants section, Fee Schedule table—Enter the column headings shown in cells B11 through D11. Destination—Enter the seven destination cities in cells B12 through B18. Average Ticket Price—Enter the passenger ticket prices for the seven destinations in cells C12 through C18. Cargo Price/ft3—Enter the cargo price per cubic foot for the seven destinations in cells D12 through D18. Fill Legend—This section is actually adjacent to the Constants section. Enter “Fill Legend” in cell J5, fill cell J6 in yellow, fill cell J7 in blue, enter “Changing Cells” in cell K6, and enter “Optimization Cell” in cell K7. Calculations and Results Section The Calculations and Results section (see Figure 8-2) will contain distances, daily passenger bookings, and daily cargo shipment data obtained from the operations department. Although these values are constants, keeping them in the Calculations and Results section facilitates writing and copying formulas in the Plane Utilization, Costs, and Extra columns. This section also includes the Plane Assignment table, which contains the changing cells and calculations for plane usage, costs, and additional cargo. An explanation of the sections and columns follows the figure. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 153 154 Case 8 FIGURE 8-2 • • • • • • • • • • • Calculations and Results section Table headings—If you did not use the spreadsheet skeleton, enter the column headings shown in cells B20 through O21 in Figure 8-2. Destination—Cells B22 through B28 hold the seven cities serviced daily by Rose Tree Regional Airline. Distance from Salt Lake City Hub—Cells C22 through C28 hold the route distances in miles to each of the seven destinations. Daily Passenger Bookings—Cells D22 through D28 hold the average number of passenger tickets booked each day. Daily Cargo Shipments (ft3)—Cells E22 through E28 hold the average number of cubic feet of cargo shipped daily. Plane Assignment section—Cells F22 through I28 are the heart of the Solver model—the changing cells. The cells hold the amounts of each of the four aircraft types that Solver will assign to the seven destinations. Enter “1” in each of these cells for now. You should fill the cells with a background color to indicate that they are the changing cells for Solver. To fill the cells, select them and then click the Fill Color button in the Font group on the Home tab. In the spreadsheet skeleton, the cells are yellow. Plane Utilization section, Total Passenger Capacity—Cells J22 through J28 hold the total passenger capacity for each destination. The capacity is calculated by multiplying the number of each assigned plane type by its passenger capacity, which is taken from cells C6 through C9 of the Constants section. Next, take the sum of the total capacities for the four types of planes assigned. Be sure to use absolute cell references for the passenger capacity values from the Constants section so that you have to write the formula only for the first cell (J22); then you can copy the formula to cells J23 through J28. % of Passenger Capacity Utilized—Cells K22 through K28 hold the percentage of passenger capacity used for each destination. The value is calculated by dividing Daily Passenger Bookings by Total Passenger Capacity. Total Cargo Capacity—Cells L22 through L28 hold the total cargo capacity for each destination. The capacity is calculated by multiplying the number of each assigned plane type by its cargo capacity, which is taken from cells D6 through D9 of the Constants section. Next, you take the sum of the total capacities for the four types of planes assigned. Again, you must use absolute cell references for the freight capacity values from the Constants section so that you only have to write the formula for the first cell (L22); then you can copy the formula to the other six cells. % of Cargo Capacity Utilized—Cells M22 through M28 hold the percentage of cargo capacity used. The percentage is calculated by dividing the Daily Cargo Shipments by the Total Cargo Capacity. Operating Cost—Cells N22 through N28 hold the operating cost for each plane type to each destination. The cost is calculated by the following formula: Number of planes assigned × Operating Cost per passenger mile × Mileage to destination + ­Number of planes assigned × Operating Cost per cargo mile × Mileage to destination • The costs for each of the four planes are then added to get the operating cost. Add’l Cargo ft3 to be Added—Leave cells O22 through O28 blank for now. You will place formulas in these cells in Assignment 1C. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Rose Tree Regional Airline • Total/Avg—Total the cell entries for every column except column K (% of Passenger Capacity ­Utilized) and column M (% of Cargo Capacity Utilized). Place the totals in cells D29 to J29, L29, and N29. For cell K29, divide the total Daily Passenger Bookings in cell D29 by the Total Passenger Capacity in cell J29 and format the result as a percentage. For cell M29, divide the total Daily Cargo Shipments in cell E29 by the Total Cargo Capacity in cell L29 and format the result as a percentage. These two averages are the overall utilization rates of your fleet. For now, leave cell O29 blank (the total for Add’l Cargo ft3 to be Added). If you wrote your formulas correctly, the Calculations and Results section should look like Figure 8-3. FIGURE 8-3 Completed Calculations and Results section Income Statement Section The Income Statement section (see Figure 8-4) is actually a projection of daily gross profits and is based on the number of planes that will be assigned either manually or by Solver. An explanation of the line items ­follows the figure. FIGURE 8-4 • • • • • • Income Statement section Passenger Revenues—This value is calculated by multiplying the passenger tickets booked for each destination (cells D22 through D28) by their respective average ticket prices (cells C12 through C18), and then totaling the ticket revenues for the seven destinations. Cargo Revenues—This value is calculated by multiplying the daily cargo shipments for each ­destination (cells E22 through E28) by their respective air freight prices (cells D12 through D18), and then totaling the cargo revenues for the seven destinations. Additional Cargo—This value is the additional revenue from cell O29, which will be used later in the assignment. Total Revenues—This value is the total of Passenger Revenues, Cargo Revenues, and Additional Cargo revenues. Less Operating Costs—This value is the Total Cost from cell N29. Daily Gross Profit—This value is the Total Revenues minus the Operating Costs. This cell will be used as the optimization cell for Assignment 1D. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 155 156 Case 8 If your formulas are correct, the initial Income Statement section will appear as shown in Figure 8-5. FIGURE 8-5 Initial income statement The initial income statement correctly reflects the revenues expected from the passenger and cargo bookings, but the operating costs are not correct because the planes required to transport the passengers and cargo have not been completely assigned yet. Attempting a Manual Solution Attempt to assign your plane fleet manually in the spreadsheet. You have several good reasons for doing this. First, you can make sure your model is working correctly before you set up Solver to run. Second, assigning the plane fleet manually will demonstrate which constraints you must meet in solving the problem. For instance, if a passenger or cargo utilization rate is over 100%, you have not assigned enough planes to carry all the passengers and cargo to a particular destination. Therefore, one constraint is that the total passenger capacity for the planes assigned to a destination must be greater than or equal to the passenger bookings. Another constraint is that the total cargo capacity for the planes assigned must be greater than the cargo shipments booked. Given the fleet size, you can probably assign the fleet manually and meet all of your constraints. However, will your total operating cost be the least expensive solution? Running the problem manually will provide an initial operating cost to which you can compare your Solver solution later. The Solver optimization tool should give you a better solution than assigning the fleet manually. When attempting to assign the planes manually in the Plane Assignment section (the changing cells), you must satisfy both the passenger and cargo demands for each destination—in other words, the Total Passenger Capacity values in cells J22 through J28 and the Total Cargo Capacity values in cells L22 through L28 must be equal to or greater than the Daily Demand values in cells D22 through D28 and E22 through E28. If you have satisfied the passenger and air freight demands correctly, none of the utilization rates in cells K22 through K28 and M22 through M28 will exceed 100%. In addition, the total planes assigned for each type (cells F29 through I29) cannot exceed the available number of each plane type (cells G6 to G9). Once you reach a solution that satisfies the preceding constraints, save your workbook. Name the worksheet Rose Tree Guess and then right-click the worksheet name tab, click Move or Copy, copy the worksheet, and rename the new copy Rose Tree Solver 1. You will use the new worksheet to complete the next part of the assignment. Assignment 1B: Setting up and Running Solver Before using the Solver Parameters window, you should jot down the parameters you must define and their cell addresses. Here is a suggested list: • • • The cell you want to minimize (Total Cost, cell N29) The cells you want Solver to manipulate to obtain the optimal solution (Plane Assignment, cells F22 through I28) The constraints you must define: • • All the plane assignment cells must be non-negative integers. The total number of each type of plane assigned (cells F29 through I29) cannot exceed the number of available planes of each type (cells G6 through G9). Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Rose Tree Regional Airline • • The total passenger capacity to each destination (cells J22 through J28) must be equal to or greater than the total passenger bookings for each destination (cells D22 through D28). The total cargo capacity to each destination (cells L22 through L28) must be equal to or greater than the total cargo shipment for each destination (cells E22 through E28). Next, set up your problem. In the Analyze group on the Data tab, click Solver; the Solver Parameters ­ indow appears, as shown in Figure 8-6. Enter “Total Cost” in the Set Objective text box, click the Min w ­button, designate your Changing Cells (cells F22 through I28), and add the constraints from the preceding list. Use the default Simplex LP solving method. If you need help defining your constraints, refer to Tutorial D. FIGURE 8-6 The Solver Parameters window Next, you should click the Options button and check the Options window that appears (see Figure 8-7). The default Integer Optimality is 5%; change it to 1% to get a better answer. Make sure the Constraint Precision is set to the default value of .000001 and that the Use Automatic Scaling option is checked. When you finish setting the options, click OK to return to the Solver Parameters window. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 157 158 Case 8 FIGURE 8-7 The Solver Options window Run Solver and click Answer Report when Solver finds a solution that satisfies the constraints. When you finish, print the entire workbook, including the Solver Answer Report Sheet. To save the workbook, click the File tab and then click Save. For the rest of the case, you either can use the Save As command to create new Excel workbooks or continue copying and renaming the worksheets. Both options offer distinct advantages, but having all of your worksheets and Solver Answer Reports in one Excel workbook allows you to compare different solutions easily, as well as prepare summary reports. Before continuing, examine the plane assignments that Solver chose for minimizing the total cost. If you set up Solver correctly, you should see a significant reduction in total cost from your manual assignment. Assignment 1C: Additional Cargo Revenues Using the model you created in Assignment 1A, Rose Tree Regional Airline can also determine the revenue benefit of accepting additional cargo from other companies. Taking on additional cargo might be a good option for Rose Tree Regional Airline if its cargo service has excess capacity. After contacting other parcel delivery companies in the area that service the same seven destinations from Salt Lake City, you determine that the rate for additional cargo will be discounted $15 per ft3 in order to be more competitive. You must modify the worksheet to accommodate selling the excess capacity and then rerun Solver. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Rose Tree Regional Airline Copy your Rose Tree Solver 1 worksheet and rename it Rose Tree Add’l Cargo. Perform the following tasks: • • • You must insert a calculation for the cells in the Add’l Cargo ft3 to be Added column (cells O22 through O28). You must recalculate the operating cost (cells N22 through N28) by incorporating the extra cargo. You must calculate the additional cargo revenue (cell C34 in the Income Statement section) by using the cargo cost per route and available excess cargo to be sold. Keep in mind that the excess cargo will be sold at a discount. By selling additional cargo space to companies like Amazon, the company still receives passenger revenues, and at the same time it collects additional revenues from exploiting excess capacity. You must use conditional statements to write the formulas for cells O22 through O28. Use the following logic for the formula you place in cell O22: • • If the Total Cargo Capacity to Las Vegas (cell L22) is greater than the Daily Cargo Shipments (cell E22), the company can sell the difference between the two (its excess capacity) to competitors. If the Total Cargo Capacity to Las Vegas (cell L22) is less than or equal to the Daily Cargo Shipments (cell E22), the company has no excess capacity to sell to competitors. Click the Insert Function button (fx) next to the formula bar below the Ribbon to help you write the If statement (see Figure 8-8). After you enter the formula in cell O22, you can copy and paste the formula into cells O23 through O28. Cell O29 is the total of cells O22 through O28. FIGURE 8-8 The If function window Although you are now taking extra cargo and increasing your revenues, is the current plane assignment still the most cost efficient? Run Solver with the additional cargo calculation to see if there’s a more efficient plane assignment. The Solver Results window appears (see Figure 8-9) and warns that the linearity conditions required by the Simplex LP solving method are not satisfied. The default Simplex calculation method will not work because the model now includes the excess cargo equations, which are If functions and therefore nonlinear. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 159 160 Case 8 FIGURE 8-9 Error message when Simplex LP method is used on nonlinear models Fortunately, Solver has methods for working with nonlinear problems as well. Open the Solver Parameters window again and click the Select a Solving Method list arrow. Click GRG Nonlinear (see Figure 8-10), and then click Options. Under Options, click the All Methods tab to check that the Integer Optimality is set to 1% (see Figure 8-11), and then click OK to return to the Solver Parameters window. Run Solver again; the solution will probably take longer than in the earlier problem. If the solution takes too long to calculate, you can cap the Max Time in seconds in the Options window (see Figure 8-11). Click Answer Report and then click OK to create a second Answer Report. Examine it and the worksheet to see if it provides a better plane assignment solution when compared with the first Solver solution. FIGURE 8-10 Selecting a new solving method Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Rose Tree Regional Airline FIGURE 8-11 Solver Options window with Integer Optimality set to 1% Print the Rose Tree Add’l Cargo worksheet and Answer Report 2 and then save your workbook. What if, instead of minimizing costs, you were interested in maximizing revenues? In other words, is gross profit greater than that in the earlier solutions? Because you added the ability to sell excess cargo in the assignment model, you should probably maximize gross profit to account for any possible efficiencies. Assignment 1D: Rerunning Solver to Maximize Gross Profit Copy the worksheet that contains the solution for excess capacity, and rename the new worksheet Rose Tree Solver 3. Click Solver to open the Solver Parameters window, and then change the value in the Set Objective text box to $C$37 (the cell that contains Daily Gross Profit). Click the Max button to maximize the Set Objective value, as shown in Figure 8-6 earlier, and then run Solver. The solution will probably take longer than in the earlier problem. If the solution takes too long to calculate, you can cap the Max Time in seconds in the Options window (see Figure 8-11). Click Answer Report and then click OK to create a third Answer Report. Examine it and the worksheet to see if maximizing daily gross revenues provides a better plane assignment solution when compared with the solutions that minimized total costs. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 161 162 Case 8 ASSIGNMENT 2: USING THE WORKBOOK FOR DECISION SUPPORT You have built a series of worksheets to determine the best plane assignments with and without selling excess cargo space and maximizing profit versus minimizing costs. You will now complete the case by using your solutions and Answer Reports to make recommendations in a memorandum. Use Microsoft Word to write a memo to the management team at Rose Tree Regional Airline. State the results of your analysis, whether you think the current plane assignment method is still profitable, and whether you think plane assignments should be based on lowest cost or maximum profit. • • • • • Set up your memo as described in Tutorial E. In the first paragraph, briefly describe the situation and state the purpose of your analysis. Next, summarize the results of your analysis and give your recommendations. Support your recommendation with appropriate screen shots or Excel objects from the Excel workbook. (Tutorial C describes how to copy and paste Excel objects.) In a future case, you might suggest revisiting the Solver analysis to determine the profitability of making changes to the plane fleet. ASSIGNMENT 3: GIVING AN ORAL PRESENTATION Your instructor may request that you summarize your analysis and recommendations in an oral presentation. If so, prepare a presentation for the CEO and other managers that lasts 10 minutes or less. When preparing your presentation, use PowerPoint slides or handouts that you think are appropriate. DELIVERABLES Prepare the following deliverables for your instructor: • • • A printout of the memo Printouts of your worksheets and Answer Reports Electronic media, which should include your Word document, Excel workbook, and PowerPoint presentation Staple the printouts together with the memo on top. If you have more than one Excel workbook file for your case, write your instructor a note that describes the different files. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 9 THE AUTO MAKER PRODUCT MIX PROBLEM Decision Support Using Microsoft Excel Solver PREVIEW An automobile company must improve its vehicles’ miles per gallon in order to comply with new government regulations. The company makes and sells different kinds of automobiles and trucks, and they have different miles per gallon ratings. In this case, you will use Microsoft Excel Solver to determine the company’s product mix needed to comply with the new regulations in a profitable way. PREPARATION • • • • • Review spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any part of Tutorial D that your instructor assigns, or refer to it as necessary. Review file-saving procedures for Windows programs. Refer to Tutorial E as necessary. BACKGROUND Vehicles with an internal combustion engine burn gasoline for propulsion. In this process, carbon-laden fumes are released out of the tailpipe into the air. This release contributes to air pollution. The government requires automobile companies to produce vehicles that are fuel efficient in order to reduce air pollution. A vehicle’s fuel efficiency is denoted by its miles per gallon (MPG)—the number of miles that can be covered by burning a gallon of gasoline in the vehicle’s engine. For example, if an automobile needs to burn five gallons of gasoline in order to cover 100 miles, the vehicle’s MPG would be 100/5 = 20. A vehicle that needed 10 gallons to cover 100 miles would have an MPG of 10, and would be releasing twice as much carbon. The government’s regulations specify that vehicles operate at a certain MPG. The regulation applies to an automobile company’s entire “fleet”—in other words, all the types of vehicles it makes and sells. If you assume that a company makes and sells 100,000 sedans that have an MPG of 25, and 50,000 trucks that have an MPG of 20, the fleet’s average MPG would be a weighted average equal to the following: ((100,000 * 25) + (50,000 * 20)) / (100,000 + 50,000) = 23.33 In the example, if the government’s requirement was a fleet average MPG of 23, then the company would be in compliance. But, if the requirement were 24, then the company would have to do something to come into compliance. The company could work to increase the MPG of its vehicles, or it could decide to make and sell more of its higher-rated MPG vehicles and less of its lower-rated MPG models. Or, the company could try some combination of these options. Periodically, the government increases the required MPG, and recently it mandated that a car company’s fleet average MPG must improve to 45 five years from now. Achieving this fleet average in five years will be a challenge. The company’s trucks, SUVs, sedans, and compact cars all have internal combustion engines that burn gasoline. The company also makes electric vehicles that are battery powered, and the battery emits no carbon Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 164 Case 9 into the atmosphere. When the battery’s charge runs very low, a small gasoline-powered engine kicks in briefly to boost the charge, and some carbon is emitted into the air. The company’s engineers have estimated how much it will cost to make and sell each type of vehicle five years from now, and the company has provided selling prices. These values are shown in Figure 9-1. Type of Vehicle Selling Price Cost of Manufacture Truck $60,000 $30,000 SUV $55,000 $28,000 Sedan $40,000 $33,000 Compact $30,000 $27,000 Electric $35,000 $37,000 FIGURE 9-1 Expected selling prices and cost of manufacture in five years The company’s financial people call the difference between the selling price and the cost of manufacture the “gross margin.” You can see that the gross margins of trucks and SUVs are higher than the gross margins of the other types of vehicles. Note also that the gross margin of the electric cars is negative. Why would the company make and sell cars at a loss? The company thinks that in the long run, it will sell more electric cars, which means the average cost of manufacture will decline and the company will make money on them. The government gives the buyer of an electric car an income tax credit, which helps the company’s marketing. The company expects this credit to persist indefinitely. The company’s marketing people have estimated how many of each type of vehicle they might sell five years from now. The company’s engineers will set up the production lines to accommodate this estimate. The maximum production capacities in five years for each type of vehicle are shown in Figure 9-2. Type of Vehicle Max Production Capacity Truck 30,000 SUV 90,000 Sedan 50,000 Compact 20,000 Electric 10,000 FIGURE 9-2 Expected maximum production capacities in five years These estimates do not mean the company will sell 30,000 trucks, 90,000 SUVs, and so on. The estimates are upper limits—they are set up so that the company could make and sell this amount of each type of vehicle. The company’s engineers know how to improve MPG; for example, they can make the engines run more efficiently, use lighter materials in the vehicle’s body, and streamline the body for less air resistance. MPG improvements are anticipated; the expected MPGs five years from now are shown in Figure 9-3. Type of Vehicle Expected MPG Truck 28 SUV 33 Sedan 40 Compact 55 Electric 100 FIGURE 9-3 Expected MPGs in five years Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Auto Maker Product Mix Problem Some small emissions from electric cars are anticipated, depending on how the driver manages the battery’s charge. This behavior is difficult to anticipate, so the government has allowed the car companies to use 100 MPG for electric cars in the fleet average calculation. This number recognizes that the vehicles emit little or no pollution. The base case question for the company’s marketing managers is: How many of each kind of vehicle should the company try to make and sell in five years? The company must meet the new MPG standard, but the company must be profitable as well—in fact, management wants the gross margin to be at least 30 percent of gross revenue in the coming years. A significant minority of the company’s marketing executives think that the market will change greatly in the coming years. Here is a summary of how their thinking is different from the company’s as a whole: • • • Younger people are much more environmentally conscious than drivers in previous generations. Younger people do not love driving as much as their parents and grandparents do. They might prefer to hire an Uber or Lyft driver. Electric cars lack acceleration? Who notices when looking at one’s phone? Younger people might even prefer a driverless car. Such cars could be electric rather than gasoline powered. All of these factors argue for many more sales of electric cars and smaller cars than the majority of marketing managers think is warranted. The minority would like to see an analysis that reflects their point of view. This analysis, they think, could suggest great changes in the company. ASSIGNMENT 1: CREATING A SPREADSHEET FOR DECISION SUPPORT In this assignment, you will produce a spreadsheet that models the business decision. In Assignment 1A, you will make a Solver spreadsheet to model the base case. In Assignment 1B, you will make a Solver spreadsheet to model the extension case. In Assignment 2, you will use the spreadsheet models to develop information needed to help marketing managers think about the company’s future. You will then document your recommendation in a memorandum to the company’s management. Your spreadsheets should include the cells explained in the following sections. You will set up the spreadsheets before entering cell formulas. Your spreadsheets will also include decision constraints, which you will enter using Solver. Your spreadsheets should have the following sections: • • • • Changing Cells Constants Calculations Income Statement Assignment 1A: Creating the Spreadsheet for the Base Case A discussion of each spreadsheet section follows. The discussion explains how to set up each section and explains the logic of the formulas in the section’s cells. You can enter the data yourself or use the base case spreadsheet skeleton to save time. To access the spreadsheet skeleton, select Case 9 in your data files, and then select AutoMakerProductMix.xlsx. Changing Cells Section Your spreadsheet should have the changing cells shown in Figure 9-4. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 165 166 Case 9 FIGURE 9-4 Changing Cells section You will ask the Solver model to compute how many of each type of vehicle to make and sell five years from now, in order to meet the MPG standard and to maximize gross profit. Start with a value of “1” in each cell. Solver will change each value as it computes the answers. You do not want Solver to compute the fractional part of a vehicle. You can force Solver to recommend integer values when specifying the constraints. Constants Section Your spreadsheet should have the constants shown in Figure 9-5. An explanation of the line items follows the figure. FIGURE 9-5 • • • • Constants section Average Selling Prices—The selling prices expected in five years are shown in Figure 9-1. Average Cost of Manufacture—The costs of manufacture expected in five years are shown in ­Figure 9-1. Average MPG—The expected MPGs for each type of vehicle are shown in Figure 9-3. Max Production Capacity—Upper limits on production are shown in Figure 9-2. Calculations Section Your spreadsheet should calculate the amounts shown in Figure 9-6. An explanation of the line items follows the figure. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Auto Maker Product Mix Problem FIGURE 9-6 • • • • Calculations section Revenue—Revenues are a function of the number of vehicles made and sold and the expected selling price. Cost of Manufacture—Costs are a function of the number of vehicles made and sold and the expected cost of manufacture. Total number of autos made—This value is the sum of all the vehicles made and sold. Fleet MPG—This value is the weighted average MPG of all the vehicles made and sold. Income Statement Section Your spreadsheet should calculate the gross margin, as shown in Figure 9-7. An explanation of the line items follows the figure. FIGURE 9-7 • • • • Income Statement section Total Revenue—This is the sum of the revenues for all vehicles. These revenues are values from the Calculations section. Total Cost of Manufacture—This is the sum of the costs for all vehicles. These costs of manufacture are values from the Calculations section. Gross Margin—This is the difference between total revenue and total cost of manufacture. Gross Margin Percentage—This is total revenue divided by total cost of manufacture. The company wants a gross margin of at least 30 percent. Constraints and Running Solver Next you must determine the constraints. You can assume that the marketing managers think at least 20,000 trucks, 20,000 SUVs, 20,000 sedans, 20,000 compacts, and 8,000 electric vehicles will be made and sold five years from now. Use Solver to enter the base case constraints. You want to maximize total gross margin. Set Solver for GRG Nonlinear mode. Run Solver and ask for the Answer Report when Solver finds a solution that satisfies the constraints. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 167 168 Case 9 When you finish, print the entire spreadsheet and the Answer Report sheet. Save the file one more time using the Save command in the File tab, keeping the AutoMakerProductMix.xlsx filename. Then, to prepare for the extension case, use the Save As command in the File tab to create a new spreadsheet named ­AutoMakerProductMixExtension.xlsx. Assignment 1B: Creating the Spreadsheet for the Extension Case Next, you prepare the extension case. A minority of the company’s marketing executives think that compacts and electric cars will be more in demand in five years, and that production capacity should be set at 80,000 electric vehicles and 30,000 for compact cars. There are only so many production lines, so this change means that fewer of the other kinds of vehicles would be made. The revised maximum capacities would be 20,000 for trucks, 50,000 for SUVs, and 20,000 for sedans. The reduction in production capacities for trucks, SUVs, and sedans means that semi-fixed costs would be spread over fewer cars made. This would increase the expected unit cost of manufacture for these types of vehicles. The expected unit costs of manufacture would be $35,000 for trucks, $32,000 for SUVs, and $37,000 for sedans. The effect would be the opposite for compacts and electric cars. The expected unit cost of manufacture for electric vehicles would be $29,000, and the unit cost for compacts would be $26,000. With these changes, the Constants section should look like Figure 9-8. FIGURE 9-8 Constants section for extension case Minimum expected sales would be 10,000 trucks, 10,000 SUVs, 10,000 sedans, 20,000 compacts, and 50,000 electric vehicles. Expected selling prices and MPGs would remain the same. The gross margin percentage goal would remain the same. Modify the extension case spreadsheet to change constraints as needed. Run Solver, then ask for the Answer Report when Solver finds a solution that satisfies the constraints. When you finish, print the entire spreadsheet and the Answer Report sheet. Save the file one more time, close it, and exit Excel. ASSIGNMENT 2: USING THE SPREADSHEET FOR DECISION SUPPORT You have built models for the base case and the extension case. You will now complete the case by (1) using the worksheets and Answer Reports to gather data and (2) documenting your findings in a memo. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Auto Maker Product Mix Problem Assignment 2A: Using the Spreadsheets to Gather Data You have printed the spreadsheets and the Answer Report for the base case and the extension case. For each case, management wants to know the number of each type of vehicle to make and sell, the total gross profit, and the gross profit percentage. Management’s goals are to meet the MPG requirement and to maximize gross profit. You should summarize the key data in a table that will be included in your memo. The form of the table is shown in Figure 9-9. Base Case Extension Case Type of Vehicle: Trucks SUVs Sedans Compacts Electric Company Data: Gross margin Gross margin percentage Fleet MPG FIGURE 9-9 Format of table to insert into memo Your memo should contrast the base case and extension case results, which might be very different. Assume that the Marketing minority is correct about the direction of the automobile market. How different would the company have to be to respond to these changes? Is it worthwhile to plan for such changes—in other words, would the company be that much more profitable, and would it be that much more friendly to the environment? Assignment 2B: Documenting Your Recommendation in a Memo Write a brief memo to the marketing managers that explains your results. Observe the following requirements: • • • • Set up your memo as described in Tutorial E. In the first paragraph, briefly state the problem and the decision to be made, but do not provide a great deal of background—you can assume that readers are generally aware of the situation. Tell management your findings. Support your discussion graphically by including a table in the memo, as shown in Figure 9-9. Make the table by following the procedure described in Tutorial E. Your instructor may require you to include an Excel chart as well. DELIVERABLES Your completed case should include the following deliverables for your instructor: • • • A printed copy of your memo Printouts of the spreadsheets and Solver Answer Reports Electronic media, which should include your memo and Excel files Staple the printouts together with the memo on top. If you have more than one Excel workbook file for your case, write your instructor a note that describes the different files. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 169 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. PART 4 INTEGRATION CASES USING MICROSOFT ACCESS AND EXCEL CASE 10 The Donation Letter Analysis, 173 CASE 11 San Francisco Fire Incidents, 183 CASE 12 San Francisco Fire Incidents: Advanced Analysis, 191 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 10 THE DONATION LETTER ANALYSIS Decision Support with Microsoft Access and Excel PREVIEW A local charity has an annual appeal. This year, the format of the annual appeal letter was changed. In this case, you will use Microsoft Access and Excel to see if the change led to increased donations. PREPARATION • • • • Review database and spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any parts of Tutorials B, C, and D that your instructor assigns, or refer to them as necessary. Refer to Tutorial E as necessary. BACKGROUND A local charity has had an “annual appeal” for many years. In the appeal, a letter is sent to potential donors, asking for a donation. For many years the letter has been a detailed discussion of the charity’s ­accomplishments in the past year. This year, a new development director was hired. In her opinion, wordy letters are a turnoff to potential donors. What is needed, she thinks, is a letter that quickly grabs and holds the reader’s attention, leading up to the final request for money. “We want to give the donors a better idea of how their money has been used,” she said. Accordingly, this year’s letter was redesigned to reduce verbiage and to include color pictures taken at the charity’s activities. Everyone at the charity agrees that this year’s letter is more visually appealing and more fun to read than previous letters. But, did the changes work? That is, did the new format generate more donations? Anticipating that question, the new development director devised a means of allowing a direct comparison with previous years. First, she had the letters sent to the same people who were solicited in prior years. Also, half of these people received a letter with the prior format (“year 1”), and the other half received a letter with the new format (“year 2”). The charity’s development data is kept in an Access database. The new development director is aware of your skills with Access and Excel, and she has called you in to analyze the impact of the letter’s new format. The director wants information about consistently generous donors, and she wants information about people who have stopped donating. To help her evaluate the impact of the new format, she has these specific questions: • • • • • • • Did men increase their giving in year 2? Did women increase their giving in year 2? Did people who received the old letter increase their giving in year 2? Did people who received the new letter increase their giving in year 2? Did men who received the old letter increase their giving in year 2? Did women who received the old letter increase their giving in year 2? Did men who received the new letter increase their giving in year 2? Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 174 Case 10 • • • Did women who received the new letter increase their giving in year 2? Did people who gave less in year 2 than in year 1 do so in response to the new format or to the old one? Are changes in giving in year 2 associated with donors’ ages? The database is available for you to use; go to your data files, select Case 10, and then select ­DonationLetter.accdb. The database’s tables are discussed next. Figure 10-1 shows the design of the Donors table. FIGURE 10-1 Donors table design The table has 874 records, one for each potential donor solicited this year and last year. Each record is denoted by a unique number in the Donor Num field, which is the primary key field. The donor’s name is recorded in the Last Name and First Name fields. The donor’s gender and zip code are shown in appropriately named fields, and the donor’s year of birth is shown in the YOB field. NOTE If a modern database contains a gender field, it must account for the fact that some people do not identify as male or female. Therefore, a gender field should contain at least three possible entries: (m)ale, (f)emale, and (o)ther. Figure 10-2 shows a few of the table’s records. FIGURE 10-2 Some Donors table data records For example, donor number 1 is named Mateo Acquino, a man born in 1948. He lives in zip code 19600. The prior year’s donations are recorded in the Year 1 Donations table. These donations were made in response to the letter with the old format. Figure 10-3 shows the design of the table. FIGURE 10-3 Year 1 Donations table design Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Donation Letter Analysis Figure 10-4 shows a few of the table’s records. FIGURE 10-4 Some Year 1 Donations data records For example, Mateo Acquino, donor number 1, received a letter with the old format in the prior year, and he donated $25 in response. The database has a similar table called Year 2 Donations for this year’s donations. Still another table, the Year 2 Letter table, indicates what kind of letter each donor received. Recall that in this year’s appeal, half the prospective donors received a letter with the old format, and half received a ­letter with the new format. Figure 10-5 shows the design of the Year 2 Letter table. FIGURE 10-5 Year 2 Letter table design Figure 10-6 shows a few of the table’s records. FIGURE 10-6 Some Year 2 Letter data records For example, donor number 1, Mateo Acquino, received a letter with the new format, but donor number 6 received a letter with the old format. ASSIGNMENT 1: USING ACCESS AND EXCEL FOR DECISION SUPPORT The development director has a number of questions you will attempt to answer using the output of Access queries that you will design. Then, you will attempt to answer other questions by bringing Access data into Excel for further analysis. Access Database Queries You will develop a number of queries in Access. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 175 176 Case 10 Query 1 The development director wants to know which donors gave $500 or more in each of the past two years. A ­letter of appreciation will be sent to these generous people. Create a query named Generous Donors that lists the donors and the amounts they gave in both years. The first few records of your output should look like those in Figure 10-7. Notice that the output is sorted in descending order on the year 2 donation. FIGURE 10-7 Query of generous donors Query 2 The development director also wants to know which potential donors gave nothing in each of the past two years. These people will be deleted from the list of potential donors. Create a query named Zero Both Years that lists people who gave no money in the past two years. The first few records of your output should look like those in Figure 10-8. FIGURE 10-8 Query of people who made no donations Query 3 You need to make a summary query that gathers up all the data that is available for the rest of this case. This query output will be imported into Excel for further analysis. The first few records of the summary query ­output should look like those in Figure 10-9. FIGURE 10-9 Summary Query output records Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Donation Letter Analysis Other Queries Your instructor might require you to develop other queries. When you finish creating queries, close the database file and exit Access. Importing Summary Data into Excel You have used Access to gather information about generous donors and people who have stopped giving. Now you will use Excel to gather information that will help answer the remaining questions posed by the new development director. Start by opening a new file in Excel and saving it as DonationLetter.xlsx. You need to import the Summary Query output into Excel. Click the Data tab, and then select Get Data from the Get & Transform Data group. From the resulting menu, select From Database and then From ­Microsoft Access Database. The Import Data window opens. Navigate to your DonationLetter.accdb database, and then click the Import button. Excel reacts by establishing a connection to your database. In the Navigator window, select Summary Query, and then click the Load button. The data will come across as an Excel table, which is the format that you want. As this happens, Excel opens a Queries and Connections window on the right side of your worksheet. You should close this window. To create a totals row for the table you are making, open the Table Style Options group of the Design tab and click the Total Row box. The first few rows of your worksheet should look like those in Figure 10-10. FIGURE 10-10 Initial rows in the Excel worksheet The Total row should look like the one in Figure 10-11. FIGURE 10-11 Total row in the worksheet Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 177 178 Case 10 Using the Table to Gather Data The development director wants to know if there are differences in giving based on donors’ gender or the type of letter they received. You can use the table to develop a range of data to see such differences. Tables are ­discussed in Tutorial E, but some brief directions are provided here. The labels in the table headings have drop-down arrows that you can click to assign a filter for a selected label. For example, if you want to apply a filter to see average giving by gender, select the drop-down arrow in the Gender column. Deselect the F and O boxes, leaving the M box selected. Only the records for male giving are displayed. In the totals row, you can use the Count and Average operators to count the number of male donations and the average giving by men in year 1 and year 2 (see Figure 10-12). FIGURE 10-12 Male giving in year 1 and year 2 As you can see, 488 men gave an average of $168 in year 1 and $187 in year 2. You can also see average giving by women; just select the F box and deselect the M and O boxes. Your totals row would look like the one in Figure 10-13. FIGURE 10-13 Female giving in year 1 and year 2 You should then select the O box to see Other average giving in year 1 and year 2. As you can see, the Total row changes with each operation, so you need a place to gather data as it is developed. You could use a separate worksheet, or you could set up a range of values beneath or to the right of the full dataset. In this case, select another worksheet and name it Results. You can copy or manually transcribe data as you go. So far, you should have the data shown in Figure 10-14. FIGURE 10-14 Gender-based giving data gathered in Results worksheet Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Donation Letter Analysis In the same way, you should gather counts and average giving based on responses to the new donation ­letter and the old one (Yes or No). Record the results in your Results worksheet. You can use more than one filter at the same time. For example, say you want to see average giving for men who received the new letter in year 2. You would click the Gender drop-down filter and select M, then click the Letter drop-down filter and select Yes. You would then be able to see average giving in years 1 and 2 for men who got the new letter in year 2. In this way, you should capture giving data for men and women who got the new letter, and for men and women who got the old letter. When you are finished, your Results ­worksheet data should be formatted like that in Figure 10-15. (Note that some of the values shown are for illustrative purposes only.) FIGURE 10-15 Results worksheet data The development director wants data about people whose donations decreased in year 2. You should insert a column into the table that computes the difference between year 2 and year 1 donations. (The ­Yr2 – Yr1 column automatically becomes part of the table.) The top few rows of your worksheet would look like the ones in Figure 10-16. FIGURE 10-16 Year 2 donation data minus year 1 data Again, the development director wants to know how many people decreased their donations in year 2. Of those people, how many got the old letter? How many got the new letter? You can create a filter based on relational operators such as “less than,” “greater than,” or “equal to.” For example, to identify donors who gave less in year 2 than in year 1, click the Yr2 – Yr1 column’s drop-down arrow. In the resulting menu, the Number Filters option expands into a submenu. Select the Less Than option. In the window that appears, enter a zero opposite the “is less than” box, and then click OK. Excel shows the records for people whose giving decreased in year 2. For those records, filter by New Letter Yes and No to see how many people received the new letter and how many received the old-format letter. Record your data in the Results worksheet. You should be able to tell if people who received the letter with the new format were more or less likely to decrease their giving. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 179 180 Case 10 Using Pivot Tables to Gather Data You will develop a pivot table from the summary worksheet. Pivot tables are discussed in Tutorial E, but a review of how to create them is in order here. To make a pivot table, first select any cell in the data table range. Select the Insert tab and then select Pivot Table in the Tables group. The Create Pivot Table window appears. In the window, the proper data range should already be shown. “New worksheet” is the default destination, which is what you should choose here. Click OK. The right side of the screen shows the Pivot Table Fields window. The fields are shown in the top part of the window. There are four smaller areas in the bottom part of the window: Values, Rows, Columns, and Filters. The use of the Pivot Table Fields window is best explained by an example. Say you had data about average yearly earnings for left- and right-handed people. In addition, the earnings data is available by gender and by two age groups, very broadly described as “young” and “old.” Say you wanted to see the average earnings for left- and right-handed people, grouped by gender. You would drag the Average Earnings field into the ­Values area, drag the Handedness field into the Columns area, and drag the Gender field into the Rows area. The pivot table would then show average earnings for right-handed women, for left-handed women, and so forth. However, what if you also wanted to know the average earnings for right-handed old women, left-handed old women, and so forth? (Again, age groups are very broadly defined here for labeling purposes.) In other words, you want to further filter the data by age group. You would drag the Age Group field into the Filter area to create a drop-down filter above the pivot table. Selecting Young or Old from this filter would cause the ­relevant data for the group to appear in the pivot table. In this case, the development director does want to stratify by donor age, so the ages need to be ­aggregated. The youngest donor was born in 1994 and the oldest donor was born in 1930. Donors born between 1985 and 1994 should be labeled “YOUNG.” People born between 1975 and 1984 should be labeled “­SEASONED,” people born between 1965 and 1974 should be labeled “MATURE,” and those born between 1955 and 1964 should be labeled “SENIOR.” Everyone else should be labeled “OLD.” You should add a new column to the data table to record these labels. You need a nested If statement that uses the AND function to generate the labels. (Nested If statements and the AND function are discussed in Tutorial C.) You would enter your formula in the new column’s top data cell. The formula would reference the YOB value in cell F2. The start of the formula is shown in Figure 10-17. =IF(AND(F2>=1985,F2<=1994),”YOUNG”,IF(AND(F2>=1975,F2<=1984),”SEASONED”, … FIGURE 10-17 Setting up the age label formula The formula automatically copies itself down the table column. Formulas take up much more memory than label values. You should copy the contents in the column’s cells, and then paste the copied values into place. Select Paste, Special, and then Values to do this. When done, the top part of your worksheet should look like the one in Figure 10-18. FIGURE 10-18 Top labels in new ERA column Click in the upper-left cell of the table. Select Insert and then select Pivot Table. Choose to put the pivot table in a new worksheet. Drag the Yr2 – Yr1 field into the Values area, drag the New Letter field into the Columns area, and drag the Gender field into the Rows area. In the Values area, choose the Average operator Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. The Donation Letter Analysis instead of the default Sum operator. You can change the pivot table values to Currency format. At this point, your pivot table should look like the one in Figure 10-19. FIGURE 10-19 Pivot table results From this pivot table you can see, for example, that the average donation by women who received the old letter increased by $6. However, the development director would like to take the analysis one level deeper: She wants the data to be stratified by age category. You should drag the ERA field into the Filter area. With YOUNG selected in the filter, the resulting pivot table should look like the one in Figure 10-20. FIGURE 10-20 Pivot table results with ERA filter If you click in the pivot table with the Insert tab active, the Charts group has a Recommended Charts ­ utton. If you click the button, Excel suggests different charts for the current data. The clustered column b chart for the YOUNG data is shown in Figure 10-21. FIGURE 10-21 Clustered column chart of the YOUNG data Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 181 182 Case 10 If you click in the chart area, a plus-sign button appears next to the chart. This button lets you modify the chart. The chart’s title (“Average Increase by Gender”) was added this way. Conceivably, some age groups might be more responsive to the old format. Are there differences in ­giving when age is taken into account? You should use the pivot table’s ERA filter to gather the data needed to answer that question. Enter important data in your Results worksheet. Your instructor may ask you to create other charts from your pivot table data. Also, your instructor may ask you to analyze giving by zip code. ASSIGNMENT 2: DOCUMENTING THE FINDINGS IN A MEMO You have analyzed the data using Access queries, an Excel table, and an Excel pivot table. In this assignment, you must write a memo in Microsoft Word that documents your findings. In your memo, you should address the fundamental questions raised by the new development director: Did the new letter format improve ­charitable giving in the current year? Did the new letter format hurt giving in any way? Did continuing the old letter hurt giving in any way? In your memo, observe the following requirements: • • • • Set up the memo as discussed in Tutorial E. Briefly outline the situation. However, you need not provide much background—you can assume that readers are generally familiar with your task. In the body of the memo, you should answer the questions posed by the development director. Refer to your query, data table, and pivot table output values to support your answers. Include any graphical support that your instructor requires, such as tables, copies of query ­output, pivot tables, or charts. DELIVERABLES Assemble the following deliverables for your instructor: 1. 2. 3. 4. Printed copy of your memo Spreadsheet printouts, if required by your instructor Query printouts, if required by your instructor Electronic media, which should include your Word file, Access file, and Excel file Staple the printouts together with the memo on top. If you have more than one .xlsx file or .accdb file on your electronic media, write your instructor a note that identifies the files for this assignment. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 11 SAN FRANCISCO FIRE INCIDENTS Data Analysis and Research with Microsoft Access and Excel PREVIEW California recently experienced one of the worst and deadliest fire seasons in the state’s history. In November 2018, the town of Paradise endured a blaze that claimed the lives of 86 residents and destroyed 14,000 homes. While the exact cause of this fire has not been determined, a nearby damaged power line has emerged as the likely culprit. Utility companies are generally responsible for maintaining the integrity and safety of their power lines, and constant trimming of vegetation around them is a useful tactic to minimize damage to wires and towers. The utility company PG&E is facing possible bankruptcy, increasing regulatory pressure, and ­possible criminal charges due to its continued inability to stop fires from starting. The city of San Francisco has tasked you with analyzing over 16 years of fire incident data to determine if there are any trends or seasonality factors that can be useful in the city’s fight against fires. You have been provided with a dataset that contains close to 500,000 incident summaries spanning from 2003 to 2019. The data includes a summary of each fire incident to which the San Francisco Fire Department responded. Each incident record includes the call number, incident number, address, number and type of each unit responding, call type (as determined by dispatch), primary situation (field observation), actions taken, and property loss. You can find the original dataset at data.sfgov.org/Public-Safety/Fire-Incidents/ wr8u-xric. PREPARATION • • • • Review database and spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any parts of Tutorials B and C that your instructor assigns, or refer to them as necessary. Review the file-saving procedures for Windows programs in Tutorial C. BACKGROUND You will use your Access and Excel skills to analyze fire incident data gathered over the years and then to identify incident patterns and draw additional conclusions based on your findings. The Access database file is available in the files that come with your casebook. Locate Case 11 in your data files and then select ­FireIncidents.accdb. Using the Database The database contains four tables with incident reports from 2003 through 2019. Figure 11-1 shows the tables in the database file. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 184 Case 11 FIGURE 11-1 Tables in the database Additionally, you have been given a data dictionary with the database. This information will prove ­ eneficial because some of the field names in the database might be cryptic at first. Figure 11-2 shows the top b section of the data dictionary; to see the complete dictionary, locate Case 11 in your data files and then select DataDictionaryFireIncidents.xlsx. FIGURE 11-2 Database data dictionary The first step needed to complete any data analysis project is to inspect your data, which generally involves opening tables, looking through table designs, and running a few quick queries. The purpose of the inspections is to identify the overall health or cleanliness of the data. Are the records complete? What about data types? Are date fields formatted as dates? Is there a unique record identifier? These questions will help you get started. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents ASSIGNMENT 1: USING ACCESS FOR DATA INSPECTION In this assignment, you will inspect the data in the database and answer a few questions along the way. Task 1 How many records are in each of the four tables of the database? Which table has the highest record count? While there are a few ways to answer such questions, you should use queries to create repeatable tasks that can be used to generate reports later. Create a query to count the number of records in each of the four tables. Save the queries as Query 1 through Query 4. Figure 11-3 shows the results of Query 1. FIGURE 11-3 Query 1 results Task 2 Open each table in the database, examine them, and determine if any fields in the tables have blank or null values. Figure 11-4 shows that the Area of Fire column has different values for a null: either a dash or a blank. How will this affect a query? Look in the data dictionary; what does the Area of Fire field represent? FIGURE 11-4 2003-2005 table showing blank values in the Area of Fire column Task 3 Determine whether the Incident Date field is formatted for dates in all four tables. You can do this by opening each table in Design view. Proper field formatting makes subsequent date manipulation much easier. ASSIGNMENT 2: USING ACCESS FOR DATA ANALYSIS Now that you have inspected the data, you are ready to begin your analysis. In this assignment, you will cleanse and organize the data to facilitate your research, and then you will complete a series of queries to further your understanding of the data and shape your research. While the queries are an effective way to summarize large amounts of data and provide results, you will need to leverage Excel to visually represent data and transform it into meaningful information. During your inspection, you should have noticed that the tables are partitioned into time “chunks,” which will prevent you from doing a true longitudinal analysis from 2003 to 2019. Given the data’s current format, you would need to create separate queries for each time period and find an easy way to merge all the data in a manner that makes sense. Fortunately, you can “stack” the tables into a single table and then use it to run your queries. For the stacking to work, the fields in the different tables must be in the same order and have the same names. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 185 186 Case 11 Task 4 Although there are many ways to stack all the data tables into one, the most prudent approach is to do it in a series of steps because it facilitates any necessary troubleshooting. You should start this process by creating a copy of one of the tables—it is always a good idea to create a backup copy of your data prior to making irreversible changes. After making the copy, you should now have five tables in the database, two of which are identical except for the name (see Figure 11-5). FIGURE 11-5 Tables in the database, including a copy Next, you will create an append query to stack the records of the 2006–2010 table into the 2003–2005 table, as shown in Figure 11-6. Save the results as Query 5. FIGURE 11-6 Query 5 configuration When you execute the query, you should see a confirmation box that reports how many records are being appended into the table. Does the number match your count during the data inspection tasks? Figure 11-7 shows the confirmation box. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents FIGURE 11-7 Append confirmation box for Query 5 Next, you should append the other two tables to the 2003–2005 table using queries. Save these queries as Query 6 and Query 7. Check to make sure that the total number of records in the revised 2003–2005 table equals the sum of records in all the other tables. In addition, you should rename the table to more accurately describe its contents—for example, you can name the table Master_Fire_Incidents. Task 5 Next, you will run a series of queries using the Master_Fire_Incidents table to create quick views in Access that answer the following questions: • • • • What five zip codes reported the most incidents? What five cities reported the most incidents? In which five years were the most incidents reported? What five battalions responded to the most incidents? For each question, you should write a query to determine the results; save them as Query 8 through Query 11. As you complete the queries, you might encounter blank, null, or “unknown” values, which are generally the result of incomplete incident reports. These blank and unknown values should be included in the query answers only if they are part of the question. For the questions in this task, do not include blank and unknown values. Figure 11-8 shows the result of Query 8. FIGURE 11-8 Results for Query 8 Task 6 Create a report in Access that displays the results of all four questions. The formatting is up to you, but the results should be neatly displayed and easy for readers to understand. Save the report as Top 5. ASSIGNMENT 3: IMPORTING DATA INTO EXCEL FOR FURTHER ANALYSIS You will complete your analysis in Excel by using charts that allow you to easily spot trends. First, import the Master_Fire_Incidents table into an Excel worksheet. Open a new file in Excel and save it as ­Fire_­Incidents_ Analysis.xlsx. Next, select cell A1. Then click the Data tab, select Get Data, select From ­Database, and select From Microsoft Access Database. Specify the Access file name, and then specify the table to import: Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 187 188 Case 11 Master_Fire_Incidents. You will import the data into a new sheet and label it as Fire_Incidents, as shown in Figure 11-9. FIGURE 11-9 Imported data in Excel While Access is very effective at manipulating large amounts of data, Excel shines at visually ­representing results using a wide array of charting tools. Now that you have imported the data into Excel, you need to answer an additional set of questions using pivot tables and charts. Task 7 Create a series of pivot tables and charts that allow you to determine whether there are any trends or patterns in the data. Create a pivot table to address each of the following points, and name each new tab accordingly. Excel can easily group dates into ranges (such as years and months), but depending on the capabilities of your computer, it may be necessary to add two columns to the end of the worksheet instead of asking Excel to do the grouping by year and month. Use date functions to add Year and Month columns as two new fields. • • • Plot the number of incidents by year and create a meaningful chart to display the results. Exclude 2019 because it is not a complete year. See Figures 11-10 and 11-11 for an example. Plot the number of incidents by month and create a meaningful chart to display the results. Exclude 2019 because it is not a complete year. Plot the total property losses by year and create a meaningful chart to display the results. Format the results appropriately. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents • Select the two years with a similar property loss total and plot each year by month. Are there any other similarities from year to year? Could it be said that there is a seasonality effect? Format the results appropriately. FIGURE 11-10 Pivot table results for incidents reported by year FIGURE 11-11 Column chart that displays incidents reported by year Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 189 190 Case 11 The tables and charts you created display the results in terms of whole numbers; for example, 43,411 incidents were reported in January (all years). Sometimes, however, it is more impactful to display results as a percentage of the overall dataset you are examining. For instance, a statement that 43,411 incidents were reported in January since 2003 is different from saying that 8.95 percent of all incidents reported since 2003 happened in January. Therefore, add a percentage column to the first two pivot tables you created. See Figure 11-12 for an example. The charts will need to be updated to reflect the new metric and plotted on the ­secondary axis for improved readability. FIGURE 11-12 Pivot table and chart results for incidents reported by year and their percentage of the overall incident count ASSIGNMENT 4: DOCUMENTING YOUR FINDINGS IN A MEMO You have created queries, reports, pivot tables, and charts to perform your analysis. You will now complete the case by using your findings to write a summary memo in Microsoft Word that explains your conclusions. Support your analysis with appropriate screenshots or Excel objects from the Excel workbook. (Tutorial C describes how to copy and paste Excel objects.) DELIVERABLES Prepare the following deliverables for your instructor: • • • A printout of the memo Printouts of your worksheets and query designs Electronic media, which should include your Word document, Excel workbook, and Access file Staple the printouts together with the memo on top. If you have more than one Excel workbook file for your case, write your instructor a note that describes the different files. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. CASE 12 SAN FRANCISCO FIRE INCIDENTS: ADVANCED ANALYSIS Data Analysis and Research with Microsoft Access and Excel PREVIEW Data collected by people and systems can become quite large and require massive storage facilities. Large amounts of data can pose many problems for a data analyst who needs to transform it into meaningful information for effective reporting. While a simple pivot table can be a lifesaver when you are working with relatively small amounts of data, it can easily become a burden on the system as the stored data increases in size and requires more processing power to manipulate. The issue becomes particularly important for organizations that rely on the same data to carry out daily operations. For this reason, we distinguish between operational data and analytical data. The split between these two types of data is intended to increase processing efficiency, among other things. Organizations generally separate the two in order to run their businesses and perform analytics without negatively affecting their operations. The analytical data is often set up in a mirror image to the operational data environment and updated as often as required by the organization. These two separate environments allow analysts to complete any type of analysis without creating undue risks to data on the operational side. The trade-off is that the data might not be completely current; generally, the process of updating analytical data takes place outside business hours, typically overnight. There are two distinct advantages to the preceding approach when creating an analytical data environment: • • The organization mitigates the risk of performance degradation to the operational data. This is extremely important for banks and other organizations that leverage large amounts of data for daily operations. The organization can create summarized datasets to expedite analysis and reporting. For ­example, analysts can be provided a list of total sales by department in addition to the complete list of sales. If datasets are large, analysts might need many hours to summarize data of total sales by department on their own. Summarized tables are easy to visualize using charts in Excel. The following sections explain how to make full use of the advantages of an analytical environment. PREPARATION • • • • Review database and spreadsheet concepts discussed in class and in your textbook. Complete any exercises that your instructor assigns. Complete any parts of Tutorials B and C that your instructor assigns, or refer to them as necessary. Review the file-saving procedures for Windows programs in Tutorial C. BACKGROUND The San Francisco Emergency Management Agency has tasked you with creating an analytical data repository that is based on their operational data. (The original dataset is at https://data.sfgov.org/Public-Safety/Fire-­ Incidents/wr8u-xric.) The agency needs to be able to create reports and share data with other agencies without sacrificing operational performance. You will use your Access skills to create an analytical environment Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 192 Case 12 based on fire incident data gathered over the years by the San Francisco Fire Department. The result will be a new database that contains the original data as well as aggregated data and some calculated values. NOTE According to the database design rules set forth in this casebook, a database should not store calculated values. This remains true for most operational databases; however, when dealing with analytical data, some database design rules can be bent. There is no harm in storing a calculated value as a new field if it will not change in the future. For example, the number of hours worked by an employee is generally calculated during the payroll process, and it is unlikely to change after it is calculated, making it a good candidate for permanent storage. Once the analytical database is constructed, you will use your Excel skills to create a dashboard view of meaningful metrics to visualize your findings. The operational Access database file is available in the files that come with your casebook. Locate Case 12 in your data files and then select FireOperations.accdb. Using the Database The database contains four tables. Figure 12-1 shows the tables in the database file. FIGURE 12-1 Tables in the database Additionally, you have been given a data dictionary with the database. This information will prove b ­ eneficial because some of the field names in the database might be cryptic at first. Figure 12-2 shows the table definitions for one table; to see the complete dictionary, locate Case 12 in your data files and then select ­DataDictionaryFireOperations.xlsx. The first step needed to complete any data analysis project is to inspect your data, which generally involves opening tables, looking through table designs, and running a few quick queries. The purpose of the inspections is to identify the overall health or cleanliness of the data. Are the records complete? What about data types? Are date fields formatted as dates? Is there a unique record identifier? These questions will help you get started. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents: Advanced Analysis FIGURE 12-2 Database data dictionary ASSIGNMENT 1: USING ACCESS FOR DATA INSPECTION In this assignment, you will inspect the data in the database and answer a few questions along the way. Task 1 How many records are in each of the four tables of the database? Which table has the highest record count? While there are a few ways to answer such questions, you should use queries to create repeatable tasks that can be used to generate reports later. Create a query to count the number of records in each of the four tables. Save the queries as Query 1 through Query 4. Figure 12-3 shows the results of Query 1. FIGURE 12-3 Query 1 results Task 2 Open each table in the database, examine them, and determine if any fields in the tables have blank or null values. Figure 12-4 shows that the Zipcode and Neighborhood District columns have blank values for some records. How will this affect a query? Look in the data dictionary; what do these two fields represent? Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 193 194 Case 12 FIGURE 12-4 IncidentLocation table showing blank values in the Zipcode and Neighborhood District columns Task 3 Determine whether the Incident Date field is formatted for dates and whether the Incident Number field is formatted the same across all four tables. You can do this by opening each table in Design view. Proper field formatting makes subsequent date manipulation much easier, especially when using the grouping feature in Excel, and it makes joining tables less cumbersome. ASSIGNMENT 2: USING ACCESS TO CREATE THE ANALYTICAL DATABASE Now that you have inspected the data, you are ready to begin the process of creating the analytical database. In this assignment, you will organize the data to facilitate your research and then you will complete a series of queries to aggregate the data, calculate new values, and shape your research. While the queries are an effective way to summarize large amounts of data and provide results, you will need to leverage Excel to visually represent data and transform it into meaningful information. The database is designed to facilitate operations with data partitioned into different segments dedicated to various important aspects of fire incident reporting. In the data’s current format, you would need to create join queries to pull data from various tables. These queries can be burdensome to the system, especially if multiple users are using the data simultaneously. Creating the analytical dataset should mitigate some of these performance concerns and provide data that is already summarized and ready for use without further need to tax the system. Task 4 Although there are many ways to create the analytical database, the most prudent approach is to create a new file and copy the data over to reduce any risk to operational performance. Create a new Access file, save it as FireAnalytics.accdb, and copy over each table to the new file. After moving the tables, you should have four tables in the new database; the analytical and operation databases should be identical except for their names (see Figure 12-5). Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents: Advanced Analysis FIGURE 12-5 Tables in the analytical database Next, you will create the analytical dataset using two queries: one to join the tables together and a s­ econd to add new fields from various calculations. This process can be accomplished in one step; however, it is easier to troubleshoot any problems that develop if the process is broken up into manageable chunks. ­Create a query to join the four tables into a single table, as shown in Figure 12-6, and save the new table as ­FireAnalyticsCombined. Avoid saving duplicate fields when possible. Save the query results as Query 5. FIGURE 12-6 Query 5 configuration When you execute the query, you should see a confirmation box that reports how many records are being added into the new table. Does the number match your count during the data inspection tasks? Figure 12-7 shows the confirmation box. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 195 196 Case 12 FIGURE 12-7 Confirmation box for Query 5 Task 5 Next, you will add a series of calculated values to each record using a query to create a new table. Using the FireAnalyticsCombined table, create a new table that includes the following new fields: • • • • • • Incident Year Incident Quarter Incident Month Incident Day of Week Response Time in Minutes – Difference between the Alarm DtTm (date and time) and Arrival DtTm Response Duration in Minutes – Difference between the Arrival DtTm and Close DtTm Name the new table FireAnalyticsCombEnhanced. Figure 12-8 shows the table objects you should have in the database at this point. Save the results as Query 6. FIGURE 12-8 Table objects through Task 5 ASSIGNMENT 3: IMPORTING DATA INTO EXCEL FOR FURTHER ANALYSIS You will complete your analysis in Excel by using charts that allow you to easily visualize data. First, import the FireAnalyticsCombEnhanced table into an Excel worksheet. Open a new file in Excel and save it as ­FireDashboard.xlsx. Next, select cell A1. Click the Data tab, select Get Data, select From Database, and select From Microsoft Access Database. Specify the Access file name, and then specify the table to import: FireAnalyticsCombEnhanced. You will import the data into a new sheet and label it as FireRawData, as shown at the bottom of Figure 12-9. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents: Advanced Analysis FIGURE 12-9 Imported data in Excel Task 6 Create a time series of charts using pivot tables to leverage each of the new fields you calculated in Access based on incident date. What you include in the charts is up to you, but make sure it’s meaningful information because each chart will be moved to a new worksheet to create a dashboard. Format each chart appropriately so all data is displayed neatly. Save each worksheet according to the field name you are using. Figure 12-10 shows a line chart that illustrates the number of fire incidents per year. FIGURE 12-10 Incidents by Year line chart Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 197 198 Case 12 FIGURE 12-11 Dashboard worksheet Create a new worksheet and name it Dashboard. Move each of the pivot charts you just created into the dashboard and arrange them neatly. Figure 12-11 shows one possible set of charts. Task 7 In Task 6, you created a simple dashboard view. Now it is time to dig deeper by creating a new dashboard with a narrow focus. Create a new dashboard that focuses on response time by year, quarter, month, and day of week using the information in Task 6. Name each new pivot table worksheet appropriately. Once all charts are complete, move them to a new worksheet and save it as ResponseDashboard (see Figure 12-12). ASSIGNMENT 4: DOCUMENTING YOUR FINDINGS IN A MEMO You have created queries, pivot tables, and charts to perform your analysis. You will now complete the case by using your findings to write a summary memo in Microsoft Word that explains your conclusions. Support your analysis with appropriate screenshots or Excel objects from the Excel workbook. Think of the following questions as you complete your analysis: Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. San Francisco Fire Incidents: Advanced Analysis FIGURE 12-12 Response dashboard • • • • • • • What conclusions can you draw from the dashboards? Are there any seasonal patterns that emerge from the charts? Does the day of week affect the response time? How about time of day? Does the time of day play a role in fatalities or injuries? Do certain battalions have better response times than others? If so, why do you think this is true? Are there specific areas that are more prone to fires? How does the response time compare in areas with fewer fires? Is there a correlation between estimated financial loss and incident duration? DELIVERABLES Prepare the following deliverables for your instructor: • • • A printout of the memo Printouts of your worksheets and query designs Electronic media, which should include your Word document, Excel workbook, and Access files Staple the printouts together with the memo on top. If you have more than one Excel workbook file for your case, write your instructor a note that describes the different files. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 199 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. PART 5 ADVANCED SKILLS USING MICROSOFT EXCEL TUTORIAL E Guidance for Excel Cases, 203 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. TUTORIAL E GUIDANCE FOR EXCEL CASES The Microsoft Excel cases in this book require the student to write a memorandum that includes a table. Guidelines for preparing a memo in Microsoft Word and instructions for entering a table in a Word document are provided to begin this tutorial. Also, some of the cases in this book require the use of advanced Excel techniques. Those techniques are explained in this tutorial rather than in the cases themselves: • • • Using data tables Using pivot tables Using built-in functions You can refer to Sheet 1 of Tutorial E_data.xlsx when reading about data tables. Refer to Sheet 2 when reading about pivot tables. PREPARING A MEMORANDUM IN WORD A business memo should include proper headings, such as TO, FROM, DATE, and SUBJECT. If you want to use a Word memo template, follow these steps: 1. 2. 3. 4. In Word, click File. Click New. Enter “memos” in the Search for online templates box, and then click the Start searching button. Click a memo template, such as Memo (elegant) or another memo design of your choice, and then click the Create button to start a new memo document. The first time you do this, you may need to click Download to install the template. You might also have to search for the memo templates. ENTERING A TABLE INTO A WORD DOCUMENT Enter a table into a Word document using the following procedure: 1. 2. 3. 4. 5. Click the cursor where you want the table to appear in the Word document. In the Tables group on the Insert tab, click the Table drop-down menu. Click Insert Table. Choose the number of rows and columns. Click OK. DATA TABLES An Excel data table is a contiguous range of data that has been designated as a table. Once you make this designation, the table gains certain properties that are useful for data analysis. (Note that in some previous versions of Excel, data tables were called data lists.) Suppose you have a list of runners who have completed a race, as shown in Figure E-1. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 204 Tutorial E FIGURE E-1 Data table example To turn the information into a data table, highlight the data range, including headings, and click the Insert tab. Then click Table in the Tables group. The Create Table window appears, as shown in Figure E-2. FIGURE E-2 Create Table window When you click OK, the data range appears as a table. In the Table Style Options group on the Design tab, click the Total Row check box to add a totals row to the data table. You can also select a light style in the Table Styles list to get rid of the contrasting color in the table’s rows. Figure E-3 shows the results. FIGURE E-3 Data table example Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases The headings have acquired drop-down menu tabs, as you can see in Figure E-3. You can sort the data table records by any field. Perhaps you want to sort by times. If so, click the dropdown menu in the TIME (MIN) heading, and then click Sort Smallest to Largest. You get the results shown in Figure E-4. FIGURE E-4 Sorting list by drop-down menu You can see that Peebles had the best time and Doltz had the worst time. You can also sort from Largest to Smallest. In addition, you can sort by more than one criterion. Assume that you want to sort first by gender and then by time (within gender). You first sort by gender from A to Z. Then you again click the Gender dropdown tab, point to Sort by Color, and then click Custom Sort. In the Sort window that appears, click Add Level and choose Time as the next criterion. See Figure E-5. FIGURE E-5 Sorting on multiple criteria NOTE If a modern database contains a gender field, it must account for the fact that some people do not identify as male or female. Therefore, a gender field should have at least three possible entries: (M)ale, (F)emale, and (O)ther. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 205 206 Tutorial E Click OK to get the results shown in Figure E-6. FIGURE E-6 Sorting by gender and time (within gender) You can see that Harris had the best female time and that Peebles had the best male time. Perhaps you want to see the top n listings for some attribute; for example, you may want to see the top five runners’ times. Select the Time column’s drop-down menu, and select Number Filters. From the menu that appears, click Top 10. The Top 10 AutoFilter window appears, as shown in Figure E-7. FIGURE E-7 Top 10 AutoFilter window This window lets you specify the number of values you want. You might see 10 values as a default setting when the window appears. Figure E-7 shows that the user specified five values. Click OK to get the results shown in Figure E-8. FIGURE E-8 Top 5 times Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases The output contains more than five data records because there are ties at 100 minutes. If you want to see all of the records again, click the Time drop-down menu and click Clear Filter From “TIME (MIN).” The full table of data reappears, as shown in Figure E-9. FIGURE E-9 Restoring all data to window Each of the cells in the Total row has a drop-down menu. The menu choices are statistical operations that you can perform on the totals—for example, you can take a sum, take an average, take a minimum or maximum, count the number of records, and so on. Assume that the Time drop-down menu was selected, as shown in Figure E-10. Note that the Sum operator is highlighted by default. FIGURE E-10 Selecting Time drop-down menu in Total row Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 207 208 Tutorial E By changing from Sum to Average, you find that the average time for all runners was 95.5 minutes, as shown in Figure E-11. Average time FIGURE E-11 Average running time shown in Total row PIVOT TABLES Suppose you have data for a company’s sales transactions by month, by salesperson, and by amount for each product type. You would like to display each salesperson’s total sales by type of product sold and by month. You can use a pivot table in Excel to tabulate that summary data. A pivot table is built around one or more dimensions and thus can summarize large amounts of data. Figure E-12 shows total sales cross-tabulated by salesperson and by month. FIGURE E-12 Excel spreadsheet data Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases You can create pivot tables and many other kinds of tables with the Excel PivotTable tool. To create a pivot table from the data in Figure E-12, follow these steps: 1. FIGURE E-13 2. FIGURE E-14 Starting in the spreadsheet in Figure E-12, click a cell in the data range, and then click the Insert tab. In the Tables group, choose PivotTable. You see the window shown in Figure E-13. Creating a pivot table Make sure New Worksheet is checked under “Choose where you want the PivotTable report to be placed.” Click OK. The window shown in Figure E-14 appears. PivotTable design window Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 209 210 Tutorial E 3. The data range’s column headings are shown in the PivotTable Field list on the right side of the window. From there, you can click and drag column headings into the Rows, Columns, and Values panes that appear in the lower-right part of the spreadsheet. If you want to see the January sales by product for each salesperson, drag the Name field to the Columns pane, the Product field to the Rows pane, and the January field to the Values pane. By default, the Sum operation will be shown in the Values pane, which is what you want. You should see the result shown in Figure E-15. Your pivot table should look like the one in Figure E-16. FIGURE E-15 Pivot table fields FIGURE E-16 Pivot table Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases By default, Excel adds all of the sales for each salesperson by month for each product. At the bottom of the pivot table, Excel also shows the total sales for each month for all products. Note the four small panes in the lower-right corner. The Values pane lets you easily change from the default Sum operator to another one (Min, Max, Average, Count, and so on). Click the drop-down arrow, select Value Field Settings, and then select the desired operator. Displaying Pivot Table Results as Percentages It is often helpful to display pivot table results as percentages of a total. For example, Figure E-16 displays total January sales for each salesperson, but seeing these numbers as percentages would provide a better perspective of the sales numbers. To display the values as percentages, right-click any value in your pivot table and select the Show Values As option from the menu, as shown in Figure E-17. From the submenu that appears, select percent of Row Total. FIGURE E-17 Pivot table menu Selecting this option allows easier evaluation of January sales, as shown in Figure E-18. FIGURE E-18 Displaying pivot table results as percentages BUILT-IN FUNCTIONS You might need to use some of the following functions when solving the Excel cases elsewhere in this text: • MIN, MAX, AVERAGE, COUNTIF, COUNTIFS, ROUND, ROUNDUP, RANDBETWEEN, TREND, PMT, NPV, ABS, and INT Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 211 212 Tutorial E The syntax of these functions is discussed in this section. The following examples are based on the runner data shown in Figure E-19. FIGURE E-19 Runner data used to illustrate built-in functions The data is the same as that shown in Figure E-1, except that Figure E-19 includes a column for the runners’ height in inches. MIN and MAX Functions The MIN function determines the smallest value in a range of data. The MAX function returns the largest. Say that we want to know the fastest time for all runners, which would be the minimum time in column G. The MIN function computes the smallest value in a set of values. The set of values could be a data range, or it could be a series of cell addresses separated by commas. The syntax of the MIN function is as follows: • MIN(set of data) To show the minimum time in cell C16 (see Figure E-20), you would enter the formula 5MIN(G2:G14) into the formula bar. FIGURE E-20 MIN function in cell C16 (Assume that you typed the label “MINIMUM TIME:” into cell A16.) You can see that the fastest time is 63 minutes. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases To see the slowest time in cell G16, use the MAX function, whose syntax parallels that of the MIN function, except that the largest value in the set is determined. See Figure E-21. FIGURE E-21 MAX function in cell G16 AVERAGE, ROUND, and ROUNDUP Functions The AVERAGE function computes the average of a set of values. Figure E-22 shows the use of the AVERAGE function in cell C17: FIGURE E-22 AVERAGE function in cell C17 Notice that the value shown is a real number with many digits. What if you wanted to have the value rounded to a certain number of digits? Of course, you could format the output cell, but doing that changes only what is shown in the window. You want the cell’s contents actually to be the rounded number. Therefore, you need to use the ROUND function. Its syntax is: • ROUND(number, number of digits) Figure E-23 shows the rounded average time (with two decimal places) in cell G17. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 213 214 Tutorial E FIGURE E-23 ROUND function used in cell G17 To achieve this output, cell C17 was used as the value to be rounded. Recall from Figure E-22 that cell C17 had the formula 5AVERAGE(G2:G14). The following ROUND formula would produce the same output in cell G17: 5ROUND(AVERAGE(G2:G14),2). In this case, Excel evaluates the formula “inside out.” First, the AVERAGE function is evaluated, yielding the average with many digits. That value is then input to the ROUND function and rounded to two decimal places. The ROUNDUP function works much like the ROUND function. ROUNDUP’s output is always rounded up to the next value. For example, the value 4 would appear in a cell that contained the following formula: 5ROUNDUP(3.12,0). In Figure E-23, if the formula in cell G17 had been 5ROUNDUP(AVERAGE(G2:G14),0), the value 96 would have been the result. In other words, 95.54 rounded up with no decimal places becomes 96. COUNTIF and COUNTIFS Functions The COUNTIF function counts the number of values in a range that meet a specified condition. The syntax is: • COUNTIF(range of data, condition) The condition is a logical expression such as “51”, “>6”, or “5F”. The condition is shown with quotation marks, even if a number is involved. Assume that you want to see the number of female runners in cell C18. Figure E-24 shows the formula used. FIGURE E-24 COUNTIF function used in cell C18 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases The logic of the formula is: Count the number of times that “F” appears in the data range E2:E14. A variation of this function is COUNTIFS. This function applies criteria to cells across multiple ranges and counts the number of times all criteria are met. The syntax is: • COUNTIFS (range of data 1, condition, range of data 2, condition,…) Assume that column H shows the rounded ratio of each runner’s time in minutes to the runner’s height in inches (see Figure E-25). FIGURE E-25 Ratio of height to time in column H Assume that all runners whose ratio is less than 1.5 will get an award. How many female runners qualify for the award? If the gender is “F” and the ratio is less than 1.5, an award is warranted. The COUNTIFS function in cell G18 computes the count of female runners with ratios of less than 1.5, as shown in Figure E-26. FIGURE E-26 COUNTIFS function used in cell G18 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 215 216 Tutorial E RANDBETWEEN Function If you wanted a cell to contain a randomly generated integer in the range from 1 to 9, you would use the formula 5RANDBETWEEN(1,9). Any value between 1 and 9 inclusive would be output by the formula. An example is shown in Figure E-27. FIGURE E-27 RANDBETWEEN function used in cell A2 Assume that you copied and pasted the formula to generate a column of 100 numbers between 1 and 9. Every time a value was changed in the spreadsheet, Excel would recalculate the 100 RANDBETWEEN formulas to change the 100 random values. Therefore, you might want to settle on the random values once they are generated. To do this, copy the 100 values, click Paste Special, and then click Values to put the values in the same range. The contents of the cells will change from formulas to literal values. TREND Function The TREND function can be used to estimate a variable’s value based on the values of other variables. For example, you might know the heights, genders, and weights for 20 people. Correlations exist among these three characteristics. You also have height and gender data for 10 other people, and you want to estimate their weights based on the data you have. The data is shown in Figure E-28. FIGURE E-28 Data for people’s heights, genders, and weights The TREND function requires numerical values. In the data, the code for a male is 1, the code for a female is 2, and the code for others is 3. Height values are measured in inches and weight values are in pounds. For example, person 101 is a male who is 5 feet, 10 inches tall and weighs 190 pounds. You can use the TREND function to examine a set of data and “learn” the relationship between two or more variables. In this example, the TREND function learns how the heights and genders of 20 people correlate to their weights. Then, given 10 other people’s heights and genders, the TREND function applies what it knows to estimate their weights. The syntax for the TREND function is: • 5TREND(known Ys, known Xs, new Xs) Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Guidance for Excel Cases In the example, the known Ys are the known weights for 20 people, the known Xs are the related heights and genders, and the new Xs are heights and genders of 10 people for whom you want estimated weights. The formula is shown in Figure E-29. • 5TREND($D$2:$D$21, $B$2:$C$21, G2:H2) Cells D2 to D21 hold the known weights for 20 people (see Figure E-28 again). Cells B2 to C21 hold the values of the two predictor variables (height and gender) for those 20 people. Cells G2 and H2 are the predictor variables for person 130, for whom you want a predicted weight. The predicted weight formula is in cell I2. FIGURE E-29 Calculation of predicted weight for person 130 When you copy the formula down the cells in column I for the 10 people, you calculate weight predictions for all of them. By using absolute addressing, the only address changes are the predictor height and gender values for the 10 people. PMT Function The PMT function calculates a loan payment. The syntax is: • 5PMT(interest rate, number of periods, initial loan principal) As an example, assume that you have a 6 percent, 30-year loan for $100,000. The calculation of the monthly payment is shown in Figure E-30. FIGURE E-30 Calculation of monthly loan payment The formula is in cell B5. The monthly interest rate is the annual rate in cell B1 divided by 12. The number of months covered by the loan is the number of years (see cell B2) multiplied by 12. The loan principal is in cell B3. The PMT function returns a negative number, so the expression is multiplied by 21. Loan payments for the year are computed by multiplying the monthly payment by 12. NPV Function The NPV function calculates the net present value of an investment by using a discount rate and a series of future payments (negative values) and income (positive values). The syntax is: • NPV(rate, value1, [value2],…) The function’s arguments are as follows: • Rate—This required argument is the rate of discount for one period. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 217 218 Tutorial E • value1, value2,…—value1 is required and subsequent values are optional. You can enter up to 254 arguments that represent the payments and income. The value1, value2,… sequence must be equally spaced in time and occur at the end of each period. The NPV function uses the order of value1, value2,… to interpret the order of cash flows. Be sure to enter your payment and income values in the correct sequence. For example, suppose you want to calculate the net present value of a $100,000 investment at a discount rate of 10 percent after four years. You anticipate returns from each year and use the NPV function to calculate the result, as shown in cell A8 in Figure E-31. FIGURE E-31 NPV function used in cell A8 ABS Function The ABS function returns the absolute value of a number. The absolute value of a number is the number without the sign. The syntax is: • ABS(number) Figure E-32 shows the results of using the ABS function on different numbers. FIGURE E-32 Using the ABS function INT Function The INT function returns a number rounded down to the nearest integer. The syntax is: • INT(number) In Figure E-33, the value in cell A3 divided by the value in cell B3 would be the real number 6.4285. The figure shows that using the INT function on the quotient returns the integer 6. FIGURE E-33 Using the INT function Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. INDEX Note: Page numbers in boldface indicate key terms Special Characters ( ) (parentheses), 20, 29 = (equal sign), 107 [ ] (square brackets), 18, 20, 31 A ABS function, 218 Access, 13–85. See also database(s); database design; form(s); queries; reports; tables case example, 53–58, 59–66, 67–72, 73–78, 79–85 creating analytical database, 194–196 creating queries, 17–33 creating reports, 37–42 creating tables, 13–17 data analysis, 185–187 data inspection, 185, 193–194 decision support. See decision support, Microsoft Access and Excel forming relationships, 48–49 importing data, 42–45 integrating with Excel. See decision support, Microsoft Access and Excel making forms, 45–47 troubleshooting common problems, 49–51 AND function, IF statements with, 106–107 Answer Report window for extension case, 143 remainder of, 142 sheet tab, 141 top portion of, 141 append queries, 4 attributes, 4 as database design concept, 5 AVERAGE function, 213–214 Average operation, 22 B bank borrowing, 107–111 repayment, 110–111 borders, cells, 105 borrowing, cash flow calculations, 107–111 built-in functions, 211–218 C calculated fields, 10, 17 avoiding errors, 19–20 queries using, 17–19 troubleshooting, 49–50 calculations cash flow, 107–111 time, in queries, 28–29 troubleshooting, 49–50 Calculations section, spreadsheets case example, 116–117, 125–126, 153–155, 166–167 decision support using basic Excel, 116–117, 125–126 practice exercise, 91 Scenario Manager, 103 cardinality, 5 cell(s) borders, 105 Calculations section, 93 changing, 98 copy, 93 formatting, 105–106 objective, 138 showing formulas, 106 cell formulas in Calculations section, 135 in Income Statement section, 136 printing in Excel, 149 cell values in Calculations section, 136 in Income Statement section, 137 Changing Cells section case examples, 165–166 decision support using basic Excel Solver, 134, 144 Changing Variable Cells, 138–139 circular references, 106 Clipboard, copying summary sheet data to, 101 column(s), 3. See also fields compound primary key, 3 Constants section, spreadsheets case example, 114–115, 123–124, 152–153, 166 decision support using basic Excel, 114–115, 123–124 decision support using basic Excel Solver, 134–135, 135–136, 145–146 practice exercise, 90 Scenario Manager, 102 constraints case examples, 167–168 expressions, 137 restarting Solver with all new constraints, 148 running Excel Solver, 139–140 settings to single amount, 147 spreadsheet skeleton using Excel Solver, 137–138 copy cell contents, 93 copying summary sheet data to Clipboard, 101 copy operation, 93 COUNTIF function, 214–215 COUNTIFS function, 214–215 Count operation, 22 Currency data type, 3 D data copying to Clipboard, 101 importing into Access, 42–45 importing into Excel, 187–190, 196–198 lists, 203 redundancy, 10 tables, 203–208 types, 3 data analysis and research, Microsoft Access and Excel, 183–190, 191–199 creating analytical database, 194–196 data analysis, 185–187 data inspection, 185, 193–194 documenting findings, 190 importing data into Excel, 187–190 using database, 183–184, 192–193 database(s), 3. See also Access Access queries, 175–177 saving, 49 troubleshooting common problems, 49–51 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 220 Index database design, 3–12 case example, 53, 60, 68, 74, 81 concepts, 4–5 practice problem, 11–12 rules, 5–11 terminology, 3–4 data entry errors, tables, 50 data gathering spreadsheets, 119, 129 using pivot tables, 180–182 Date() function, 27–28 Date/Time data type, 3 Debt Owed section, 109, 119, 128 decimals, 50 decision support, Microsoft Access and Excel, 173–182 case example, 175–182 database queries, 175–177 documenting findings in memo, 190, 198–199 decision support systems (DSSs), 89 decision support systems (DSSs), Excel Scenario Manager, 89–129 case example, 113–120, 121–129 spreadsheet model construction, 91–97 spreadsheet organization, 90–91 summary sheets, 100–101 decision support systems (DSSs), Excel Solver, 133–169 case example, 151–162, 163–169 running Excel Solver, 138–142 setting up spreadsheet skeleton, 134–138, 144–146 Delete queries, 4, 29–32 practice creating, 57 Delete Sheet Rows, 100 deleting Scenario Manager summary sheets, 101 documenting findings/recommendations case example, 119–120, 129 decision support, Excel Solver, 169 memos, 169, 182, 190, 198–199 Double data type, 3 DSSs. See decision support systems (DSSs); Scenario Manager E Edit Scenario dialog box, 97 Employee table, 14, 16 entities, 4 as database design concept, 4 relationships. See relationships equal sign (=), 107 errors calculated fields, 19–20 data entry, 50 spelling, 49 Excel ABS function, 218 AVERAGE function, 213–214 basics, 105–111 built-in functions, 211–218 cash flow calculations, 107–111 cell borders, 105 cell formatting, 105–106 cell formulas, 106 COUNTIF function, 214–215 COUNTIFS function, 214–215 data tables, 203–208 decision support. See decision support, Microsoft Access and Excel; decision support systems (DSSs), Excel Scenario Manager; decision support systems (DSSs), Excel Solver Format Painter, 106 formatting cells, 105–106 IF statements, 106–107 importing data into, 187–190, 196–198 importing data into Access, 42–45 importing summary data, 177 integrating with Access. See decision support, Microsoft Access and Excel INT function, 218 MAX function, 212–213 MIN function, 212–213 NPV function, 217–218 pivot tables. See pivot tables PMT function, 217 RANDBETWEEN function, 216 ROUND function, 213–214 ROUNDUP function, 213–214 Scenario Manager. See decision support systems (DSSs); Scenario Manager showing formulas in cells, 106 TREND function, 216–217 Excel Scenario Manager. See Scenario Manager exiting, troubleshooting Excel Solver, 149–150 F fields, 3 attributes, 5–10 calculated. See calculated fields duplicate values, 49 grouping, printing, 51 linking between tables, 49 moving in Layout view, 41–42 names, 15, 20 redundant, avoiding, 10 widening, 22 foreign keys, 3 form(s), 3 case example, 55–56, 61–62, 69, 75–76, 82 making, 45–47 subforms, 45–47 formatting cells, 105–106 formulas circular references, 106 showing in cells, 106 spreadsheets, filling in, 92–97 functions ABS, 218 AND, IF statements with, 106–107 AVERAGE, 213–214 built-in, 211–218 COUNTIF, 214–215 COUNTIFS, 214–215 Date(), 27–28 INT, 218 MAX, 212–213 MIN, 212–213 NPV, 217–218 OR, IF statements with, 106–107 PMT, 217 RANDBETWEEN, 216 ROUND, 213–214 ROUNDUP, 213–214 TREND, 216–217 G gathering data for case example, 119, 129, 169, 178–182 using data tables, 178–179 using pivot tables, 180–182 using spreadsheets, 119, 129, 169 grouped reports, creating, 37–41 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Index H Hours Worked table, 14–15 N names, fields, 15, 20 nesting IF statements, 107 NPV function, 217–218 I IF statements AND function with, 106–107 nesting, 107 OR function with, 106–107 importing data into Access, 42–45 data into Excel, 187–190, 196–198 Income and Cash Flow Statements section, spreadsheets case example, 117–118, 126 practice exercise, 91 Scenario Manager, 103–104 Income Statement section, spreadsheets case example, 155–156, 167 decision support using basic Excel Solver, 136–137, 146 Inputs section, spreadsheets case example, 115, 124 practice exercise, 90–91 Scenario Manager, 102 Integer data type, 3 integrating Access with Excel. See decision support, ­Microsoft Access and Excel INT function, 218 Int operator, 148 J joins, 3 K Key Results section, spreadsheets case example, 116, 125 Scenario Manager, 103 L Layout view, moving fields, 41–42 linking fields between tables, 49 loan payments, 107 M many-to-many relationships, 5 MAX function, 212–213 memo(s) case example, 120, 129 documenting findings/recommendation, 169, 182, 190, 198–199 preparing in Word, 203 Microsoft Access. See Access; database(s); database design; decision support, Microsoft Access and Excel; form(s); ­queries; reports; tables Microsoft Excel. See decision support, Microsoft Access and Excel; decision support systems (DSSs), Excel Scenario Manager; decision support systems (DSSs), Excel Solver; Excel; Scenario Manager Microsoft Word. See Word MIN function, 212–213 Min operation, 22 moving fields in Layout view, 41–42 O object(s), 3, 4. See also form(s); queries; reports; tables objective cells, 138 one-to-many relationships, 5 one-to-one relationships, 5 oral presentation, case example, 162 OR function, IF statements with, 106–107 P Parameter queries, 32, 32–33 practice creating, 57 parentheses (), 20, 29 pivot tables creating, 208–211 displaying as percentages, 211 gathering data, 180–182 PMT function, 217 primary key, 3 compound, 3 defining, 44, 45 troubleshooting, 49 printing cell formulas in Excel, 149 fitting output to page, 50 grouping fields, 51 troubleshooting Excel Solver, 149–150 pseudo-headings, 24 Q QBE (query by example) join operations, 20 Parameter queries, 33 practice queries, 33–37 Totals queries, 22, 22–27 Update queries, 31 queries, 3 append, 4 calculated fields, 17–20 case example, 56–57, 62–64, 69–71, 76–77, 83–84 creating, 17–33 database, 175–177 Date() function, 27–28 Delete, 4, 29–32, 57 excess number of tables, 49 Parameter, 32, 32–33, 57 practice creating, 33–37 Select, 4, 29 time arithmetic, 28–29 Totals, 22, 22–27, 57 Update, 4, 29–32 query by example. See QBE (query by example) R RANDBETWEEN function, 216 records, 3 adding to tables, 15–17 duplicate, 49 excess number, 49 insufficient, 49 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 221 222 Index redundancy, avoiding data, 10 relationships, 4 cardinality, 5 as database design concept, 5 repayments, cash flow calculations, 107–111 reports, 4 case example, 58, 64–65, 72, 77–78, 84–85 creating, 37–42 grouped, creating, 37–41 moving fields in Layout view, 41–42 rerunning Scenario Manager, 101 rerunning Solver model, 147 ROUND function, 213–214 ROUNDUP function, 213–214 row(s), 3. See also records running Excel Solver, 138–142 case examples, 156–158, 161, 168 case extension of, 142–144 computing Solver’s answer, 140–142 entering constraints, 139–140 selecting solving method, 140 setting Changing Variable Cells, 138–139 setting objective cell, 138 Income and Cash Flow Statements, 91, 103–104, 117–118, 126 Inputs, 90–91, 102, 115, 124 Summary of Key Results, 91, 103, 116, 125 spreadsheet skeleton construction, 91–92 spreadsheet skeleton using Excel Solver Calculations section, 135–136, 145–146 Changing Cells section, 134, 144 Constants section, 134–135, 145 constraints, 137–138 Income Statement section, 136–137, 146 setting up, 134–138, 144–146 square brackets ([]), 18, 20, 31 StDev operation, 22 subforms, 45–47 Summary of Key Results section, spreadsheets case example, 116, 125 practice exercise, 91 Scenario Manager, 103 summary sheets, Scenario Manager, 100–101 charting results, 101 copying data to Clipboard, 101 deleting, 101 Sum operation, 22 S saving files, databases, 49 troubleshooting Excel Solver, 149–150 Scenario Manager, 97–101. See also decision support systems (DSSs) analysis, 104–105 deleting summary sheets, 101 practice with, 101–105 rerunning, 101 summary sheets, 100–101 using, 97–101 Scenario Manager window, 97, 99 Scenario Summary window, 99 Scenario Values window, 98 Select queries, 4, 29 case example, 56 Solver Parameters window, 138, 140 Solver Results window, 140, 141 for extension case, 143 spelling errors, field names, 49 spreadsheet(s) basics, 89–97 case example, 114–119, 123–128 cells. See cell(s) creating for decision support, 114–119, 123–128 entering “easy” formulas, 92–94 entering “hard” formulas, 94–97 gathering data using, 119, 129, 169 importing into Access, 42–45 Income and Cash Flow Statements section, 91 Inputs section, 90–91 model construction, 91–97 organization, 90–91 sections. See spreadsheet sections (by name) skeleton or shell, 91–92 Summary of Key Results section, 91 using decision support, 119–120, 128–129 spreadsheet sections (by name) Calculations, 91, 103, 116–117, 125–126 case example, 114–119, 123–128 Constants, 90, 102, 114–115, 123–124 T tables, 3. See also pivot tables adding records, 15–17 case example, 54–55, 61, 69, 75, 82 creating, 13–17 data entry errors, 50 defining, 13–15 entering into Word documents, 203 excess number, 49 failure to link, 49 join operations, 3, 20–22 tables (by name) Employee table, 14, 16 Hours Worked table, 14–15 Wage Data table, 14, 16 Text data type, 3 time calculations in queries, 28–29 Totals queries, 22, 22–27 practice creating, 57 statistical operation, 23 troubleshooting, 51 TREND function, 216–217 troubleshooting Access, 49–51 troubleshooting Excel Solver adding Solver to Excel Ribbon, 146–147 creating overconstrained models, 147 deleting extra Answer Sheets, 148 integer changing cells, 148 printing cell formulas in Excel, 149 rerunning Solver model, 147 restarting Solver with all new constraints, 148 reviewing printing, saving, and exiting procedures, 149–150 setting constraint to single amount, 147 using Solver Options window, 148–149 U Update queries, 4, 29–32 troubleshooting, 51 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Index V Var operation, 22 Word entering tables into Word documents, 203 preparing memos, 203 workbook for decision support, 162 W Wage Data table, 14, 16 Where operation, 22 widening fields, 22 Y Yes/No data type, 3 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 223 Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.