0% found this document useful (0 votes)
425 views

excel_text

Uploaded by

Miguel Martínez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
425 views

excel_text

Uploaded by

Miguel Martínez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 555

EXCEL

For Lifelong Learning


george self

December 2020 – Edition 2


George Self: Excel, For Lifelong Learning, December 2020

This work is licensed under a Creative


Commons “Attribution 4.0 International”
license.
FOREWORD

Microsoft Excel is a spreadsheet program developed by Microsoft for


Windows, MacOS, Android, and iOS and is part of the Office suite
of software. It features calculation, graphing tools, pivot tables, and a
macro programming language called Visual Basic for Applications. Ex-
cel is used widely for many financially-related activities from simple
quarterly forecasts to full corporate annual reports. Excel is also used
for common information organization like contact lists and inventory
tracking. Finally, Excel helps researchers perform statistical analysis
tasks like variance analysis, chi-square testing, and charting complex
data.
I’ve used Excel for both business and personal use for more than 20
years. For the Cochise College Center for Lifelong Learning class, I started
with an “open source” book since it is available free of charge and I
could modify it to meet the objectives of this class.

Beginning Excel by Noreen Brown, Barbara Lave, Julie Romey,


Mary Schatz, Diane Shingledecker. I found it at Open Ore-
gon Educational Resources, https://ecampusontario.pressbo
oks.pub/beginningexcel/

I deeply appreciate the original authors’ work and their decision to


publish their book under the Creative Commons so I could modify it
for my class. The original book has six chapters, but to better fit my
class I added three chapters with advanced skills and then reformat-
ted the entire work into my own voice.
This book includes information for both Excel 2016 and Excel 365.
These two products are identical for the most part; however, when
there is a difference in functionality that will be identified with one
of two symbols.

• Excel 2016 This is something that is only found in Excel 2016.

• Excel 365 This is something that is only found in Excel 365.

Throughout the book you will find references that look like this:
Click Home ⇒ Cells ⇒ Clear. This means to look on the Home tab,
the Cells group of commands, and click the Clear button.
The book includes both background information and activity steps
to complete. Activity steps are printed with a distinctive background
color, as illustrated below.

iii
1. This is step one.

2. This is step two.

3. This is step three.

While this book is useful in its current form, I will continually up-
date it based on my students’ experiences and my own research. It
is my hope that students can use this book to learn about Excel and
other instructors can adapt it for their own classes.

— George Self

iv
BRIEF CONTENTS

i basic excel 1
1 fundamental skills 3
2 mathematical computations 75
3 formulas 141

ii intermediate excel 185


4 presenting data with charts 187
5 tables 261
6 multiple sheets 303

iii advanced excel 335


7 working with data 337
8 forecasting 383
9 advanced topics 439

iv appendix 509
a function quick reference 511
b dynamic arrays 531

v
CONTENTS

i basic excel 1
1 fundamental skills 3
1.1 Overview of Microsoft Excel 3
1.1.1 Making Decisions With Excel 3
1.1.2 Starting Excel 4
1.1.3 The Excel Workbook 5
1.1.4 Navigating Worksheets 6
1.1.5 The Excel Ribbon 8
1.1.6 Quick Access Toolbar and Right-Click Menu 10
1.1.7 The File Tab 11
1.1.8 Saving Workbooks (Save As) 13
1.1.9 The Status Bar 14
1.1.10 Excel Help 15
1.2 Entering, Editing, and Managing Data 17
1.2.1 Entering Data 17
1.2.2 Editing Data 20
1.2.3 Auto Fill 21
1.2.4 Deleting Data and the Undo Command 25
1.2.5 Adjusting Columns and Rows 28
1.2.6 Hiding Columns and Rows 32
1.2.7 Inserting Columns and Rows 35
1.2.8 Moving Data 38
1.2.9 Deleting Columns and Rows 39
1.3 Formatting and Data Analysis 41
1.3.1 Formatting Data and Cells 42
1.3.2 Data Alignment (Wrap Text, Merge Cells, and
Center) 49
1.3.3 Entering Multiple Lines of Text 52
1.3.4 Borders (Adding Lines to a Worksheet) 53
1.3.5 Autosum 56
1.3.6 Moving, Renaming, Inserting, and Deleting Work-
sheets 59
1.4 Printing 62
1.4.1 Page Setup 62
1.4.2 Headers and Footers 65
1.4.3 Printing Worksheets and Workbooks 67
1.5 Chapter Practice 68
1.5.1 Basic Monthly Budget for a Medical Office 68
1.6 Scored Assessment 71
1.6.1 Sales and Inventory Items 71
2 mathematical computations 75
2.1 Formulas 75

vii
viii contents

2.1.1 Creating a Basic Formula 76


2.1.2 Relative References (Copying and Pasting For-
mulas) 80
2.1.3 Creating Complex Formulas (Controlling the Or-
der of Operations) 81
2.1.4 Auditing Formulas 84
2.2 Statistical Functions 89
2.2.1 The Sum Function 90
2.2.2 Absolute References (Calculating Percent of To-
tals) 93
2.2.3 The Count Function 96
2.2.4 The Average Function 98
2.2.5 The Max and Min Functions 101
2.2.6 Copy and Paste Formulas (Pasting Without For-
mats) 103
2.2.7 Sorting Data (Multiple Levels) 104
2.3 Functions for Personal Finance 108
2.3.1 The Fundamentals of Loans and Leases 109
2.3.2 The Pmt (Payment) Function for Loans 111
2.3.3 The Pmt (Payment) Function for Leases 116
2.3.4 Linking Worksheets (Creating a Summary Work-
sheet) 120
2.4 Preparing to Print 126
2.4.1 Formatting the Worksheet 127
2.4.2 Using Page Setup Options 129
2.4.3 Creating a Footer Using Page Setup 130
2.5 Chapter Practice 132
2.5.1 Financial Plan for a Lawn Care Business 132
2.6 Scored Assessment 138
2.6.1 Hotel Occupancy and Expenses 138
3 formulas 141
3.1 More on Formulas and Functions 142
3.1.1 Another Use for =MAX 142
3.1.2 Quick Analysis Tool 144
3.1.3 Percentage Calculation 145
3.2 Logical and Lookup Functions 148
3.2.1 If Function 149
3.2.2 Vlookup Function 151
3.2.3 Error Messages 155
3.2.4 Date Functions 155
3.3 Conditional Formatting 158
3.3.1 Initiating Conditional Formatting 158
3.3.2 Modifying Conditional Formatting 163
3.3.3 Setting the Print Area 165
3.4 Preparing to Print 166
3.4.1 Reviewing Formatting for Consistency 166
contents ix

3.4.2 Reviewing Formatting for Inconsistencies 167


3.4.3 Fine-Tuning Formatting 168
3.4.4 Repeating Column (And Row) Labels 169
3.4.5 Inserting Page Breaks 171
3.4.6 Creating a Header and Footer Using Page Lay-
out View 174
3.5 Chapter Practice 176
3.5.1 Household Budget 176
3.6 Scored Assessment 181
3.6.1 Astrocoffee Company 181

ii intermediate excel 185


4 presenting data with charts 187
4.1 Choosing a Chart Type 187
4.1.1 Time Series Trend: Line Chart 1 188
4.1.2 Trend Comparisons: Line Chart 2 195
4.1.3 “Instant” Chart – F11 199
4.1.4 Frequency Distribution: Column Chart 1 200
4.1.5 Creating a Chart Sheet 202
4.1.6 Frequency Comparison: Column Chart 2 204
4.1.7 Percent of Total: Pie Chart 208
4.1.8 Percent of Total: Stacked Column Chart 211
4.2 Formatting Charts 215
4.2.1 Axis Formats 215
4.2.2 Chart Legend and Title Formats 219
4.2.3 X Axis and Y Axis Titles 222
4.2.4 Data Series Labels and Formats 224
4.2.5 Adding Series Lines and Annotations to a Chart 227
4.2.6 Add Additional Information to the Chart. 231
4.3 Using Charts with Microsoft Word and Microsoft Pow-
erPoint 236
4.3.1 Pasting a Chart Image Into Word 236
4.3.2 Pasting a Linked Chart Image into PowerPoint 239
4.4 Preparing to Print 245
4.4.1 Previewing Chart Sheets for Printing 246
4.4.2 Printing Worksheets with Data and Charts 246
4.4.3 Preview Remaining Worksheets for Printing 250
4.4.4 Printing a Chart Only 251
4.4.5 Hiding a Worksheet 251
4.5 Chapter Practice 252
4.5.1 Charting Historical Data (Comprehensive Re-
view) 252
4.6 Scored Assessment 256
4.6.1 Charting Social Justice Data (Comprehensive Re-
view) 256
5 tables 261
x contents

5.1 Basic Table Skills 261


5.1.1 Creating a Table 262
5.1.2 Formatting Tables 265
5.1.3 Adding Data to Tables 267
5.1.4 Finding and Editing Data 268
5.1.5 Freeze Rows and Columns 269
5.1.6 Simple Sort 270
5.1.7 Multi-Level Sort 272
5.1.8 Custom Sorts 274
5.2 Advanced Table Skills 277
5.2.1 Filtering Data 277
5.2.2 Filtering Using the Slicer 281
5.2.3 Total Rows 283
5.2.4 Subtotaling 286
5.3 Preparing to Print 290
5.3.1 Previewing a Worksheet 290
5.3.2 Inserting an Image to Enhance a Worksheet 292
5.3.3 Previewing the Remaining Worksheets 294
5.4 Chapter Practice 295
5.4.1 Tables for a Tourism Company 295
5.5 Scored Assessment 298
5.5.1 Tables for a Retail Company 298
6 multiple sheets 303
6.1 Multiple Worksheet Basics 303
6.1.1 Navigating Through File with Multiple Work-
sheets 304
6.1.2 Copying a Worksheet 305
6.1.3 Moving and Deleting Worksheets 307
6.1.4 Grouping and Ungrouping Worksheets 308
6.2 Formulas With 3-D References 311
6.2.1 Create the Expenses Summary Worksheet 312
6.3 Templates 316
6.3.1 Predefined Templates 317
6.3.2 Custom Templates 318
6.4 Preparing to Print 324
6.4.1 Applying Page Setup Options to Grouped Work-
sheets 324
6.5 Chapter Practice 326
6.5.1 A Multiple Worksheet Template for a Sports Team 326
6.6 Scored Assessment 331
6.6.1 A Multiple Worksheet Template for National Parks
Data 331

iii advanced excel 335


7 working with data 337
7.1 Safeguarding 337
contents xi

7.1.1 Data Validation 337


7.1.2 Worksheet Protection 344
7.2 Importing Data 346
7.2.1 Import from the Web 346
7.2.2 Transforming Data 349
7.2.3 Import from Data File 352
7.3 Pivot Tables 355
7.3.1 Introduction to Pivot Tables 356
7.3.2 Using Calendar Data in a Pivot Table 363
7.4 Recommended Pivot Tables 366
7.5 Pivot Charts 368
7.6 Preparing to Print 372
7.7 Chapter Practice 374
7.7.1 Project Team Analysis 374
7.8 Scored Assessment 377
7.8.1 Employee Analysis 377
8 forecasting 383
8.1 Advanced Charts 383
8.1.1 Sparklines 383
8.1.2 Trend Lines 387
8.1.3 Forecast Worksheet 389
8.1.4 3D Maps 393
8.2 What-If Analysis 407
8.2.1 Data Tables 407
8.2.2 Scenarios 413
8.2.3 Goal Seeking 420
8.2.4 Solver 423
8.3 Chapter Practice 428
8.3.1 Electoral College Votes 428
8.4 Scored Assessment 431
8.4.1 Product Mix 431
8.5 Addendum: Filled Map 436
9 advanced topics 439
9.1 Database Functions 439
9.1.1 Create a Data Table 439
9.1.2 The Database Functions 441
9.2 Useful Functions 447
9.2.1 Text Functions 447
9.2.2 Number Functions 460
9.3 Statistics 473
9.3.1 Activating the Analysis Toolpak 473
9.3.2 Working With Simple Statistics 475
9.4 Macros 481
9.5 Excel Preferences 483
9.5.1 General 485
9.5.2 Formulas 485
xii contents

9.5.3 Proofing 485


9.5.4 Save 485
9.5.5 Language 486
9.5.6 Ease of Access 486
9.5.7 Advanced 486
9.5.8 Customize Ribbon 486
9.5.9 Quick Access Toolbar 487
9.5.10 Add-ins 487
9.5.11 Trust Center 488
9.6 Just For Fun 488
9.6.1 Interesting Bug 488
9.6.2 Renaming Genes 488
9.6.3 Art with Excel 489
9.6.4 Excel and Sudoku 489
9.7 Chapter Practice 489
9.7.1 Cars Analysis 489
9.8 Scored Assessment 499
9.8.1 Weather Analysis 499

iv appendix 509
a function quick reference 511
a.1 AND 511
a.2 AVERAGE 511
a.3 CONCATENATE 512
a.4 COUNT 513
a.5 COUNTIF 514
a.6 COUNTIFS 514
a.7 DATE 515
a.8 DATEDIF 515
a.9 IF 516
a.10 INDEX 517
a.11 LEFT 518
a.12 LOWER 518
a.13 MATCH 519
a.14 MAX 520
a.15 MID 520
a.16 MIN 521
a.17 NOW 521
a.18 NOT 522
a.19 OR 522
a.20 PMT 523
a.21 PROPER 524
a.22 RANDBETWEEN 524
a.23 RIGHT 525
a.24 ROUND 525
a.25 SEARCH 526
a.26 SUM 526
contents xiii

a.27 SUMIF 527


a.28 SUMIFS 528
a.29 TODAY 529
a.30 TRIM 529
a.31 UPPER 529
a.32 VLOOKUP 530
b dynamic arrays 531
b.1 Definition 531
b.2 Functions 531
b.2.1 Sort() 531
b.2.2 Sortby() 534
b.2.3 Unique() 535
b.2.4 Nesting Functions 536
b.2.5 Filter() 536
b.2.6 Referencing A Dynamic Array 537
b.2.7 Xlookup() 537
b.2.8 XMatch() 538
b.2.9 Randarray() 539
b.2.10 Sequence() 540
Part I

BASIC EXCEL

This part is a basic introduction to Excel and is designed


for students who have little or no Excel experience. It
starts with creating new workbooks and then covers en-
tering, editing, and managing worksheets, including se-
lecting cells, entering data, and using the Excel Ribbon.
This part also covers creating and using mathematical for-
mulas and adding Excel functions to worksheets. Students
who complete this part will have an excellent grounding
in Excel that they can use in their work, but they will also
be prepared for more advanced topics.
F U N D A M E N TA L S K I L L S
1
Microsoft® Excel® is a tool that can be used in virtually all careers and
is valuable in both professional and personal settings. Applications as
diverse as keeping track of medications in inventory for a hospital or
creating a financial plan for retirement can be done efficiently and
accurately with Excel. This chapter introduces the fundamental skills
necessary start with Excel. Most people find that learning only a few
skills makes them very productive in a short period of time.

1.1 overview of microsoft excel

Learning Objectives

• Examine the value of using Excel to make decisions.


• Learn how to start Excel.
• Become familiar with the Excel workbook.
• Understand how to navigate worksheets.
• Examine the Excel Ribbon.
• Examine the right-click menu options.
• Learn how to save workbooks.
• Examine the Status Bar.
• Become familiar with the features in the Excel Help
window.

Microsoft® Office® contains a variety of tools that help people ac-


complish many personal and professional objectives, but Excel is per-
haps the most versatile and widely used of all the Office applications.
Most career paths need to use Excel from time-to-time to accomplish
professional objectives, often daily. This chapter provides an overview
of the Excel application along with an orientation for accessing the
commands and features of an Excel workbook.

1.1.1 Making Decisions With Excel

Taking a simple view, Excel is a tool for entering quantitative data


into an electronic spreadsheet to apply one or several mathematical
computations. These computations ultimately convert that quantita-
tive data into information. The information produced in Excel can be
used to make decisions in both professional and personal contexts.
For example, employees can use Excel to determine how much inven-
tory to buy for a clothing retailer, how much medication to adminis-

3
4 fundamental skills

ter to a patient, or how to balance income with outgo. With respect


to personal decisions, Excel can help determine how much money is
available to spend on a house, car payment, or savings for retirement.
This text demonstrates using Excel to make these decisions, and many
more.
Figure 1 shows a completed Excel worksheet that will be constructed
in this chapter. The information shown in this worksheet is the top-
line sales data for a hypothetical merchandise retail company. The
worksheet data can help this retailer determine how many salespeo-
ple are needed for each month, how much inventory is needed to
satisfy sales, and what types of products should be purchased.

Figure 1: Example of an Excel Worksheet

1.1.2 Starting Excel

1. Locate Excel on the Windows menu.

2. Click Microsoft Excel to launch the Excel application.

3. Click the first option, Blank Workbook.


1.1 overview of microsoft excel 5

1.1.3 The Excel Workbook

Once Excel is started, a blank workbook will open. A workbook is an


Excel file that contains one or more worksheets (sometimes referred
to as spreadsheets). Excel will assign a file name to the workbook,
such as Book1, Book2, Book3, and so on, depending on how many new
workbooks are opened. Figure 2 shows a blank workbook after start-
ing Excel. Take some time to become familiar with this screen. (Note:
the worksheet screen may be slightly different depending on the version of
Excel being used.)

Figure 2: Blank Workbook

The workbook should already be maximized (or shown at full size)


once Excel is started, as shown in Figure 2. However, if the screen
looks like Figure 3 after starting Excel, click the Maximize button, as
shown in the figure.

Figure 3: Restored Worksheet


6 fundamental skills

1.1.4 Navigating Worksheets

Data is entered and managed in an Excel worksheet. The worksheet


contains several rectangles called cells for entering numeric and non-
numeric data. Each cell in an Excel worksheet is located at an address,
which is defined by a column letter followed by a row number. For
example, the cell that is currently activated in Figure 3 is A1. This
would be referred to as cell location A1 or cell reference A1. The
following steps explain how to navigate in an Excel worksheet.

• Place the mouse pointer over cell D5 and left click.

• Check to make sure Column D and Row 5 are highlighted, as


shown in Figure 4.

Figure 4: Activating a Cell Location

1. Click the mouse pointer in cell A1.

2. Click and hold the left mouse button and drag the
mouse pointer back to cell D5.

3. Release the left mouse button. Several cells are now high-
lighted, as shown in Figure 5.
1.1 overview of microsoft excel 7

Figure 5: Highlighting a Range of Cells

This is referred to as a cell range and is usually written as A1:D5.


Any two cell locations separated by a colon are known as a cell range.
The first cell in the range is the top left corner and the second cell is
the lower right corner.

1. At the bottom of the screen are tabs that identify differ-


ent worksheets. Depending on the version of Excel being
used there may be three as displayed in Figure 5 or just
one. If there is only one sheet, clicking Insert Worksheet
adds a new worksheet. Different versions of Excel use
+ or Insert Worksheet buttons. For this exercise, add
worksheets as necessary so three are available.

2. Click the Sheet1 tab at the bottom of the screen to acti-


vate it, as shown in Figure 5.
8 fundamental skills

Keyboard Shortcuts

Basic Worksheet Navigation

• Use the arrow keys on the keyboard to move the cell


pointer to different cells on the worksheet.
• Hold the Shift key and press the arrow keys on the
keyboard to highlight a range of cells in a worksheet.
• Hold the Ctrl key while pressing the Page Down or
Page Up keys to open other worksheets in a workbook.

1.1.5 The Excel Ribbon

Excel’s features and commands are found in the Ribbon, which is the
upper area of the Excel screen that contains several tabs running
across the top. Each tab provides access to a different set of Excel
commands. Figure 6 shows the commands available in the Home tab
of the Ribbon. Table 1, Command Overview for Each Tab of the Ribbon,
provides an overview of the commands that are found in each tab of
the Ribbon.

Figure 6: Home Tab of the Ribbon


1.1 overview of microsoft excel 9

Tab Description
Also known as the Backstage View of the Excel workbook.
Contains all commands for opening, closing, saving, and
creating new Excel workbooks. Includes print
File
commands, document properties, e-mailing options, and
help features. Excel’s user options are also found in this
tab.
Contains the most frequently used Excel commands.
Formatting commands are found in this tab along with
Home
commands for cutting, copying, pasting, and for
inserting and deleting rows and columns.
Used to insert objects such as charts, pictures, shapes,
Insert
PivotTables, Internet links, symbols, or text boxes.
Contains commands used to prepare a worksheet for
Page
printing. Also includes commands used to show and
Layout
print the grid lines on a worksheet.
Includes commands for adding mathematical functions
Formulas to a worksheet. Also contains tools for auditing
mathematical formulas.
Used when working with external data sources such as
Data Microsoft® Access®, text files, or the Internet. Also
contains sorting commands and access to scenario tools.
Includes Spelling and Track Changes features. Also
Review contains protection features to password protect
worksheets or workbooks.
Used to adjust the visual appearance of a workbook.
View Common commands include the Zoom and Page Layout
view.

Table 1: Command Overview for Ribbon Tabs

The Ribbon shown in Figure 6 is full, or maximized. The benefit of


having a full Ribbon is that the commands are always visible while de-
veloping a worksheet. However, depending on the screen dimensions
of the computer, the Ribbon may take up too much vertical space on
the worksheet. If this is the case, it can be minimized by clicking the
button shown in Figure 6. When minimized, the Ribbon will show
only the tabs and not the command buttons. Clicking a tab makes the
command buttons appear until a command is selected or the mouse
is clicked anywhere on the worksheet. Once the ribbon is expanded it
can be pinned open by clicking the pin button at the lower left corner
of the ribbon.
10 fundamental skills

Keyboard Shortcuts

Minimizing or Maximizing the Ribbon

• Hold down the Ctrl key and press the F1 key to toggle
between the maximized and minimized view of the
ribbon.

1.1.6 Quick Access Toolbar and Right-Click Menu

The Quick Access Toolbar is found at the upper left side of the Excel
screen above the Ribbon, as shown in Figure 7. This area provides ac-
cess to the most frequently used commands, such as Save and Undo.
The Quick Access Toolbar can be customized by adding commands that
are extensively used. By placing these commands in the Quick Access
Toolbar, it is not necessary to navigate through the Ribbon to find
them. To customize the Quick Access Toolbar, click the down arrow as
shown in Figure 7. This will open a menu of commonly used com-
mands that can be added to the Quick Access Toolbar. If the desired
command is not on the list, select the More Commands option, which
opens a screen containing every command on the ribbon.

Figure 7: Customizing the Quick Access Toolbar

In addition to the Ribbon and Quick Access Toolbar, commands


can also be accessed by right-clicking anywhere on the worksheet
1.1 overview of microsoft excel 11

and opening a context menu. 8 shows an example of the commands


available in the context menu.

Figure 8: Right-Click Menu

1.1.7 The File Tab

The File tab is also known as the Backstage view of the workbook. It
contains a variety of features and commands related to the workbook
that is currently open, new workbooks, or workbooks stored in other
locations on the computer or network. Figure 9 shows the options
available in the File tab or Backstage view. To leave the Backstage view
and return to the worksheet, click the arrow in the upper left-hand
corner as shown in Figure 9.
12 fundamental skills

Figure 9: File Tab or Backstage View of a Workbook

Included in the File tab are the numerous Excel settings that can
be accessed and modified by clicking the Options button. Figure 10
shows the Excel Options window, which opens access to settings such
as the default font style, font size, and the number of worksheets that
appear in new workbooks1 .

Figure 10: Excel Options Window

1 Chapter 9, advanced topics, page 439, has more information about setting com-
mon options.
1.1 overview of microsoft excel 13

1.1.8 Saving Workbooks (Save As)

Once a new workbook is created, the file name needs to be specified


and a location chosen on the computer or network to save that file.
A blank workbook was opened earlier in this lesson and it should
now be saved. It is important to remember where the workbook is
saved since it will be used later in this chapter to construct the work-
book shown in Figure 1. As a tip, it is probably easiest to store all
workbooks used in this course in the same folder.

1. Click File ⇒ Save As. This will open the Save As dialog.

2. Determine a location for saving on the computer by


clicking Browse on the left side to open the Save As dia-
log box as illustrated in Figure 11.

3. Click in the File Name box near the bottom of the Save As
dialog box. Type the new file name: CH1-GMW Sales
Data

4. Review the settings in the screen for correctness and


click the Save button.

Figure 11: Save As Dialog in Excel


14 fundamental skills

Keyboard Shortcuts

Save As

• Press the F12 key and use the tab and arrow keys to
navigate around the Save As dialog box. Use the Enter
key to make a selection.
• Or press the Alt key on the keyboard and Key Tips,
small letters and numbers, appear on the Ribbon.
Press the F key on the keyboard for the File tab and
then the A key. This will open the Save As dialog box.

Skill Refresher
Saving Workbooks (Save As)

• Click the File tab on the Ribbon.


• Click the Save As option.
• Select a location on the computer.
• Click in the File name box and type a new file name
if needed.
• Click Save as type ⇒ Down Arrow and select the appro-
priate file type if needed.
• Click the Save button.

1.1.9 The Status Bar

The Status Bar is located below the worksheet tabs on the Excel screen
(see Figure 12). It displays a variety of information, such as the sta-
tus of certain keys on the keyboard (e. g., CAPS LOCK), the available
views for a workbook, the magnification of the screen, and mathemat-
ical functions that can be performed when data are highlighted on a
worksheet. The Status Bar can be customized as follows.

1. Place the mouse pointer over any area of the Status Bar
and right-click to display the Customize Status Bar list of
options (see Figure 12).

2. Select the Caps Lock option from the menu (see Figure
12).

3. Press the Caps Lock key on the keyboard and notice the
Caps Lock indicator on the lower left side of the Status
Bar.
1.1 overview of microsoft excel 15

4. Press the Caps Lock on the keyboard again. The indicator


on the Status Bar goes away.

Figure 12: Customizing the Status Bar

1.1.10 Excel Help

The Help feature provides extensive information about the Excel ap-
plication. Although some of this information may be stored on the
local computer, the Help window will automatically connect to the
Internet if there is a live connection to provide resources that can
answer most questions.
Excel 2016 To access help, enter a question in the Tell me what you
want to do text box above the ribbon. A drop-down list with links to
several potential answers will appear. Select from the links or click
the question mark to launch the Excel Help window.
Excel 365 The Excel Help window can be opened by clicking the
Help tab. Alternatively, enter a question in the Search text box above
the ribbon. A drop-down list with links to several potential answers
will appear. Select from the links or click the question mark to launch
the Excel Help window.
16 fundamental skills

Figure 13: Excel Help Window

Keyboard Shortcuts

Excel Help

• Press the F1 key on the keyboard.

Key Take-Aways

Overview

• Excel is a powerful tool for processing data for the


purposes of making decisions.
• Excel commands are found throughout the tabs in the
Ribbon.
• The Quick Access Toolbar can be customized by adding
frequently-used commands.
• Information displayed on the Status Bar can be cus-
tomized.
• The Help window provides extensive information
about Excel.
1.2 entering, editing, and managing data 17

1.2 entering, editing, and managing data

Learning Objectives

• Understand how to enter data into a worksheet.


• Examine how to edit data in a worksheet.
• Examine how the Auto Fill Handle is used when en-
tering data.
• Understand how to delete data from a worksheet and
use the Undo command.
• Examine how to adjust column widths and row
heights in a worksheet.
• Understand how to hide columns and rows in a work-
sheet.
• Examine how to insert columns and rows into a work-
sheet.
• Understand how to delete columns and rows from a
worksheet.
• Learn how to move data to different locations in a
worksheet.

This section begins the development of the workbook shown in


Figure 1. The skills covered in this section are typically used in the
early stages of developing one or more worksheets in a workbook.

1.2.1 Entering Data

Begin building the workbook shown in Figure 1 by manually entering


data into the worksheet. Begin by entering the column headings in
Row 2.

1. Click cell location A2 on the worksheet.

2. Type the word Month.

3. Press the Tab key. This will enter the word into cell A2
and activate the next cell to the right.

4. Type Unit Sales and press the Tab key.

5. Repeat the above step for the words Average Price and
then again for Sales Dollars.

Figure 14 shows how the worksheet should appear after the column
headings have been entered into Row 2. Notice that the word Price in
cell location C2 is not visible. This is because the column is too narrow
to fit the entry. This will be corrected in the next section.
18 fundamental skills

Figure 14: Entering Column Headings into a Worksheet

Integrity Check

Column Headings

It is critical to include column headings that accu-


rately describe the data in each column of a worksheet. In
professional environments, Excel workbooks are commonly
shared among coworkers. Good column headings reduce
the chance of someone misinterpreting the data contained
in a worksheet, which could lead to costly errors.

1. Click cell location B3.

2. Type the number 2670 and press the Enter key. After
pressing the Enter key, cell B4 will be activated. Using
the Enter key is an efficient way to enter data vertically
down a column.

3. Enter the following numbers in cells B4 through B14:


2160, 515, 590, 1030, 2875 , 2700, 900, 775, 1180, 1800,
and 3560.

4. Click cell location C3.

5. Type the number 9.99 and press the Enter key.

6. Enter the following numbers in cells C4 through C14:


12.49, 14.99, 17.49, 14.99, 12.49, 9.99, 19.99, 19.99, 19.99,
17.49, and 14.99.

7. Click in cell D3.

8. Type the number 26685 and press the Enter key.


1.2 entering, editing, and managing data 19

9. Enter the following numbers in cells D4 through D14:


26937, 7701, 10269, 15405, 35916, 26937, 17958, 15708,
23562, 31416, and 53370.

10. When finished, check that the data entered matches Fig-
ure 15.

Figure 15: Completed Data Entry for Columns B, C, and D

Integrity Check

Data Entry

One of the most likely points of error in any spread-


sheet project is inaccurate data entry. When entering row
and row of numbers it is easy to transpose or skip digits.
Carefully checking data entry will reduce confusing results
during the analysis phase of the project.
20 fundamental skills

Why?

Avoid Formatting Symbols When Entering Numbers

When typing numbers into an Excel worksheet, it is


best to avoid adding any formatting symbols such as dollar
signs and commas. Although Excel allows these symbols
to be included while typing numbers, it slows down the
process of entering data. It is more efficient to use Excel’s
formatting features to add these symbols to numbers after
they are typed into a worksheet.

1.2.2 Editing Data

Data that has been entered in a cell can be changed by double clicking
the cell location or using the Formula Bar. The Formula Bar can be
used for initial entry of data into cells as well as for editing data
that already exists in a cell. The following steps provide an example
of entering and then editing data that has been entered into a cell
location.

1. Click cell A15 in the Sheet1 worksheet.

2. Type the abbreviation Tot and press the Enter key.

3. Click cell A15.

4. Move the mouse pointer up to the Formula Bar. Notice


that the pointer turns into a cursor. Move the cursor to
the end of the abbreviation Tot and left click.

5. Type the letters al to complete the word Total.

6. Click the checkmark to the left of the Formula Bar (see


Figure 16) or press the Enter key to enter the change into
the cell.
1.2 entering, editing, and managing data 21

Figure 16: Using the Formula Bar to Edit and Enter Data

7. Double click cell A15.

8. Add a space after the word Total and type the word
Sales.

9. Press the Enter key.

Keyboard Shortcuts

Editing Data in a Cell

• Click in the cell that is to be edited and press the F2


key on the keyboard. Alternatively, double-click the
cell to be edited.

1.2.3 Auto Fill

The Auto Fill feature is a valuable tool when manually entering data
into a worksheet. This feature has many uses, but it is most beneficial
when entering data in a defined sequence, such as the numbers 2, 4,
6, 8, and so on, or non-numeric data such as the days of the week or
22 fundamental skills

months of the year. The following steps demonstrate how the Auto
Fill Handle can be used to enter the months of the year in Column A.

1. Click cell A3 in the Sheet1 worksheet.

2. Type the word January and press the Enter key.

3. Click in cell A3 again.

4. Move the mouse pointer to the lower right corner of cell


A3. Notice a small square in this corner of the cell which
is called the Auto Fill Handle (See Figure 17) When the
mouse pointer gets close to the Auto Fill Handle, the
pointer’s white block plus sign will turn into a black
plus sign.

Figure 17: Auto Fill Handle

5. Left click and drag the Auto Fill Handle to cell A14.
Notice that the Auto Fill Handle tip box indicates what
month will be placed into each cell (see Figure 18). Re-
lease the left mouse button when the tip box reads De-
cember.
1.2 entering, editing, and managing data 23

Figure 18: Using Auto Fill Handle to Enter the Months of the Year

Once the left mouse button is released, all twelve months of the
year should appear in the cell range A3:A14, as shown in Figure 19.
After auto-filling a range, an Auto Fill Options button pops up at the
lower right corner of the filled range, as shown in Figure 19.
Excel 2016 The Auto Fill Options button presents several options for
changing the way that the range is filled.
24 fundamental skills

Figure 19: Auto Fill Options Button

1. Click the Auto Fill Options button.

2. Click the Copy Cells option. This will change the months
in the range A4:A14 to January.

3. Click the Auto Fill Options button again.

4. Click the Fill Months option to return the months of the


year to the cell range A4:A14. The Fill Series option will
provide the same result.
1.2 entering, editing, and managing data 25

Excel 365 The Auto Fill Options button was replaced with the Quick
Analysis button. That button will apply several possible analysis fea-
tures to the filled range, like highlighting entries that are duplicates.

Figure 20: Quick Analysis Button

1. Click the Quick Analysis button.

2. Hover the mouse over each of the Format tab options


and notice how the text in the cells is highlighted.

3. Click anywhere in the worksheet to finish the auto fill


process.

1.2.4 Deleting Data and the Undo Command

There are several methods for removing data from a worksheet, a few
of which are demonstrated here. With each method, use the Undo
26 fundamental skills

command to return the data that was deleted. Undo is available on


the Quick Access Toolbar or use the keyboard shortcut of Ctrl + Z
. This is a helpful command if data is mistakenly deleted from the
worksheet. The following steps demonstrate how to delete data from
a cell or range of cells.

1. Click cell C2 by placing the mouse pointer over the cell


and clicking the left mouse button.

2. Press the Delete key on the keyboard. This removes the


contents of the cell.

3. Highlight the range C3:C14 by placing the mouse


pointer over cell C3 then left click and drag the mouse
pointer down to cell C14.

4. Place the mouse pointer over the Auto Fill Handle. No-
tice that the white block plus sign change to a black plus
sign.

5. Click and drag the mouse pointer up to cell C3, as in


Figure 21. Release the mouse button. The contents in the
range C3:C14 will be removed.

Figure 21: Using Auto Fill to Delete Contents of Cell


1.2 entering, editing, and managing data 27

1. Click the Undo button in the Quick Access Toolbar, as


illustrated in Figure 21. This should replace the data in
the range C3:C14.

2. Click the Undo button again to replace the data in cell


C2.

Keyboard Shortcuts

Undo Command

• Hold down the Ctrl key while pressing the letter Z


on the keyboard.

1. Highlight the range C2:C14 by placing the mouse


pointer over cell C2. Then left click and drag the mouse
pointer down to cell C14.

2. Click Home ⇒ Editing ⇒ Clear (see Figure 22). This


opens a drop-down menu that contains several options
for removing or clearing data from a cell. Notice that
there are also options for clearing just the formats or the
hyperlinks in a cell.

3. Click the Clear All option. This removes the data in the
cell range.

4. Click the Undo button. This replaces the data in the


range C2:C14.
28 fundamental skills

Figure 22: Clear Command Drop-Down Menu

1.2.5 Adjusting Columns and Rows

There are a few entries in the worksheet that appear to be cut off.
For example, the last letter of the word September cannot be seen in
cell A11. This is because the column is too narrow for this word. The
columns and rows on an Excel worksheet can be adjusted to accom-
modate the data that is being entered into a cell. The following steps
explain how to adjust the column widths and row heights in a work-
sheet.

1. Bring the mouse pointer between Column A and Column


B in the Sheet1 worksheet, as shown in Figure 23. No-
tice that the pointer’s white block plus sign turns into
double arrows.

2. Click and drag the column to the right so the entire word
September in cell A11 can be seen. As the column sepa-
rator is dragged to the right the column width pops up
in a tip box. This box displays the number of characters
that will fit into the column using the Calibri 11-point
font which is the default setting for font/size.

3. Release the left mouse button.


1.2 entering, editing, and managing data 29

Figure 23: Adjusting Column Widths

The click-and-drag method can be inefficient to set a specific char-


acter width for more than one column. The following steps illustrate
a second method for adjusting columns to a specific width.

1. Click any cell location in Column A by moving the


mouse pointer over a cell location and clicking the left
mouse button.

2. Click Home ⇒ Cells ⇒ Format ⇒ Column Width. This


will open the Column Width dialog box.

3. Type the number 13 and click the OK button on the Col-


umn Width dialog box. This will set Column A to this
character width (see Figure 24).

4. As a third option, bring the mouse pointer between Col-


umn A and Column B so that the double arrow pointer
displays and then double-click. This activates AutoFit,
which adjusts the column width based on the longest
entry in the column.

5. Use the Column Width dialog box to set the width to 13.
30 fundamental skills

Figure 24: Column Width Dialog Box

Keyboard Shortcuts

Column Width

• Press and release the Alt key on the keyboard and


then press the letters H , O , and W one at a time.

The following steps demonstrate how to adjust row height, which


is like adjusting column width.

1. Click cell A15.

2. Click Home ⇒ Cells ⇒ Format ⇒ Row Height. This


will open the Row Height dialog box.

3. Type the number 24 and click the OK button on the Row


Height dialog box. This will set Row 15 to a height of 24
points. A point is equivalent to approximately 1/72 of an
inch. This adjustment in row height was made to create
space between the totals for this worksheet and the rest
of the data.

4. Row height can also be adjusted by dragging the border


between Row 15 and Row 16 or by double-clicking the
border between Row 15 and Row 16.
1.2 entering, editing, and managing data 31

Keyboard Shortcuts

Column Width

• Press the Alt key on the keyboard, then press the let-
ters H , O , and H one at a time.

Figure 25 shows the appearance of the worksheet after Column A


and Row 15 are adjusted.

Figure 25: CH1-GMW Sales Data with Column A and Row 15 Adjusted
32 fundamental skills

Skill Refresher
Adjusting Columns and Rows

• Activate at least one cell in the row or column being


adjusted.
• Click Home ⇒ Cells ⇒ Format
• Click either Row Height or Column Width from the
drop-down menu.
• Enter the Row Height in points or Column Width in
characters in the dialog box.
• Click the OK button.

1.2.6 Hiding Columns and Rows

In addition to adjusting the columns and rows on a worksheet, they


can also be hidden. This is a useful technique for enhancing the visual
appearance of a worksheet that contains data that is not necessary to
display. These features will be demonstrated using the CH1-GMW
Sales Data workbook later in the course; however, there is no need
to have hidden columns or rows in this worksheet. The use of these
skills will be presented here for demonstration purposes only.

1. Click cell C1 in the Sheet1 worksheet.

2. Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide. This


will open a submenu of options.

3. Click the Hide Columns option in the submenu of op-


tions (see Figure 26) to hide Column C.

Figure 26: Hide & Unhide Submenu


1.2 entering, editing, and managing data 33

Keyboard Shortcuts

Hiding Columns

• Hold down the Ctrl key while pressing the number 0


on the keyboard. (Note, this is the number zero, not
the letter O.)

Figure 27 shows the workbook with Column C hidden. If a column


is hidden, its name is missing, like the missing letter C at the top of
the column.

Figure 27: Hidden Column

To unhide a column, use the following steps.

1. Highlight the range B1:D1 by activating cell B1 and


clicking and dragging over to cell D1.

2. Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide.

3. Click the Unhide Columns option in the submenu of op-


tions. Column C will now be visible on the worksheet.
34 fundamental skills

Keyboard Shortcuts

Unhiding Columns

• Highlight cells on either side of the hidden column(s),


then hold down the Ctrl key and the Shift key while
pressing ) , the close parenthesis key, on the keyboard.
Note: This keyboard shortcut does not reliably work
for some reason that has not been explained by Mi-
crosoft. If it does not work, then use the ribbon but-
ton.

The following steps demonstrate how to hide rows, which is like


hiding columns.

1. Click cell A3 in the Sheet1 worksheet.

2. Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide. This


will open a submenu of options.

3. Click the Hide Rows option in the submenu of options.


This will hide Row 3.

Keyboard Shortcuts

Hiding Rows

• Hold down the Ctrl key while pressing the number 9


key on the keyboard.

To unhide a row, follow these steps.

1. Highlight the range A2:A4 by activating cell A2 and


clicking and dragging down to cell A4.

2. Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide. This


will open a submenu of options.

3. Click the Unhide Rows option in the submenu of options


to unhide Row 3.
1.2 entering, editing, and managing data 35

Keyboard Shortcuts

Unhiding Rows

• Highlight cells above and below the hidden row(s),


then hold down the Ctrl key and the Shift key while
pressing ( , the open parenthesis key, on the key-
board.

Skill Refresher
Hiding Columns and Rows

• Activate at least one cell in the row(s) or column(s)


being hidden.
• Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide
• Click either the Hide Rows or Hide Columns option.

Skill Refresher
Unhiding Columns and Rows

• Highlight the cells above and below the hidden row(s)


or to the left and right of the hidden column(s).
• Click Home ⇒ Cells ⇒ Format ⇒ Hide & Unhide
• Click either the Unhide Rows or Unhide Columns op-
tion.

Integrity Check

Hidden Rows and Columns

In most careers, it is common for professionals to use


Excel workbooks that have been designed by a coworker.
Before using a workbook developed by someone else,
always check for hidden rows and columns. It is easy to
determine if a row or column is hidden by looking for
missing row numbers or column letters.

1.2.7 Inserting Columns and Rows

Using Excel workbooks that have been created by others is a very


efficient way to work because it eliminates the need to create work-
sheets from scratch. However, to accomplish a specific goal, addi-
tional columns or rows may need to be added to a worksheet. In
36 fundamental skills

this case, blank columns or rows are inserted into a worksheet as


demonstrated below.

1. Click cell C1 in the Sheet1 worksheet.

2. Click Home ⇒ Cells ⇒ Insert ⇒ Down Arrow (see Fig-


ure 28).

Figure 28: Insert Button (Down Arrow)

3. Click the Insert Sheet Columns option from the drop-


down menu (see Figure 29). A blank column will be in-
serted to the left of Column C. The contents that were
previously in Column C now appear in Column D. Note
that columns are always inserted to the left of the acti-
vated cell.
1.2 entering, editing, and managing data 37

Figure 29: Insert Drop-Down Menu

Keyboard Shortcuts

Inserting Columns

• Press the Alt key and then the letters H , I , and C


one at a time. A column will be inserted to the left of
the activated cell.

1. Click cell A3 in the Sheet1 worksheet.

2. Click Home ⇒ Cells ⇒ Insert ⇒ Down Arrow (see Fig-


ure 28).

3. Click the Insert Sheet Rows option from the drop-down


menu (see Figure 29). A blank row will be inserted above
Row 3. The contents that were previously in Row 3 now
appear in Row 4. Note that rows are always inserted
above the activated cell.

Keyboard Shortcuts

Inserting Rpws

• Press the Alt key and then the letters H , I , and R one
at a time. A row will be inserted above the activated
cell.
38 fundamental skills

Skill Refresher
Inserting Columns and Rows

• Activate the cell to the right of the desired blank col-


umn or below the desired blank row.
• Click Home ⇒ Cells ⇒ Insert ⇒ Down Arrow
• Click either the Insert Sheet Columns or Insert Sheet
Rows option.

1.2.8 Moving Data

Once data is entered into a worksheet, it can be moved to different


locations, as demonstrated below.

1. Highlight the range D2:D15 by clicking cell D2 and


dragging down to cell D15.

2. Bring the mouse pointer to the left edge of cell D2. No-
tice that the white block plus sign change to cross ar-
rows (see Figure 30). This indicates that the data can be
dragged to a new location by left-clicking the mouse.

Figure 30: Moving Data

3. Left Click and drag the mouse pointer to cell C2.

4. Release the left mouse button. The data now appears in


Column C.

5. Click the Undo button in the Quick Access Toolbar. This


moves the data back to Column D.
1.2 entering, editing, and managing data 39

Integrity Check

Moving Data

Before moving data on a worksheet, make sure to


identify all the components that belong with the series
being moved. For example, if a column of data is being
moved make sure the column heading is included. Also,
make sure all values are highlighted in the column before
moving it.

1.2.9 Deleting Columns and Rows

It may occasionally be necessary to delete entire columns or rows of


data from a worksheet. For example, a worksheet may contain blank
columns or rows that need to be removed. The methods for removing
cell contents were covered earlier and can be used to delete unwanted
data. However, to delete an entire column or row in a workbook, use
the following steps.

1. Click cell A3.

2. Click Home ⇒ Cells ⇒ Delete ⇒ Down Arrow

3. Click the Delete Sheet Rows option from the drop-down


menu (see Figure 31). This removes Row 3 and shifts all
the data in the worksheet up one row.

Figure 31: Delete Drop-Down Menu


40 fundamental skills

Keyboard Shortcuts

Deleting Rows

• Press the Alt key and then the letters H , D , and R


one at a time. The row with the activated cell will be
deleted.

1. Click cell C1.

2. Click Home ⇒ Cells ⇒ Delete ⇒ Down Arrow.

3. Click the Delete Sheet Columns option from the drop-


down menu (see Figure 31). This removes Column C and
shifts all the data in the worksheet over one column to
the left.

4. Save the changes to the workbook by clicking either


Quick Access Toolbar ⇒ Save or File ⇒ Save.

Keyboard Shortcuts

Deleting Columns

• Press the Alt key and then the letters H , D , and C


one at a time. The column with the activated cell will
be deleted.

Skill Refresher
Deleting Columns and Rows

• Activate any cell in the row or column that is to be


deleted.
• Click Home ⇒ Cells ⇒ Delete ⇒ Down Arrow.
• Click either Delete Sheet Columns or Delete Sheet Rows.
1.3 formatting and data analysis 41

Key Take-Aways

Entering, Editing, and Managing Data

• Column headings should be used in a worksheet and


should accurately describe the data contained in each
column.
• Using symbols such as dollar signs when entering
numbers into a worksheet can slow down the data
entry process.
• Worksheets must be carefully proofread when data
has been manually entered.
• The Undo command is a valuable tool for recovering
data that was deleted from a worksheet.
• When using a worksheet that was developed by some-
one else, look carefully for hidden columns or rows.

1.3 formatting and data analysis

Learning Objectives

• Use formatting techniques as introduced in the Excel


Spreadsheet Guidelines, below, to enhance the appear-
ance of a worksheet.
• Understand how to align data in cell locations.
• Examine how to enter multiple lines of text in a cell
location.
• Understand how to add borders to a worksheet.
• Examine how to use the AutoSum feature to calculate
totals.
• Use the Cut, Copy, and Paste commands to manipu-
late the data on a worksheet.
• Understand how to move, rename, insert, and delete
worksheet tabs.

This section addresses formatting commands that can be used to


enhance the visual appearance of a worksheet. It also introduces
mathematical calculations. The skills introduced in this section pro-
vides powerful tools for analyzing the data used in this workbook
and will highlight how Excel is used to make key decisions in virtu-
ally any career. Additionally, Excel Spreadsheet Guidelines for format
and appearance will be introduced as a format to be used for the
spreadsheets submitted as part of this course.
42 fundamental skills

1.3.1 Formatting Data and Cells

Enhancing the visual appearance of a worksheet is a critical step in


creating a valuable tool for coworkers when making key decisions.
For example, there are accepted professional formatting standards
used when spreadsheets contain only currency data. For this course,
the following Excel Guidelines for Formatting will be used. Figure 32
displays how to use Accounting number format when ALL figures
are currency. Only the first row of data and the totals should be for-
matted with the accounting format while the other data should be for-
matted with comma style. There also needs to be a top border above
the numbers in the total row. If any of the numbers have cents, format
all the data with two decimal places.

Figure 32: Excel Guidelines for Formatting Currency

Often, Excel spreadsheet contain values that are both currency and
non-currency in nature. When that is the case, use the guidelines in
Figure 33.
1.3 formatting and data analysis 43

Figure 33: Excel Guidelines for Formatting Numbers

The following steps demonstrate several fundamental formatting


skills that will be applied to the workbook developed for this chapter.
Several of these formatting skills are identical to ones that may have
been used in other Microsoft applications such as Microsoft® Word®
or Microsoft® PowerPoint® .

1. Highlight the range A2:D2 in the Sheet1 worksheet by


placing the mouse pointer over cell A2 and left clicking
and dragging to cell D2.

2. Click Home ⇒ Font ⇒ Bold (see Figure 34).

3. Click Home ⇒ Font ⇒ Border ⇒ Down Arrow. Select


the Bottom Border option from the list to place a border
on the bottom of Row 2.
44 fundamental skills

Figure 34: Font Group of Commands

Keyboard Shortcuts

Text Formats

• Bold: hold the Ctrl key while pressing the letter B on


the keyboard.
• Italics: hold the Ctrl key while pressing the letter I on
the keyboard.
• Underline: hold the Ctrl key while pressing the letter
U on the keyboard.

1. Highlight the range A15:D15 by placing the mouse


pointer over cell A15 and left clicking and dragging to
cell D15.

2. Click Home ⇒ Font ⇒ Bold.

3. Click Home ⇒ Font ⇒ Border ⇒ Down Arrow. Select


the Top Border option from the list to place a border
on the top of Row 15 where totals will eventually be
displayed.

4. Highlight the range B3:B14 by placing the mouse


pointer over cell B3 and left clicking and dragging down
to cell B14.

5. Click Home ⇒ Number ⇒ Comma Style. This feature


adds a comma and two decimal places to numbers in
the cell (see Figure 35).
1.3 formatting and data analysis 45

Figure 35: Number Group of Commands

Why?

Format Column Headings and Totals

Applying formatting enhancements to the column head-


ings and column totals in a worksheet is a very important
technique, especially if the workbook will be shared with
other people. These formatting techniques allow users
of the worksheet to clearly see the column headings that
define the data. In addition, the column totals usually
contain the most important data on a worksheet with
respect to making decisions, and formatting techniques
allow users to quickly find this information.

1. Since the figures in this range do not include cents, click


Home ⇒ Number ⇒ Decrease Decimal two times (see
Figure 35).

2. The numbers will be reduced to zero decimal places.

3. Highlight the range C3:C14 by placing the mouse


pointer over cell C3 and left clicking and dragging down
to cell C14.

4. Click Home ⇒ Number ⇒ Accounting Number (see Fig-


ure 35). This will add a currency symbol and two deci-
mal places to the values, which is common when work-
ing with pricing data. As discussed in the Formatting
Data and Cells section above, use Accounting format on
all values in this range since the worksheet contains non-
currency as well as currency data.
46 fundamental skills

5. Highlight the range D3:D14 by placing the mouse


pointer over cell D3 and left clicking and dragging down
to cell D14.

6. Apply the Accounting Number Format to add the US


currency symbol to the values and set them for two dec-
imal places.

7. Click Home ⇒ Number ⇒ Decrease Decimal two times


to reduce the decimal places to zero since there are no
cents in these figures.

8. Highlight the range A1:D1 by placing the mouse pointer


over cell A1 and left clicking and dragging over to cell
D1.

9. Click Home ⇒ Font ⇒ Fill Color ⇒ Down Arrow (see


Figure 36). This will prepare the range for a worksheet
title.

Figure 36: Fill Color Palette

10. Click the Blue, Accent 1, Darker 25% color from the
palette (see Figure 36). Notice that as the mouse pointer
moves over the color palette, a preview of the color ap-
pears in the highlighted cells. That makes it easy to ex-
periment with various colors.

11. Click on A1 and enter the worksheet title, General Mer-


chandise World.

12. Click on A2 and then click on A1.This is necessary to


select the cell that contains the text rather than the text
itself.
1.3 formatting and data analysis 47

13. Since the black font is difficult to read on the blue back-
ground, change the font color to be more visible. Click
Home ⇒ Font ⇒ Font Color ⇒ Down Arrow and select
White as the font color for this range (see Figure 34).

14. Highlight the range A1:D15 by placing the mouse


pointer over cell A1 and left clicking and dragging down
to cell D15.

15. Click Home ⇒ Font ⇒ Down Arrow and select Arial


as the font for this range (see Figure 34). Notice that
as the mouse pointer moves over the font style options,
it changes the highlighted cells. This makes it easy to
preview various font options before they are applied.

16. Expand the column width of Column D to 14 characters.

Figure 37 shows how the Sheet1 worksheet should appear after the
formatting techniques are applied.
48 fundamental skills

Figure 37: Formatting Techniques Applied

Why

Hashtags (####) Appear in Columns

When a column is too narrow for a long number, Ex-


cel will automatically convert the number to a series of
hashtags (####). In the case of words or text data, Excel will
only show the characters that fit in the column. However,
this is not the case with numeric data because it can give
the appearance of a number that is much smaller than what
is actually in the cell. To remove the hashtags, increase the
width of the column.
1.3 formatting and data analysis 49

1.3.2 Data Alignment (Wrap Text, Merge Cells, and Center)

The skills presented in this section show how data is aligned within
cell locations. For example, text and numbers can be centered, left
aligned, right aligned, and so on within a cell. In some cases, multi-
word text entries may need to be stacked vertically instead of expand-
ing the width of a column, which is referred to as wrapping text.
These skills are demonstrated in the following steps.

1. Highlight the range B2:D2 by placing the mouse pointer


over cell B2 and left clicking and dragging over to cell
D2.

2. Click Home ⇒ Alignment ⇒ Center (see Figure 38).


This will center the column headings in each cell loca-
tion. Notice the difference between text that is centered
horizontally and text that is middle aligned vertically.

Figure 38: Alignment Group in Home Tab

3. Click Home ⇒ Alignment ⇒ Wrap Text (see Figure


38). The height of Row 2 automatically expands, and the
words that were cut off because the columns were too
narrow are now stacked vertically.

4. Highlight the range A1:D1 by placing the mouse pointer


over cell A1 and left clicking and dragging over to cell
D1.

5. Click Home ⇒ Alignment ⇒ Merge & Center ⇒ Down


Arrow.
50 fundamental skills

6. Click the Merge & Center option (see Figure 39). This
will create one large cell location running across the top
of the data set.

Figure 39: Merge Cell Drop-Down Menu

Keyboard Shortcuts

Merge Commands

• Wrap Text: Press the Alt key and then the letters H
and W one at a time.
• Merge & Center: Press the Alt key and then the letters
H , M , and C one at a time.
• Merge Cells: Press the Alt key and then the letters H
, M , and M one at a time.
• Unmerge Cells: Press the Alt key and then the letters
H , M , and U one at a time.

Why?

Wrap Text

The benefit of using the Wrap Text command is that


it significantly reduces the need to expand the column
width to accommodate multi-word column headings. The
problem with increasing the column width is that it may
reduce the amount of data that can fit on a piece of paper
or one screen. This makes it cumbersome to analyze the
data in the worksheet and could increase the time it takes
to make a decision.

Figure 40 shows the Sheet1 worksheet with the data alignment com-
mands applied. The reason for merging the cells in the range A1:D1
will become apparent in the next section.
1.3 formatting and data analysis 51

Figure 40: Sheet1 with Data Alignment Features Added

Why?

Merge & Center

One of the most common reasons the Merge & Cen-


ter command is used is to center the title of a worksheet
directly above the columns of data. Once the cells above
the column headings are merged, a title can be centered
above the columns of data. It is very difficult to center the
title over the columns of data if the cells are not merged.
52 fundamental skills

Skill Refresher
Wrap Text

• Activate the cell or range of cells that contain text


data.
• Click Home ⇒ Alignment ⇒ Wrap Text.

Skill Refresher
Merge Cells

• Highlight a range of cells that will be merged.


• Click Home ⇒ Alignment ⇒ Merge & Center Down Ar-
row.
• Select an option from the Merge & Center list.

1.3.3 Entering Multiple Lines of Text

In the Sheet1 worksheet, the cells in the range A1:D1 were merged for
the purposes of adding a title to the worksheet. This worksheet will
contain both a title and a subtitle. The following steps explain how
to enter text into a cell and determine where the second line of text
should begin.

1. Click cell A1 in the Sheet1 worksheet. Since the cells


were merged, clicking cell A1 will automatically acti-
vate the range A1:D1. Position the mouse to the end of
the title, directly after the “d” in the word “World” and
double-click to get a cursor (flashing I-beam).

2. Hold down the Alt key and press the Enter key. This will
start a new line of text in this cell location.

3. Type the text Retail Sales (in millions) and press the
Enter key.

4. Click cell A1.

5. Increase the height of Row 1 to 30 points. Once the row


height is increased, all the text typed into the cell will be
visible (see Figure 41).

6. Click Home ⇒ Font ⇒ Bold.

7. Click Home ⇒ Font ⇒ Italics.


1.3 formatting and data analysis 53

Figure 41: Title & Subtitle Added to the Worksheet

Skill Refresher
Entering Multiple Lines of Text

• Activate a cell location.


• Type the first line of text.
• Hold down the Alt key and press the Enter key.
• Type the second line of text and press the Enter key.

1.3.4 Borders (Adding Lines to a Worksheet)

In Excel, adding custom lines to a worksheet is known as adding


borders. Borders are different from the grid lines that appear on a
worksheet and that define the perimeter of the cell locations. Borders
add a variety of line styles to a worksheet that can make reading the
54 fundamental skills

worksheet much easier. The following steps illustrate methods for


adding both preset and custom borders to a worksheet.

1. Click Home ⇒ Font ⇒ Borders ⇒ Down Arrow to view


border options (see Figure 42).

Figure 42: Borders Drop-Down Menu

2. Highlight the range A1:D15.

3. Click Home ⇒ Font ⇒ Borders ⇒ Down Arrow ⇒ All


Borders (see Figure 42). This will add vertical and hori-
zontal lines to the range A1:D15.

4. Highlight the range A2:D2 by clicking A2 and dragging


to cell D2.

5. Click Home ⇒ Font ⇒ Borders ⇒ Down Arrow ⇒ Thick


Bottom Border

6. Highlight the range A14:D14 and click Home ⇒ Font


⇒ Borders ⇒ Down Arrow ⇒ Thick Bottom Border.
The thick border will help maintain the Excel Formatting
Guidelines.

7. Highlight the range A1:D15.

8. Click Home ⇒ Font ⇒ Borders ⇒ Down Arrow ⇒ More


Borders...

9. This will open the Format Cells dialog box (see Figure 43).
All Excel formatting commands can be accessed through
this dialog box.
1.3 formatting and data analysis 55

10. In the Style section of the Borders tab, click the thickest
line style (see Figure 43).

11. Click the Outline button in the Presets section (see Figure
43).

12. Click the OK button at the bottom of the dialog box (see
Figure 43).

Figure 43: Borders Tab of the Format Cells Dialog Box

The Sheet1 worksheet should now look like Figure 44.


56 fundamental skills

Figure 44: Borders Added to the Sheet1 Worksheet

Skill Refresher
Preset Borders

• Highlight a range of cells that require borders.


• Click the Home tab of the Ribbon.
• Click the down arrow next to the Borders button.
• Select an option from the preset borders list.

Custom Borders

• Highlight a range of cells that require borders.


• Click Home ⇒ Font ⇒ Borders ⇒ Down Arrow ⇒ More
Borders...
• Select a line style and line color.
• Select a placement option.
• Click the OK button on the dialog box.

1.3.5 Autosum

Notice at the bottom of Figure 44 that Row 15 is intended to show the


totals for the data in this worksheet. Applying mathematical compu-
1.3 formatting and data analysis 57

tations to a range of cells is accomplished through functions in Excel2 .


The following steps will demonstrate how to quickly sum the values
in a column of data using the AutoSum command.

1. Click in cell B15 in the Sheet1 worksheet.

2. Click Formulas ⇒ Function Library ⇒ AutoSum ⇒


Down Arrow (see Figure 45). Note that autosum can also
be found at Home ⇒ Editing ⇒ AutoSum.

Figure 45: AutoSum Drop-Down List

3. Click the Sum option from the AutoSum drop-down


menu. The first click will display a flashing marquee
around the range. Press the Enter key or click the Check
Mark next to the Formula bar to complete the function.

4. Excel will provide a total for the values in the Unit Sales
column.

5. It would not make sense to total the averages in Column


C so C15 will be left blank.

2 Chapter 3, formulas, page 141, in this book reviews mathematical formulas and
functions in detail.
58 fundamental skills

6. Click in cell D15.

7. Click Formulas ⇒ Function Library ⇒ AutoSum ⇒


Down Arrow.

8. Click the Sum option from the AutoSum drop-down


menu. The first click will display a flashing marquee
around the range. Press the Enter key or click the Check
Mark next to the Formula bar to complete the function
(see Figure 46).

Figure 46: Totals Added to the Sheet1 Worksheet

Skill Refresher
AutoSum

• Highlight a cell location below or to the right of a


range of cells that contain numeric values.
• Click the Formulas tab of the Ribbon.
• Click the down arrow below the AutoSum button.
• Select a mathematical function from the list.
1.3 formatting and data analysis 59

1.3.6 Moving, Renaming, Inserting, and Deleting Worksheets

The default names for the worksheet tabs at the bottom of workbook
are Sheet1, Sheet2, and so on. However, the worksheet names can be
changed to identify the data each worksheet contains. Additionally,
the order that the worksheet tabs appear can be changed. The fol-
lowing steps explain how to rename and move the worksheets in a
workbook.

1. Double-click the Sheet1 worksheet tab at the bottom of


the workbook (see Figure 47).

2. Type the name Sales by Month and press Enter .

3. Double click the Sheet2 worksheet tab at the bottom of


the workbook.

4. Type the name Unit Sales Rank and press Enter .

Figure 47: Renaming a Worksheet Tab

1. Click-and-drag the Unit Sales Rank worksheet tab to the


left of the Sales by Month sheet. It will become the first
worksheet in the workbook.

2. Click the Sheet3 worksheet tab.

3. Click Home ⇒ Cells ⇒ Delete ⇒ Down Arrow ⇒ Delete


Sheet. This removes the unneeded worksheet.

4. If a warning box pops up, click the Delete button.

5. Also delete the Unit Sales Rank worksheet since it was


decided that worksheet is also unnecessary. This means
that the workbook is left with just one worksheet, Sales
by Month.
60 fundamental skills

6. Save the changes to the workbook by clicking either


Quick Access Toolbar ⇒ Save or File ⇒ Save.

Integrity Check

Deleting Worksheets

Be very cautious when deleting worksheets that con-


tain data. Once a worksheet is deleted it is gone forever;
the Undo command cannot bring the sheet back. Deleting a
worksheet is permanent!

Keyboard Shortcuts

Inserting New Worksheets

• Press the Shift key and then the F11 key on the key-
board.

Figure 48 shows the final appearance of the CH1-GMW Sales work-


book.

Figure 48: Final Appearance of the CH1-GMW Sales Workbook


1.3 formatting and data analysis 61

Skill Refresher
Renaming Worksheets

• Double click the worksheet tab.


• Type the new name.
• Press the Enter key.

Moving Worksheets

• Left click the worksheet tab.


• Drag it to the desired position.

Deleting Worksheets

• Open the worksheet to be deleted.


• Click Home ⇒ Cells ⇒ Delete ⇒ Down Arrow ⇒ Delete
Sheet.
• Click Delete on the warning box.

Best Practice
Summary Worksheet

It is considered a best practice to make the first work-


sheet in a workbook a summary. That sheet should include
the purpose of the workbook and a brief explanation
for each of the sheets in the book. It should also include
contact information for the originator so questions that
may come up later can be clarified. The simple workbooks
in this course will not include a summary sheet, but it
would be included in more complex projects.
62 fundamental skills

Key Take-Aways

Save

• Formatting skills are critical for creating worksheets


that are easy to read and have a professional appear-
ance.
• A series of hashtags (####) in a cell location indicates
that the column is too narrow to display the number
entered.
• Using the Wrap Text command allows multi-word col-
umn headings to be stacked vertically in a cell loca-
tion, reducing the need to expand column widths.
• Use the Merge & Center command to center the title
of a worksheet directly over the columns that contain
data.
• Adding borders or lines will make the worksheet eas-
ier to read and helps to separate the data in each col-
umn and row.
• The Undo command will not bring back a worksheet
that has been deleted.

1.4 printing

Learning Objectives

• Use the Page Layout tab to prepare a worksheet for


printing.
• Add headers and footers to a printed worksheet.
• Explore how to print worksheets and workbooks.

Once a workbook is completed, it is good practice to select the


appropriate settings for printing. These settings are in the Page Layout
tab of the Ribbon and discussed in this section of the chapter.

1.4.1 Page Setup

Before the worksheets in a workbook can be printed, the setting must


be adjusted. The following steps explain several of the commands in
the Page Layout tab of the Ribbon used to prepare a worksheet for
printing.

1. Open the CH1-GMW Sales workbook if it is not already


open.
1.4 printing 63

2. Click Page Layout ⇒ Page Setup ⇒ Margins. This will


open a drop-down list of options for setting the margins
of the printed document. The Normal, Wide, and Narrow
will quickly apply one of those common margin settings
and for this worksheet, click Narrow.

3. To further adjust the margin settings, Page Layout ⇒


Page Setup ⇒ Margins ⇒ Custom Margins.

4. On the Page Setup dialog box, click the Page tab, then
select Landscape.

5. Click the Margins tab and locate the Center on Page


section. Click the boxes to center the data horizontally
and vertically on the worksheet (see Figure 49).

6. Click OK.

Figure 49: Page Layout Commands for Printing


64 fundamental skills

Why?

Use Print Settings

Because professionals often share Excel workbooks, it


is a good practice to select the appropriate print settings in
the Page Layout tab even if there is no intent to print the
worksheets. It can be extremely frustrating for recipients of
a workbook who wish to print the worksheets to find that
the necessary print settings have not been selected.

Table 2 lists the various page layout settings and how they would
be used.
1.4 printing 65

Command Purpose Use


1. Click the Page Layout tab of the
Sets the top, bottom, right, and left Ribbon.
Margins margin space for the printed 2. Click the Margin button.
document 3. Click one of the preset margin
options or click Custom Margins.
1. Click the Page Layout tab of the
Sets the orientation of the printed Ribbon.
Orientation document to either portrait or 2. Click the Orientation button.
landscape 3. Click one of the preset
orientation options.
1. Click the Page Layout tab of the
Ribbon.
Sets the paper size for the printed
Size 2. Click the Size button.
document
3. Click one of the preset paper size
options or click More Paper Sizes.
1. Highlight the range of cells on a
worksheet to be printed.
Used for printing only a specific 2. Click the Page Layout tab of the
Print Area area or range of cells on a Ribbon.
worksheet 3. Click the Print Area button.
4. Click the Set Print Area option
from the drop-down list.
1. Activate a cell on the worksheet
where the page break should be
placed. Breaks are created above
and to the left of the activated cell.
Manually set the page breaks on a
Breaks 2. Click the Page Layout tab of the
worksheet
Ribbon.
3. Click the Breaks button.
4. Click the Insert Page Break
option from the drop-down list.
1. Click the Page Layout tab of the
Ribbon.
Adds a picture behind the cell
Background 2. Click the Background button.
locations in a worksheet
3. Select a picture stored on the
local computer or network.
1. Click the Page Layout tab of the
Ribbon.
2. Click the Print Titles button.
3. Click in the Rows to Repeat at
Used when printing large data sets
Top input box in the Page Setup
that are several pages long. This
dialog box.
Print Titles command will repeat the column
4. Click any cell in the row that
headings at the top of each printed
contains the column headings for
page.
the worksheet.
5. Click the OK button at the
bottom of the Page Setup dialog
box.

Table 2: Purpose and Use for Page Setup Commands

1.4.2 Headers and Footers

When printing worksheets from Excel, it is common to add head-


ers and footers to the printed document. Information in the header
or footer could include the date, page number, file name, company
66 fundamental skills

name, and so on. The following steps explain how to add headers
and footers to the CH1-GMW Sales Data workbook.

1. Click Insert ⇒ Text ⇒ Header & Footer.

Note: A new tab containing header and footer controls is added


to the ribbon. Excel 2016 names the tab Design and Excel 365 names it
Header & Footer. Other than the name of the tab, the next few instruc-
tions are the same for both versions of Excel. Inserting a header or
footer will also open the Page Layout view of the worksheet, which
makes it easy to add elements like the date or page number. Figure
50 shows the tab that is used to work with headers and footers.

Figure 50: Tab for Creating Headers and Footers

1. Type the author’s name in the center section of the


Header.

2. Click in the left section of the Header (see Figure 50).

3. Click Design ⇒ Header & Footer Elements ⇒ Current


Date. Note: the date will display as &[Date] until the
workbook is printed, or the normal view is restored.

4. Click Design ⇒ Navigation ⇒ Go To Footer.

5. Click in the right section of the footer.

6. Click Design ⇒ Header & Footer ⇒ Page Number.


Note: the page number will display as &[Page] until the
workbook is printed, or the normal view is restored.

7. Click any cell location outside the header or footer area.


1.4 printing 67

8. Click the Normal view button in the lower right side of


the Status Bar (see Figure 51).

Figure 51: Worksheet in Page Layout View

1.4.3 Printing Worksheets and Workbooks

Once the print settings have been adjusted and the headers and foot-
ers added, it is time to print the worksheet. The following steps ex-
plain how to print the worksheet in the CH1-GMW Sales workbook.

1. Click the File tab on the Ribbon.

2. Click the Print option on the left side of the Backstage


view (see Figure 52). Notice that there is a preview of
the printed worksheet on the right side of the Backstage
view.

Figure 52: Backstage View Print option


68 fundamental skills

3. Click the Print Active Sheets button in the Print section


of the Backstage view (see Figure 52).

4. Click the Print button to print the active sheet.

5. Click the Home tab of the Ribbon.

6. Save the CH1-GMW Sales Data workbook.

7. Compare the worksheet with the self-check answer key


(CH1-GMW Sales Data Solution) and then close and
submit the CH1-GMW Sales Data workbook as directed
by the instructor.

Key Take-Aways

Print

• The commands in the Page Layout tab of the Ribbon


are used to prepare a worksheet for printing.
• Headers and footers can be added to a worksheet to
show key information such as page numbers, the date,
the file name, author’s name, and so on.
• The Print commands are in the File tab of the Ribbon.

1.5 chapter practice

1.5.1 Basic Monthly Budget for a Medical Office

Creating and maintaining budgets are common practices in many ca-


reers. Budgets play a critical role in helping a business or household
control expenditures. In this exercise a budget for a hypothetical med-
ical office will be created while reviewing the skills covered in this
chapter.

1. Open the file named PR1-Data, then save as PR1-


Medical Office Budget.

2. Activate all the cell locations in the Sheet1 worksheet by


clicking the Select All button in the upper left corner of
the worksheet (See Figure 53).
1.5 chapter practice 69

Figure 53: The Select All Button

3. In the Home tab of the Ribbon, set the font style to Ar-
ial and the font size to 12 points. Then click any cell to
deselect the worksheet.

4. Double-click the divider between the tops of Column A


and Column B to automatically change the width of Col-
umn A so all the entries in the range A3:A8 are visible.

5. Click in B2 and enter Quarter 1.

6. Use the Auto Fill Handle to complete the headings in


the range C2:E2. Click in cell B2 and place the mouse
pointer over the Auto Fill Handle. When the mouse
pointer changes to a black plus sign, left click and drag
it to cell E2.

7. Click B2:E2 to select those cells.

8. Click Home ⇒ Cells ⇒ Format ⇒ Column Width. Set


the column width to 11.57.

9. Click A1 and enter Medical Office Budget.

10. Click on B1 and then click Home ⇒ Cells ⇒ Insert ⇒


Insert Sheet Columns.

11. Click B2 and enter Budget Cost.

12. Adjust the width of Column B to approximately 13.25


characters.
70 fundamental skills

13. Click-and-drag from A1 to F1 to select that range.

14. Click Home ⇒ Alignment ⇒ Merge & Center.

15. Make the following format adjustments to the merged


range A1:F1: bold; italics; change the font size to 14
points; change the cell fill color to Aqua-Accent 5-Darker
50% and change the font color to white.

16. Click A1 then click Home ⇒ Cells ⇒ Format ⇒ Row


Height. Set the height to 24.75.

17. Make the following format adjustment to the range


A2:F2: bold; fill color to Tan-Background 2-Darker 10%.
Center the column titles so that they are horizontally
centered in each cell.

18. Select B2 and then click Home ⇒ Alignment ⇒ Wrap


Text.

19. Copy cell C3 and paste the contents into the range
D3:F3.

20. Click C6 and drag to C8 to select that range. Click Home


⇒ Clipboard ⇒ Copy.

21. Click D6 and drag to F8 to select that range. Click Home


⇒ Clipboard ⇒ Paste.

22. Click cell B3. Click Formulas ⇒ Function Library ⇒ Au-


toSum. To complete the formula, click C3 and drag to
F3 to select that range, then press the Enter key.

23. Copy the formula in cell B3 and paste it into the range
B4:B8.

24. Format the range B3:F8 with Accounting format and


zero decimal places.

25. Select the range A1:F8.

26. Click Home ⇒ Font ⇒ Borders. Select All Borders.

27. Double click the Sheet1 tab at the bottom of the work-
sheet and change its name to Budget, then press the Enter
key.

28. Delete all unused worksheets.

29. Click Page Layout ⇒ Page Setup ⇒ Orientation ⇒


Landscape.
1.6 scored assessment 71

30. Add a header to the Budget worksheet that shows the


current date in the upper left corner and the author’s
name in the center.

31. Add a footer to the Budget worksheet that shows the


page number in the lower right corner.

32. Save the PR1-Medical Office Budget workbook.

33. Compare the worksheet with the self-check answer key


(PR1-Medical Office Budget Solution) and then close
and submit the PR1-Medical Office Budget workbook
as directed by the instructor.

1.6 scored assessment

1.6.1 Sales and Inventory Items

A key activity for marketing professionals is to analyze projected


sales and inventory information. This is especially important for retail
environments. This exercise utilizes the skills covered in this chapter
to analyze sales and inventory data.

1. Open the file named SC1-Data and then save as SC1-


Sales and Inventory

2. In the Sheet1 worksheet, enter the word Totals in cell


C14.

3. Format all the cells in Sheet1 to Century font style and


a 12-point font size.

4. Set the column width for Column A through Column G


to 13.5.

5. Edit the entry in cell B2 to read Item Number.

6. Use the Auto Fill Handle to fill the Item Numbers from
B3 into the range B4:B13. The item numbers should
increase by one as they are filled through the range so
B13 is A1510.

7. Copy the content of cell A3 and paste it into the range


A4:A8.

8. Delete Column F.

9. Format the range A1:F2 so the text is Bold.


72 fundamental skills

10. Set the alignment in the range A2:F2 to Wrap Text.

11. Prepare A1:F1 for the title text by changing the fill color
of the cells in the range A1:F1 to Red, Accent 2, Darker
25%.

12. Make the following font changes to the range A1:F1: set
the font color to white, add italics, and set the font size
to 14.

13. Merge and center the cells in the range A1:F1.

14. Enter the title for this worksheet in the range A1:F1. The
title should appear on two lines. The first line should
read Status Report and the second line should read
Sales and Inventory by Item.

15. Increase the height of Row 1 so the entire title is visible.

16. Format the values in the range C3:C13 with dollar signs
and two decimal places.

17. Format the values in the range E3:F13 with comma style,
zero decimal places.

18. In cell E14, use AutoSum to calculate the sum of the


values in the range E3:E13.

19. In cell F14, use AutoSum to calculate the sum of the


values in the range F3:F13.

20. Apply All Borders to the range A1:F14.

21. Add a thick bottom border to A2:F2; add a thick bottom


border to A13:F13.

22. Add a thick outside border around the perimeter of the


range A1:F14.

23. Insert a new blank worksheet in the workbook (this will


be Sheet4).

24. Delete Sheet3.

25. Move Sheet4 ahead of Sheet2 so the order of the work-


sheets is Sheet1, Sheet4, and Sheet2.

26. Rename the Sheet1 worksheet tab to Status Report.

27. Change the orientation of the Status Report worksheet


so it prints landscape instead of portrait.
1.6 scored assessment 73

28. Add a header to the Status Report worksheet that


shows the date in the upper left corner and the author’s
name in the center.

29. Add a footer to the Status Report worksheet that shows


the page number in the lower right corner with the word
Page before the number.

30. Center the worksheet both horizontally and vertically on


the page.

31. Save and close the SC1-Sales and Inventory workbook.

32. Submit the SC1-Sales and Inventory workbook as di-


rected by the instructor.
M AT H E M AT I C A L C O M P U TAT I O N S
2
Perhaps the most valuable feature of Excel is its ability to produce
mathematical outputs using the data in a workbook. This chapter
reviews several mathematical outputs that can be produced in Ex-
cel through the construction of formulas and functions. The chapter
begins with the construction of formulas for basic and complex math-
ematical computations. The second section reviews statistical func-
tions, such as SUM, AVERAGE, MIN, and MAX, which can be applied
to a range of cells. The last section of the chapter addresses functions
used to calculate mortgage and lease payments as well as the valua-
tion of investments. This chapter also shows how data from multiple
worksheets can be used to construct formulas and functions. These
skills will be demonstrated in the context of a personal cash budget.
The personal budget objective will also provide several opportuni-
ties to demonstrate Excel’s what-if scenario capabilities, which high-
light how formulas and functions automatically produce new outputs
when one or more inputs are changed.

2.1 formulas

Learning Objectives

• Learn how to create basic formulas.


• Understand relative referencing when copying and
pasting formulas.
• Manage the order of operations in complex formulas.
• Understand formula auditing tools.

This section reviews the fundamental skills for entering formulas


into an Excel worksheet by constructing a personal budget. Most fi-
nancial advisors recommend that households construct and maintain
a personal budget to achieve and maintain strong financial health. A
budget is also a vital tool when making financial decisions for a small
business.
Figure 54 shows the completed workbook that will be demonstrated
in this chapter. Notice that this workbook contains four worksheets.
The first worksheet, Budget Summary, contains formulas that utilize
or reference the data in the other three worksheets. As a result, the
Budget Summary worksheet serves as an overview of the data that was
entered and calculated in the other three worksheets.

75
76 mathematical computations

Figure 54: Completed Personal Budget Workbook

2.1.1 Creating a Basic Formula

Formulas are used to calculate a variety of mathematical outputs in


Excel and can be used to create virtually any custom calculation re-
quired. Furthermore, when constructing a formula in Excel, cell lo-
cations added to a formula become cell references. This means that
Excel uses, or references, the number entered in that cell location
when calculating a mathematical output. As a result, when the num-
bers in the cell references are changed, Excel automatically produces
a new output. This is what gives Excel the ability to create a variety
of what-if scenarios, which will be explained later in the chapter.
To demonstrate the construction of a basic formula, begin with the
Budget Detail worksheet in the Personal Budget workbook, which is
shown in Figure 55. Several formulas and functions will be added
to this worksheet. Table 3 provides definitions for each of the spend
categories listed in the range A3:A11. When developing a personal
budget, these categories are defined based on how money is spent. It
is likely that every person would have somewhat different categories
or define the categories differently; therefore, it is important to re-
view the definitions in Table 3 to understand how these categories
are defined for this exercise.
2.1 formulas 77

Figure 55: Budget Detail Worksheet

Category Definition
Household Money spent on electricity, heat, and water, cable,
Utilities phone, and Internet access
Food Money spent on groceries, toiletries, and related items
Gasoline Money spent on fuel for automobiles
Clothes Money spent on clothes, shoes, and accessories
Insurance Money spent on homeowners or automobile insurance
Money spent on school and property taxes (this
Taxes example of the personal budget assumes property
ownership)
Entertain- Money spent on entertainment, including dining out,
ment movie and theater tickets, parties, and so on
Vacation Money spent on vacations
Includes any other spending categories, such as
Miscella-
textbooks, software, journals, school or work supplies,
neous
and so on

Table 3: Spend Category Definitions

The first formula added to the Budget Detail worksheet will calcu-
late the Monthly Spend values. The formula will be constructed so that
it takes the values in the Annual Spend column and divides them by
12. This will show how much money will be spent per month for each
of the categories listed in Column A. The following steps creates the
formula.

1. Click File ⇒ Open ⇒ Browse.


78 mathematical computations

2. Navigate to CH2-Data and click Open.

3. Click File ⇒ Save As ⇒ Browse.

4. Navigate to the desired file location and save it with the


name CH2-Personal Budget.

5. Click the Budget Detail worksheet tab to open the work-


sheet.

6. Click cell C3.

7. Type an equal sign =. When the first character entered in


a cell location is an equal sign, it signals Excel to perform
a calculation or produce a logical output.

8. Type D3. This adds location D3 to the formula, which


is now a cell reference. Excel will use whatever value is
entered in cell D3 to produce an output.

9. Type the slash symbol /. This is the symbol for division


in Excel. As shown in Table 4 the mathematical opera-
tors in Excel are slightly different from those found on a
typical calculator.

10. Type the number 12. This divides the value in cell D3
by 12. In this formula, a number, or constant, is used
instead of a cell reference because it will not change. In
other words, there will always be 12 months in a year.

11. Press the Enter key.

Symbol Operation
+ Addition
− Subtraction
/ Division
∗ Multiplication
∧ Power/Exponent

Table 4: Excel Mathematical Operators

Figure 56 shows how the formula appears in cell C3 before press-


ing the Enter key and Figure 57 shows the output of the formula
after pressing the Enter key. The Monthly Spend for Household Utili-
ties is $250 because the formula is taking the Annual Spend in cell D3
and dividing it by 12. If the value in cell D3 is changed, the formula
automatically produces a new output. This calculates the spend per
2.1 formulas 79

month for each category because people often get paid and are billed
for these items monthly. This formula helps compare monthly income
to bills paid to determine whether there is enough income to pay the
expenses.

Figure 56: Adding a Formula to a Worksheet

Figure 57: Formula Output for Monthly Spend


80 mathematical computations

Why?

Use Cell References

Cell references enable Excel to dynamically produce


new outputs when one or more inputs in the referenced
cells are changed. Cell references also trace how outputs
are being calculated in a formula. As a result, never use a
calculator to determine a mathematical output and type
it directly into a cell location of a worksheet. Doing so
eliminates Excel’s cell-referencing benefits as well as the
ability to trace a formula to determine how outputs are
being produced.

2.1.2 Relative References (Copying and Pasting Formulas)

Once a formula is typed into a worksheet, it can be copied and pasted


to other cell locations. For example, Figure 57 shows the output of the
formula that was entered in cell C3. However, this calculation needs
to be performed for the rest of the cell locations in Column C. Since the
D3 cell reference is used in the formula, Excel automatically adjusts
that cell reference when the formula is copied and pasted into the rest
of the cell locations in the column. This is called relative referencing
and is demonstrated as follows.

1. Click cell C3.

2. Place the mouse pointer over the Auto Fill Handle.

3. When the mouse pointer turns from a white block plus


sign to a black plus sign, click and drag down to cell
C11. This pastes the formula into the range C4:C11.

4. Double click cell C6. Notice that the cell reference in the
formula was automatically changed to D6.

5. Press the Enter key.

Figure 58 shows the outputs added to the rest of the cell locations
in the Monthly Spend column. For each row, the formula takes the
value in the Annual Spend column and divides it by 12. In the figure,
cell D6 has been double clicked to show the formula. Notice that Ex-
cel automatically changed the original cell reference from D3 to D6.
This is the result of relative referencing, which means Excel automat-
ically adjusts a cell reference relative to its original location when it
is pasted into new cell locations. In this example, the formula was
pasted into eight cell locations below the original cell location. As a
2.1 formulas 81

result, Excel increased the row number of the original cell reference
by a value of one for each row it was pasted into.

Figure 58: Relative Reference Example

Why?

Use Universal Constants

Numerical values used in an Excel formula should be


constants that do not change, such as the number of days
in a week, weeks in a year, and so on. Do not enter values
that exist in other cell locations into an Excel formula.
This will eliminate Excel’s cell-referencing benefits, which
means if the value in a cell location being used in a formula
is changed, Excel will not be able to calculate a new output.

2.1.3 Creating Complex Formulas (Controlling the Order of Operations)

The next formula to be added to the Personal Budget workbook is the


percent change over last year. This formula determines the difference
between the values in the LY (Last Year) Spend column and shows
the difference in terms of a percentage. This requires that the order of
mathematical operations be controlled to get an accurate result. Table
5 shows the standard order of operations for a typical formula. To
change the order of operations that is shown in the table, use paren-
theses to process certain mathematical calculations first. The percent
change formula is added to the worksheet as follows.

1. Click cell F3 in the Budget Detail worksheet.


2. Type an equal sign =.
3. Type an open parenthesis (.
82 mathematical computations

4. Click cell D3. This will add a cell reference to cell D3


to the formula. When building formulas, clicking cells
to enter their locations is usually less error-prone than
typing them.

5. Type a minus sign -.

6. Click cell E3 to add this cell reference to the formula.

7. Type a closing parenthesis ).

8. Type the slash / symbol for division.

9. Click cell E3. This completes the formula that will calcu-
late the percent change of last year’s actual spent dollars
vs. this year’s budgeted spend dollars (see Figure 59).

10. Press the Enter key. The result of this formula is 0.0%
since the values in Annual Spend and LY Spend are the
same.

11. Click cell F3.

12. Place the mouse pointer over the Auto Fill Handle.

13. When the mouse pointer turns from a white block plus
sign to a black plus sign, click and drag down to cell
F11. This pastes the formula into the range F4:F11.

Figure 59: Adding the Percent Change Formula


2.1 formulas 83

Symbol Operation
Override Standard Order: Any mathematical computations
placed in parentheses are performed first and override the
standard order of operations. If there are layers of
()
parentheses used in a formula, Excel computes the
innermost parentheses first and the outermost parentheses
last.
∧ First: Excel executes any exponential computations first.
Second: Excel performs any multiplication or division
computations second. When there are multiple instances of
∗ or /
these computations in a formula, they are executed in order
from left to right.
Third: Excel performs any addition or subtraction
computations third. When there are multiple instances of
+ or −
these computations in a formula, they are executed in order
from left to right.

Table 5: Standard Order of Mathematical Operations

Why?

Use Relative Referencing

Relative referencing is a convenient feature in Excel.


When cell references are used in a formula, Excel automati-
cally adjusts the cell references when the formula is pasted
into new cell locations. If this feature were not available,
formulas would have to be manually retyped when the
same calculation is applied to other cell locations in a
column or row.

Figure 59 shows the formula that was added to the Budget Detail
worksheet to calculate the percent change in spending. The paren-
theses were added to this formula to control the order of operations.
Any mathematical computations placed in parentheses are executed
first before the standard order of mathematical operations (see Table
5). In this case, if parentheses were not used, Excel would produce an
erroneous result for this worksheet.
Figure 60 shows the result of the percent change formula if the
parentheses are removed. The formula produces a result of a 299900%
increase. Since there is no change between the LY Spend and the bud-
get Annual Spend, the result should be 0%. However, without the
parentheses, Excel is following the standard order of operations. This
means the value in cell E3 is divided by E3 first (3, 000/3, 000), which
is 1. Then, the value of 1 is subtracted from the value in cell D3
(3, 000 − 1), which is 2, 999. Since cell F3 is formatted as a percentage,
Excel expresses the output as an increase of 299900%.
84 mathematical computations

Figure 60: Removing the Parentheses from the Percent Change Formula

Skill Refresher
Formulas

• Type an equal sign =.


• Click or type a cell location. If using constants, type a
number.
• Type a mathematical operator.
• Click or type a cell location. If using constants, type a
number.
• Use parentheses where necessary to control the order
of operations.
• Press the Enter key.

2.1.4 Auditing Formulas

Excel provides a few tools that can be used to review the formulas
entered in a worksheet. For example, instead of showing the outputs
for the formulas used in a worksheet, Excel can be set to show the
formula as it was entered in the cell locations. This is demonstrated
below.

1. Click Formulas ⇒ Formula Auditing ⇒ Show Formulas.


This displays the formulas in the worksheet instead of
showing the mathematical outputs.

2. Click Formulas ⇒ Formula Auditing ⇒ Show Formulas


again. The worksheet returns to showing the output of
the formulas.

Figure 61 shows the Budget Detail worksheet after activating Show


Formulas. As shown in the figure, this command allows all the formu-
las in a worksheet to be viewed and checked without having to click
each cell individually. After activating this command, the column
widths in the worksheet increase significantly. The column widths
were adjusted for the worksheet shown in Figure 61 so all columns
2.1 formulas 85

can be seen. The column widths return to their previous width when
Show Formulas is deactivated.

Figure 61: Show Formulas Command

Integrity Check

Does the Output of The Formula Make Sense?

It is important to note that the accuracy of the output


produced by a formula depends on how it is constructed.
Therefore, always check the result of a formula to see
whether it makes sense with data in the worksheet. As
shown in Figure 60, a poorly constructed formula can give
a wildly inaccurate result. In other words, it is easy to see
that there is no change between the Annual Spend and LY
Spend for Household Utilities. Therefore, the result of the
formula should be 0%. However, since the parentheses
were removed in this case, the formula is clearly producing
an erroneous result.

Skill Refresher
Show Formulas

• Click Formulas ⇒ Formula Auditing ⇒ Show Formulas


to toggle the formula display on and off.
86 mathematical computations

Keyboard Shortcuts

Show/Hide Formulas

• Hold down the Ctrl key while pressing the accent


symbol ‘ (this is the key to the left of the number one
key on the keyboard). This will toggle the formula
display on and off.

Two other valuable formula tools are Trace Precedents and Trace De-
pendents. These commands are used to trace the cell references used
in a formula. A precedent cell is a cell whose value is used in other
cells. The Trace Precedents command uses an arrow to indicate the
cells or ranges (“precedents”) which affect the active cell’s value. A
dependent cell is a cell whose value depends on the values of other
cells in the workbook. The Trace Dependents command shows where
any given cell is referenced in a formula. The following demonstrates
these commands.

1. Click cell D3 in the Budget Detail worksheet.

2. Click Formulas ⇒ Formula Auditing ⇒ Trace Depen-


dents. A double blue arrow appears, pointing to cell lo-
cations C3 and F3 (see Figure 62). This indicates that cell
D3 is referenced in formulas that are entered in cells C3
and F3.

3. Click Formulas ⇒ Formula Auditing ⇒ Remove Arrows


to remove the Trace Dependents arrow.

4. Click cell F3 in the Budget Detail worksheet.

5. Click Formulas ⇒ Formula Auditing ⇒ Trace Prece-


dents. A blue arrow running through cells D3 and E3
and pointing to cell F3 appears (see Figure 63). This in-
dicates that cells D3 and E3 are references in a formula
entered in cell F3.

6. Click Formulas ⇒ Formula Auditing ⇒ Remove Arrows


to remove the Trace Precedents arrow.

7. Save the CH2-Personal Budget file. Remember, it is al-


ways a good idea to regularly save a file.

Figure 62 shows the Trace Dependents arrow on the Budget Detail


worksheet. The blue dot represents the activated cell. The arrows in-
dicate where the cell is referenced in formulas.
2.1 formulas 87

Figure 62: Trace Dependents Example

Figure 63 shows the Trace Precedents arrow on the Budget Detail


worksheet. The blue dots on this arrow indicate the cells that are
referenced in the formula contained in the activated cell. The arrow
is pointing to the activated cell location that contains the formula.

Figure 63: Trace Precedents Example

Skill Refresher
Trace Dependents

• Click a cell location that contains a number or for-


mula.
• Click Formulas ⇒ Formula Auditing ⇒ Trace Depen-
dents.
• Use the arrow(s) to determine where the cell is refer-
enced in formulas and functions.
• Click Formulas ⇒ Formula Auditing ⇒ Remove Arrows
to remove the arrows from the worksheet.
88 mathematical computations

Skill Refresher
Trace Precedents

• Click a cell location that contains a formula or func-


tion.
• Click Formulas ⇒ Formula Auditing ⇒ Trace Precedents.
• Use the dot(s) along the line to determine what cells
are referenced in the formula or function.
• Click Formulas ⇒ Formula Auditing ⇒ Remove Arrows
to remove the arrows from the worksheet.

Key Take-Aways

Formulas

• Mathematical computations are conducted through


formulas and functions.
• An equal sign = precedes all formulas and functions.
• Formulas and functions must be created with cell ref-
erences to conduct what-if scenarios where mathemat-
ical outputs are recalculated when one or more inputs
are changed.
• Mathematical operators on a typical calculator are dif-
ferent from those used in Excel. Table 4, Excel Mathe-
matical Operators, lists Excel mathematical operators.
• When using numerical values in formulas and func-
tions, only use universal constants that do not change,
such as days in a week, months in a year, and so on.
• Relative referencing automatically adjusts the cell ref-
erences in formulas and functions when they are
pasted into new locations on a worksheet. This elimi-
nates the need to retype formulas and functions when
they are needed in multiple rows or columns on a
worksheet.
• Parentheses must be used to control the order of op-
erations when necessary for complex formulas.
• Formula auditing tools such as Trace Dependents,
Trace Precedents, and Show Formulas should be used
to check the integrity of formulas that have been en-
tered in a worksheet.
2.2 statistical functions 89

2.2 statistical functions

Learning Objectives

• Use the SUM function to calculate totals.


• Use absolute references to calculate percent of totals.
• Use the COUNT function to count cell locations with
numerical values.
• Use the AVERAGE function to calculate the arithmetic
mean.
• Use the MAX and MIN functions to find the highest
and lowest values in a range of cells.
• Learn how to copy and paste formulas without for-
mats applied to a cell location.
• Learn how to set a multiple level sort sequence for
data sets that have duplicate values or outputs.

In addition to formulas, another way to conduct mathematical com-


putations in Excel is through built-in functions. Statistical functions
apply an established mathematical process to a group of cells in a
worksheet. For example, the SUM function is used to add the values
contained in a range of cells. A list of commonly used statistical func-
tions is shown in Table 6. Functions are more efficient than formulas
when applying a mathematical process to a group of cells. If formu-
las are used to add the values in a range of cells, each cell location
would have to be added to the formula one at a time. This can be
very time-consuming, especially if the worksheet includes hundreds
of cell locations. However, when using a function, all the cells that
contain values to sum can be highlighted in just one step. This sec-
tion demonstrates a variety of statistical functions that will be added
to the Personal Budget workbook. In addition to demonstrating func-
tions, this section also reviews “percent of total” calculations and the
use of absolute references.
90 mathematical computations

Function Output
ABS The absolute value of a number
AVERAGE The average or arithmetic mean for a group of numbers
The number of cell locations in a range that contain a
COUNT
numeric character
The number of cell locations in a range that contain a
COUNTA
text or numeric character
MAX The highest numeric value in a group of numbers
The middle number in a group of numbers (half the
numbers in the group are higher than the median and
MEDIAN
half the numbers in the group are lower than the
median)
MIN The lowest numeric value in a group of numbers
The number that appears most frequently in a group of
MODE
numbers
The result of multiplying all the values in a range of cell
PRODUCT
locations
SQRT The positive square root of a number
The standard deviation for a group of numbers based on
STDEV.S
a sample
SUM The total of all numeric values in a group

Table 6: Commonly Used Statistical Functions

The following discusses a few of the more commonly used statisti-


cal functions.

2.2.1 The Sum Function

The SUM function is used to calculate totals for a range of cells or a


group of selected cells on a worksheet. Regarding the Budget Detail
worksheet, the SUM function is used to calculate the totals in Row 12.
It is important to note that there are several methods for adding a
function to a worksheet and all will be demonstrated throughout the
remainder of this chapter. The following illustrates how a function
can be added to a worksheet by typing it into a cell location.

1. Click the Budget Detail worksheet tab to open the work-


sheet if it is not already open.

2. Click cell C12.

3. Type an equal sign =.

4. Type the function name SUM.


2.2 statistical functions 91

5. Type an open parenthesis (.

6. Click cell C3 and drag down to cell C11. This places the
range C3:C11 into the function.

7. Type a closing parenthesis ).

8. Press the Enter key. The function calculates the total for
the Monthly Spend column, which is $1,496.

Figure 64 shows the appearance of the SUM function added to the


Budget Detail worksheet before pressing the Enter key.

Figure 64: Adding the SUM Function to the Budget Detail Worksheet

As shown in Figure 64, the SUM function was added to cell C12.
However, this function is also needed to calculate the totals in the
Annual Spend and LY Spend columns. The function can be copied and
pasted into these cell locations because of relative referencing, which
serves the same purpose for functions as it does for formulas. The
following demonstrates how the total row is completed.

1. Click cell C12 in the Budget Detail worksheet.

2. Click Home ⇒ Clipboard ⇒ Copy.

3. Click in D12 and drag the mouse to E12 to select both


cells.

4. Click Home ⇒ Clipboard ⇒ Paste. This pastes the SUM


function into cells D12 and E12 and calculates the totals
for these columns.
92 mathematical computations

5. Press Esc to stop the “marching ants” highlighting of


C12.

6. Click cell F11.

7. Click Home ⇒ Clipboard ⇒ Copy.

8. Click cell F12.

9. Click Home ⇒ Clipboard ⇒ Paste. Since the totals in


are available in Row 12, the percent change formula can
be pasted into this row.

Figure 65 shows the output of the SUM function that was added to
cells C12, D12, and E12. In addition, the percent change formula was
copied and pasted into cell F12. Notice that this version of the budget
is planning a 1.7% decrease in spending compared to last year.

Figure 65: Results of the SUM Function in the Budget Detail Worksheet

Integrity Check

Cell Ranges in Statistical Functions

When using a statistical function on a range of cells


in a worksheet, make sure the two cell locations are
separated by a colon and not a comma. If two cell locations
are separated by a comma, the function will produce an
output but it will be applied to only two cell locations
instead of the entire range of cells. For example, the SUM
function shown in Figure 66 is written with a comma and
will add only the values in cells C3 and C11, not the range
C3:C11.
2.2 statistical functions 93

Figure 66: SUM Function Adding Two Cell Locations

2.2.2 Absolute References (Calculating Percent of Totals)

Since totals were added to Row 12 of the Budget Detail worksheet, a


percent of total calculation can be added to Column B beginning in
cell B3. The percent of total calculation shows the percentage for each
value in the Annual Spend column with respect to the total in cell D12.
However, after the formula is created, it will be necessary to turn
off Excel’s relative referencing feature before copying and pasting the
formula to the rest of the cell locations in the column. Turning off
Excel’s relative referencing feature is accomplished through using an
absolute reference. The following steps explain how this is done.

1. Click cell B3 in the Budget Detail worksheet.

2. Type an equal sign =.

3. Click cell D3.

4. Type a forward slash /.

5. Click cell D12.

6. Press the Enter key. Notice that Household Utilities rep-


resents 16.7% of the Annual Spend budget (see Figure
67).
94 mathematical computations

Figure 67: Adding a Formula to Calculate the Percent of Total

Figure 67 shows the completed formula that is calculating the per-


centage that the Annual Spend for Household Utilities represents to the
total Annual Spend for the budget (see cell B3). Normally, this formula
would be copied and pasted into the range B4:B11. However, because
of relative referencing, both cell references will increase by one row as
the formula is pasted into the cells below B3. This is fine for the first
cell reference in the formula (D3) but not for the second cell reference
(D12). Figure 68 illustrates what happens if the formula is pasted into
the range B4:B12 in its current state. Notice that Excel produces the
#DIV/0 error code. This means that Excel is trying to divide a num-
ber by zero, which is impossible. Look at the formula in cell B4 and
notice that the first cell reference was changed from D3 to D4. This is
fine because now the Annual Spend for Insurance should be divided by
the total Annual Spend in cell D12. However, Excel has also changed
the D12 cell reference to D13. Because cell location D13 is blank, the
formula produces the #DIV/0 error code.
2.2 statistical functions 95

Figure 68: #DIV/0 Error from Relative Referencing

To eliminate the divide-by-zero error shown in Figure 68 absolute


cell references to D12 must be used in the function. An absolute ref-
erence prevents relative referencing from changing a cell reference in
a formula, which is also referred to as locking a cell. The following
explains how this is accomplished.

1. Double click cell B3.

2. Place the mouse pointer in front of D12 and click. The


blinking cursor should be in front of the D in the cell
reference D12.

3. Press the F4 key. Notice a dollar sign ($) is added in


front of the column letter D and the row number 12. Al-
ternatively, dollar signs can be manually typed in front
of the column letter and row number.

4. Press the Enter key.

5. Click cell B3.

6. Click Home ⇒ Clipboard ⇒ Copy.

7. Select the range B4:B11.

8. Click Home ⇒ Clipboard ⇒ Paste.

Figure 69 shows the percent of total formula with an absolute ref-


erence added to D12. Notice that in cell B4, the cell reference remains
D12 instead of changing to D13 as shown in Figure 68. Also, notice
96 mathematical computations

that the percentages are being calculated in the rest of the cells in the
column and the divide-by-zero error is eliminated.

Figure 69: Adding an Absolute Reference to a Cell Reference in a Formula

Skill Refresher
Absolute References

• Click in front of the column letter of a cell reference


in a formula or function that should not be altered
when the formula or function is pasted into a new
cell location.
• Press the F4 key or type a dollar sign ($) in front of
the column letter and row number of the cell refer-
ence.

2.2.3 The Count Function

The next function that will be added to the Budget Detail worksheet is
the COUNT function. The COUNT function is used to determine how
many cells in a range contain a numeric entry. The COUNT function
will not work for counting text or other non-numeric entries. For the
Budget Detail worksheet, the COUNT function will be used to count
the number of items that are planned in Annual Spend (Column D).
The following explains how the COUNT function is added to the
worksheet by using the function list.
2.2 statistical functions 97

1. Click cell D13 in the Budget Detail worksheet.

2. Type an equal sign =.

3. Type the letter C.

4. Click the down arrow on the scroll bar of the function


list (see Figure 70) and find the word COUNT.

5. Double click the word COUNT from the function list.

6. Click D3 and drag the mouse to D11 to select that range.

7. Type a closing parenthesis ) and then press the Enter key,


or simply press the Enter key and Excel will close the
function automatically.

Figure 70 shows the function list box that appears after typing
the first letter of a function. The function list provides an alterna-
tive method for adding a function to a worksheet. Many users find it
easier to select a function from a list rather than try to remember the
function’s name.

Figure 70: Using the Function List to Add the COUNT Function

Figure 71 shows the output of the COUNT function after pressing


the Enter key. The function counts the number of cells in the range
D3:D11 that contain a numeric value. The result of 9 indicates that
there are 9 categories planned for this budget.
98 mathematical computations

Figure 71: Completed COUNT Function in the Budget Detail Worksheet

2.2.4 The Average Function

The next function to be added to the Budget Detail worksheet is the


AVERAGE function. This function is used to calculate the arithmetic
mean (often called the “average”) for a group of numbers. The Budget
Detail worksheet will use the function to calculate the average of the
values in the Annual Spend column. This function will be added to
the worksheet by using Function Library. The following steps explain
how this is accomplished.

1. Click cell D14 in the Budget Detail worksheet.

2. Click Formulas ⇒ Function Library ⇒ More Functions.

3. Place the mouse pointer over the Statistical option from


the drop-down list of options (see Figure 72).

4. Click the AVERAGE function name from the list of func-


tions that appear in the menu. This opens the Function
Arguments dialog box (see Figure 73).

5. Click the Collapse Dialog button for Number1 in the


Function Arguments dialog box.

6. Select the range D3:D11.

7. Click the Expand Dialog button in the Function Argu-


ments dialog box (see Figure 74). Simply pressing the
Enter key will get the same result.

8. Click the OK button on the Function Arguments dialog


box. This adds the AVERAGE function to the worksheet.
2.2 statistical functions 99

Figure 72 illustrates how a function is selected from the Function


Library.

Figure 72: Selecting the AVERAGE Function from the Function Library

Figure 73 shows the Function Arguments dialog box. This appears


after a function is selected from the Function Library. The Collapse
Dialog button is used to hide the dialog box so a range of cells can be
highlighted on the worksheet and then added to the function.

Figure 73: Function Arguments Dialog Box

Figure 74 shows how a range of cells can be selected from the Func-
tion Arguments dialog box once it has been collapsed.
100 mathematical computations

Figure 74: Selecting a Range from the Function Arguments Dialog Box

Figure 75 shows the Function Arguments dialog box after the cell
range is defined for the AVERAGE function. The dialog box shows
the result of the function before it is added to the cell location. This
means that the function output is available before it is added to the
worksheet to determine whether it makes sense.

Figure 75: Function Arguments Dialog Box after a Cell Range Is Defined for
a Function

Figure 76 shows the completed AVERAGE function in the Budget


Detail worksheet. The output of the function shows that on average
$1, 994 will be spent for each of the categories listed in Column A of
the budget. This average spend calculation per category can be used
as an indicator to determine which categories are costing more or less
than the average budgeted spend dollars.
2.2 statistical functions 101

Figure 76: Completed AVERAGE Function

2.2.5 The Max and Min Functions

The final two statistical functions that will be added to the Budget
Detail worksheet are the MAX and MIN functions. These functions
identify the highest and lowest values in a range of cells. The fol-
lowing steps explain how to add these functions to the Budget Detail
worksheet.

1. Click cell D15 in the Budget Detail worksheet.

2. Type an equal sign =.

3. Type the word MIN.

4. Type an open parenthesis (.

5. Select the range D3:D11.

6. Type a closing parenthesis ) and press the Enter key, or


simply press the Enter key and Excel will close the func-
tion automatically. The MIN function produces an out-
put of $1, 200, which is the lowest value in the Annual
Spend column (see Figure 77).

7. Click cell D16.

8. Type an equal sign =.

9. Type the word MAX.

10. Type an open parenthesis (.

11. Select the range D3:D11.


102 mathematical computations

12. Type a closing parenthesis ) and press the Enter key, or


simply press the Enter key and Excel will close the func-
tion automatically. The MAX function produces an out-
put of $3, 500. This is the highest value in the Annual
Spend column (see Figure 78).

Figure 77: MIN Function Added to the Budget Detail Worksheet

Figure 78: MAX Function Added to the Budget Detail Worksheet


2.2 statistical functions 103

Skill Refresher
Statistical Functions

• Type an equal sign =.


• Type the function name followed by an open paren-
thesis ( or double click the function name from the
function list.
• Select a range on a worksheet or click individual cell
locations followed by commas.
• Type a closing parenthesis ) and press the Enter key
or simply press the Enter key to close the function.

2.2.6 Copy and Paste Formulas (Pasting Without Formats)

As shown in Figure 78, the COUNT, AVERAGE, MIN, and MAX func-
tions are summarizing the data in the Annual Spend column. There
is also space to copy and paste these functions under the LY Spend
column. This allows a comparison between what was spent last year
and what is expected to be spent this year. Normally, functions would
be simply copied/pasted into the range E13:E16. However, notice the
double-line style border that was used around the perimeter of the
range B13:E16. If a regular Paste command is used the double line on
the right side of the range E13:E16 would be replaced with a single
line since the format for the copied cells will be used. Therefore, one
of the Paste Special commands will be used to paste only the functions
without any of the cell formatting. This is accomplished through the
following steps.

1. Select D13:D16 in the Budget Detail worksheet.

2. Click Home ⇒ Clipboard ⇒ Copy.

3. Click cell E13.

4. Click Home ⇒ Clipboard ⇒ Paste Down Arrow.

5. Click the Formulas option from the drop-down list of


buttons (see Figure 79).

Figure 79 shows the list of buttons that appear when the down ar-
row is clicked below the Paste button in the Home tab of the Ribbon.
One thing to note about these options is that they can be previewed
before they are applied by hovering the mouse pointer over the op-
tions, one at a time. As shown in the figure, when the mouse pointer
is placed over the Formulas button, the function appearance is visible
before selecting. Notice that the double-line border does not change
104 mathematical computations

when this option is previewed, which is why this selection is made


instead of the regular Paste option.

Figure 79: Paste Formulas Option

Skill Refresher
Paste Formulas

• Click a cell location containing a formula or function.


• Click Home ⇒ Clipboard ⇒ Copy.
• Click the cell location or cell range where the formula
or function will be pasted.
• Click Home ⇒ Clipboard ⇒ Paste Down Arrow ⇒ For-
mulas.

2.2.7 Sorting Data (Multiple Levels)

The Budget Detail worksheet shown in Figure 79 is now producing


several mathematical outputs through formulas and functions. The
outputs allow analysis of the details and identify trends as to how
money is being budgeted and spent. Before drawing conclusions from
this worksheet, it will be sorted based on the Percent of Total column.
Sorting is a powerful tool that enables analysis of key trends in any
data set. Sorting will be covered thoroughly in another chapter but
will be briefly introduced here. For the purposes of the Budget Detail
worksheet, multiple levels for the sort order must be used. This is
accomplished through the following steps.
2.2 statistical functions 105

1. Select A2:F11 in the Budget Detail worksheet.

2. Click Data ⇒ Sort & Filter ⇒ Sort. This opens the Sort
dialog box, as shown in Figure 80.

3. Click the down arrow next to the Sort by box.

4. Click the Percent of Total option from the drop-down


list.

5. Click the down arrow next to the sort Order box.

6. Click the Largest to Smallest option.

7. Click the Add Level button. This allows a second level


to be set in case there are any duplicate values in the
Percent of Total column.

8. Click the down arrow next to the Then by box.

9. Select the LY Spend option. Leave the Sort Order as


Smallest to Largest

10. Click OK at the bottom of the Sort dialog box.

11. Save the CH2-Personal Budget file.

Figure 80: Sort Dialog Box

Figure 81 shows the Budget Detail worksheet after it has been


sorted. Notice that there are three identical values in the Percent of
Total column, which is why a second sort level had to be created
for this worksheet. The second sort level arranges the values of 8.4%
based on the values in the LY Spend column in ascending order. As
106 mathematical computations

many sort levels as necessary may be selected for the data contained
in a worksheet.

Figure 81: Budget Detail Worksheet after Sorting

Skill Refresher
Sorting Data (Multiple Levels)

• Select a range of cells to be sorted.


• Click Data ⇒ Sort & Filter ⇒ Sort.
• Select a column from the Sort by drop-down list in the
Sort dialog box.
• Select a sort order from the Order drop-down list in
the Sort dialog box.
• Click the Add Level button in the Sort dialog box.
• Add as many levels as necessary.
• Click the OK button on the Sort dialog box.

Now that the Budget Detail worksheet is sorted, a few key trends
can be easily identified. The worksheet clearly shows that the top
three categories as a percentage of total budgeted spending for the
year are Taxes, Household Utilities, and Food. All three categories are ne-
cessities (or realities) of life and typically require a significant amount
of income for most households. The Percent Change column indicates
how the planned spending is expected to change from last year. This
is perhaps the most important column on the worksheet because it
shows whether the budget plan is realistic. Notice that there are no
2.2 statistical functions 107

changes planned for Taxes and Household Utilities. While Taxes can
change from year to year, it is not too difficult to predict what they
will be. In this case, the assumption is that there are no changes to
the tax costs for the budget. The plan also includes no change in
Household Utilities. While these costs can fluctuate from year to year,
measures can be taken to reduce costs, such as using less electric-
ity, turning off heat when no one is in the house, keeping track of
the wireless minutes to avoid overage charges, and so on. As a result,
there is no change in planned spending for Household Utilities because
any rate increases will be offset with a decrease in usage. The third
item that is planned to not change is Insurance. Insurance policies for
cars and homes can change, but as is true for taxes, the changes are
predictable. Therefore, it is reasonable to assume no changes in the
insurance policy.
The first big change that is noticeable in the worksheet is the Food
and Entertainment categories in Rows 5 and 6 (see the category defi-
nitions in Table 3). The Percent Change column indicates that there is
an 11.1% decrease in Entertainment spending and an 11.1% increase
in Food spending. This is logical because if the plan is to eat in restau-
rants less frequently then eating at home will be more frequent. Al-
though this makes sense in theory, it may be hard to do in practice.
Dinners and parties with friends may be tough to turn down. How-
ever, the entire process of maintaining a budget is based on discipline,
and it certainly takes a significant amount of discipline to plan targets
and stick to them.
A few other points to note are the changes in the Gasoline and Va-
cation categories. Commuting to school or work means that the price
of gas can have a significant impact on the budget. It is important to
be realistic in the budget if gas prices are increasing. To compensate
for the increased spending for gas, the spending plan for vacations
has been reduced by 25%. Budgeting often requires a certain degree
of creativity. Although the Vacation budget has been reduced, there is
still money that can be set aside to make plans for long weekends or
other breaks.
Finally, the budget shows a decrease in Miscellaneous spending of
19.8%. This was defined as a group containing several expenses, such
as textbooks, school supplies, software updates, and so on (see Ta-
ble 3). This spending may be able to be reduced if items like online
textbooks can be used. This reduction in spending can free up funds
for Clothes, a spend category that has increased by 20%. This Personal
Budget workbook will be further developed in Section 2.3: Functions
for Personal Finance.
108 mathematical computations

Key Take-Aways

Statistical Functions

• Statistical functions are used when a mathematical


process is required for a range of cells, such as sum-
ming the values in several cell locations. For these
computations, functions are preferable to formulas be-
cause adding many cell locations one at a time to a
formula can be very time-consuming.
• Statistical functions can be created using cell ranges
or selected cell locations separated by commas. Make
sure to use a cell range (two cell locations separated
by a colon) when applying a statistical function to a
contiguous range of cells.
• To prevent Excel from changing the cell references
in a formula or function when they are pasted to a
new cell location, use an absolute reference. Do this
by placing a dollar sign ($) in front of the column let-
ter and row number of a cell reference.
• The #DIV/0 error appears if a formula attempts to di-
vide a constant or the value in a cell reference by zero.
• The Paste Formulas option is used to paste formulas
without any formatting treatments into cell locations
that have already been formatted.
• Set multiple levels, or columns, in the Sort dialog box
when sorting data that contains several duplicate val-
ues.

2.3 functions for personal finance

Learning Objectives

• Understand the fundamentals of loans and leases.


• Use the PMT function to calculate monthly mortgage
payments on a house.
• Use the PMT function to calculate monthly lease pay-
ments for an automobile.
• Learn how to summarize data in a workbook by using
worksheet links to create a summary worksheet.

In this section, the Personal Budget workbook will continue to be de-


veloped. Notable items that are missing from the Budget Detail work-
sheet are payments for a car or a home. This section demonstrates
2.3 functions for personal finance 109

Excel functions used to calculate lease payments for a car and mort-
gage payments for a house.

2.3.1 The Fundamentals of Loans and Leases

One of the functions to be added to the Personal Budget workbook


is the PMT function. This function calculates the payments required
for a loan or a lease. However, before demonstrating this function, it
is important to cover a few fundamental concepts about loans and
leases.
A loan is a contractual agreement in which money is borrowed
from a lender and paid back over a specific period. The amount of
money that is borrowed from the lender is called the principal of the
loan. The borrower is usually required to pay the principal of the loan
plus interest. When the borrowed money is to buy a house, the loan is
referred to as a mortgage since the house being purchased also serves
as collateral to ensure payment. In other words, the bank can take
possession of the house if the borrower fails to make loan payments.
Table 7 defines several key terms related to loans and leases.

Term Definition
Any item of value that is used to secure a loan to ensure
Collateral
payments to the lender.
The amount of cash paid toward the purchase of a house.
Down
A down payment of 20% means that 20% of the house’s
Payment
cost is being paid in cash and the rest is being borrowed.
Interest The interest that is charged to the borrower as a cost for
Rate borrowing money.
Mortgage A loan where property is put up for collateral.
Principle The amount of money that has been borrowed.
Residual The estimated selling price of a vehicle at a future point
Value in time.
Term The amount of time to repay a loan.

Table 7: Key Terms for Loans and Leases

Figure 82 shows an example of an amortization table for a loan. A


lender is required by law to provide borrowers with an amortization
table when a loan contract is offered. The table in the figure shows
how the payments of a loan would work if $100, 000 is borrowed
from a lender to be paid back in 10 years at an interest rate of 5%.
Notice that each payment is part interest and part principal. Each year,
the amount of interest paid to the bank decreases and the amount
of money applied against the principal increases since the bank is
charging interest on the amount of principal that has not been paid.
As the amount of principal decreases, the interest rate is applied to a
110 mathematical computations

lower number, which reduces the interest charges. Finally, the figure
shows that the sum of the values in the Interest Payment column is
$29, 505. This is how much it costs to borrow this money over 10 years.
It is important to note that to simplify this example, the payments
were calculated on an annual basis. However, most loan payments
are made monthly.

Figure 82: Example of an Amortization Table

A lease is a contract in which a lessee uses an asset such as a car


or a piece of equipment and agrees to make regular payments to the
lessor. When a car is leased, the manufacturer or a leasing company
retains ownership of the vehicle and the customer agrees to make
regular payments for a specific period. The amount of the payments
depends on the price of the car, the term of the lease contract, and the
car’s expected residual value at the end of the lease. The calculation
of lease payments is like the calculation of loan payments; however,
payments for a car lease is intended to cover only the value of the
car that is used. For example, suppose a car is leased for $25, 000 for
4 years at an interest rate of 5%. If the residual value of the car is
$10, 000 then it will lose $15, 000 of its value over 4 years. Another
way to state this is that the car will depreciate $15, 000. A lease will
be structured so that the payments cover this $15, 000 in depreciation.
However, the interest charges will be based on the purchase price
2.3 functions for personal finance 111

of $25, 000. Because these are common transactions, the next section
uses Excel functions to calculate payments for both leasing a car and
buying a home.

2.3.2 The Pmt (Payment) Function for Loans

Mortgage payments are a major component of a household budget.


In Excel, mortgage payments are conveniently calculated through the
PMT (payment) function. This function is more complex than the sta-
tistical functions covered in Section 2.2: Statistical Functions. Statisti-
cal functions only require a range of cells, known as the argument.
With the PMT function, a series of arguments must be accurately de-
fined for the function to produce a reliable output. Table 8 lists the
arguments for the PMT function. It is helpful to review the key loan
and lease terms in Table 7 before reviewing the PMT function argu-
ments.

Argument Definition
This is the interest rate the lender is charging the
borrower. The interest rate is usually quoted in annual
Rate
terms, so it must be divided by 12 to calculate monthly
payments.
The argument letters stand for “Number of Periods.”
This is the term of the loan, which is the amount of time
Nper allowed to repay the bank. This is usually quoted in
years, so it must be multiplied by 12 to calculate
monthly payments.
The argument letters stand for “Present Value.” This is
the principal of the loan or the amount of money that is
Pv borrowed. When defining this argument, a minus sign
must precede the cell location or value. For leases, this
argument is used for the price of the item being leased.
The argument letters stand for “Future Value.” The
brackets around the argument indicate that it is not
always necessary to define it. It is used if there is a
[Fv]
lump-sum payment that will be made at the end of the
loan terms. This is also used for the residual value of a
lease. If it is not defined, Excel will assume that it is zero.
This argument can be defined with either a 1 or a 0. The
number 1 is used if payments are made at the beginning
of each period. A 0 is used if payments are made at the
[Type] end of each period. The argument is in brackets because
it does not have to be defined if payments are made at
the end of each period. Excel assumes that this
argument is 0 if it is not defined.

Table 8: Arguments for the PMT Function


112 mathematical computations

By default, the result of the PMT function in Excel is shown as a


negative number. This is because it represents an outgoing payment.
When making a mortgage or car payment, money is being paid out
of a bank account. This number can be left negative or converted to
a positive number depending on the way that it is being used. In
the following assignments, the payments calculated using the PMT
function will be made positive to make them easier to work with. To
do this, when defining the PV argument (amount of money borrowed)
in the PMT dialog box, a minus sign must precede the cell location
or value (see the PV argument in Figure 85).
The PMT function will be used in the Personal Budget workbook to
calculate the monthly mortgage payments for a house. These calcu-
lations will be made in the Mortgage Payments worksheet and then
displayed in the Budget Summary worksheet through a cell reference
link. So far, several methods have been demonstrated for adding func-
tions to a worksheet. The following steps explain a new method using
the Insert Function command for adding the PMT function.

1. Click the Mortgage Payments worksheet tab.

2. Click cell B5.

3. Click Formulas ⇒ Function Library ⇒ Insert Function


(see Figure 83). This opens the Insert Function dialog box,
which can be used for searching all functions in Excel.

4. In the Search for a function: input box at the top of the In-
sert Function dialog box, type payments (see Figure 84).

5. Click Go in the upper right side of the Insert Function


dialog box. This adds all the Excel functions that match
the description in the Select a function: box to the lower
half of the Insert Function dialog box (see Figure 84).

6. Scroll down to find and click the PMT option in the Se-
lect a function: box in the lower half of the Insert Function
dialog box.

7. Click OK at the lower right side of the Insert Function


dialog box. This will open the Function Arguments dialog
box.
2.3 functions for personal finance 113

Figure 83: Mortgage Payments Worksheet

Figure 84: Insert Function Dialog Box


114 mathematical computations

1. Click the Collapse Dialog button next to the Rate argu-


ment in the Function Arguments dialog box. This will be
the first argument defined for the function (see Figure
85).

2. Click cell B3 on the worksheet. This is the rate being


charged on the loan.

3. Type a forward slash / for division.

4. Type the number 12. Since the goal is to calculate the


monthly payments for the loan, the rate, which is stated
in annual terms, must be divided by 12 to convert the
annual rate to a monthly rate.

5. Press the Enter key. This returns the Function Arguments


dialog box to its expanded form. Notice that that the
Rate argument is now defined.

6. Click the Collapse Dialog button next to the Nper argu-


ment in the Function Arguments dialog box. This is the
second argument to be defined in the function.

7. Click cell B4 on the worksheet. This is the term or the


amount of time to repay the loan.

8. Type an asterisk * for multiplication.

9. Type the number 12. Since the goal is to calculate the


monthly payments for the loan, the terms of the loan
must be multiplied by 12 to converts the terms from
years to months.

10. Press the Enter key. This returns the Function Arguments
dialog box to its expanded form. Notice that the Nper
argument is now defined.

11. Click the Collapse Dialog button next to the Pv argu-


ment in the Function Arguments dialog box. This is the
third argument to be defined in the function.

12. Type a minus sign -. When defining the Pv argument


of the PMT function, the cell location or value must be
preceded with a minus sign.

13. Click cell B2 on the worksheet. This is the principal of


the loan.

14. Press the Enter key. Notice that the Rate, Nper, and Pv
arguments are all defined for the function.
2.3 functions for personal finance 115

15. Click OK at the bottom of the Function Arguments dialog


box. The function will now be placed into the worksheet.
Since there are no lump sum payments at the end of the
loan, there is no need to define the Fv argument. Also,
since the monthly mortgage payments will be made at
the end of each month, there is no need to define the
Type argument.

Keyboard Shortcuts

Functions

• Insert Function: Hold the Shift key while pressing the


F3 key.
• Function Arguments: After the equal sign = and func-
tion name are typed into cell a location, hold down
the Ctrl key and press the letter A on the keyboard.

Figure 85 shows the completed Function Arguments dialog box for


the PMT function. Notice that the dialog box shows the values for the
Rate and Nper arguments. The Rate is divided by 12 to convert the
annual interest rate to a monthly interest rate. The Nper argument is
multiplied by 12 to convert the terms of the loan from years to months.
Finally, the dialog box provides a definition for each argument, which
appears when the input box for the argument is clicked.

Figure 85: Function Arguments Dialog Box for the PMT Function

Figure 86 shows the final appearance of the Mortgage Payments


worksheet after the PMT function is added. The result of the func-
tion in cell B5 will be displayed in the Budget Summary worksheet.
116 mathematical computations

Figure 86: Mortgage Payments Worksheet with the PMT Function

Integrity Check

Comparable Arguments for PMT Function

When using functions such as PMT, make sure the ar-


guments are defined in comparable terms. For example,
if monthly payments of a loan are being calculated, make
sure both the Rate and Nper argument are expressed in
terms of months. The function will produce an erroneous
result if one argument is expressed in years while the other
is expressed in months.

2.3.3 The Pmt (Payment) Function for Leases

In addition to calculating the mortgage payments for a home, the


PMT function will be used in the Personal Budget workbook to calcu-
late the lease payments for a car. The details for the lease payments
are found in the Car Lease Payments worksheet. Like the statistical
functions, PMT function can be typed directly into a cell or the Insert
Function button can be used. However, it is important to know the def-
initions for each argument of the function and understand how these
arguments need to be defined based on the objective. The terms for
loans and leases are in Table 7 and the definitions for the arguments
of the PMT function are in Table 8. The following steps explain how
the PMT function is added to the Personal Budget workbook to calcu-
late the lease payments for a car.
2.3 functions for personal finance 117

1. Click cell B6 in the Car Lease Payments worksheet.

2. Click Formulas ⇒ Function Library ⇒ Financial ⇒ PMT.


This will open the PMT Function Arguments dialog box
(see Figure 87).

3. Click the Collapse Dialog button next to the Rate argu-


ment in the PMT Function Arguments dialog box. This
will be the first argument defined for the monthly car
lease payment.

4. Click cell B4. This is the interest rate being charged for
the lease.

5. Type the forward slash / for division.

6. Type the number 12. Since the goal is to calculate


monthly lease payments, divide the interest rate by 12
to convert the annual rate to a monthly rate.

7. Press the Enter key. This returns the Function Arguments


dialog box to its expanded form. Notice that the Rate
argument is now defined.

8. Click the Collapse Dialog button next to the Nper argu-


ment in the Function Arguments dialog box. This is the
second argument defined in the function.

9. Click cell B5. This is the term or the length of time for
the lease contract. Since the term is already expressed
in months, just reference cell B5 and move to the next
argument. If the term was defined in years instead of
months, it would need to be multiplied by 12 to convert
the years to months.

10. Press the Enter key. This returns the Function Arguments
dialog box to its expanded form. Notice that the Nper
argument is now defined.

11. Click the Collapse Dialog button next to the Pv argu-


ment in the Function Arguments dialog box. This is the
third argument defined in the function.

12. Type a minus sign -. Remember that cell locations or


values used to define the Pv argument must be preceded
with a minus sign.

13. Click cell B2 on the worksheet, which is the price of the


car.
118 mathematical computations

14. Press the Enter key. Notice that the Rate, Nper, and Pv
arguments are all defined for the function.

15. Click the Collapse Dialog button next to the Fv argument


in the Function Arguments dialog box. This is the fourth
argument defined in the function.

16. Click cell B3 on the worksheet. This is the residual value


of the car. Note that cell location and values used to de-
fine the Fv argument are NOT preceded by a minus sign.

17. Press the Enter key. Notice that the Rate, Nper, Pv and
Fv arguments are all defined for the function.

18. Click the Collapse Dialog button next to the Type argu-
ment in the Function Arguments dialog box. This is the
fifth and last argument defined in the function.

19. Type the number 1, which assumes that the lease pay-
ments will be due at the beginning of each month. For
payments made at the beginning of the period, a 1 is en-
tered in the Type argument box and for payments made
at the end of the period, a 0 is entered in the Type argu-
ment box.

20. Press the Enter key. Notice that the Rate, Nper, Pv, Fv
and Type arguments are defined for the function (see
Figure 87).

21. Click OK at the bottom of the Function Arguments dialog


box. The function will now be placed into the worksheet.

Figure 87 shows how the the completed Function Arguments dialog


box for the PMT function car lease should appear before pressing the
OK button.
2.3 functions for personal finance 119

Figure 87: Function Arguments Dialog Box for the PMT Lease Function

Figure 88 shows the result of the PMT function for the car lease.
The monthly payments for this lease are $206.56. This monthly pay-
ment will be displayed in the Budget Summary worksheet.

Figure 88: Results of the PMT Function in the Car Lease Payments Work-
sheet
120 mathematical computations

Skill Refresher
PMT Function

• Type an equal sign =.


• Type the letters PMT followed by an open parenthesis,
or double click the function name from the function
list.
• Define the Rate argument with a cell location that con-
tains the rate being charged by the lender for the loan
or lease. If the interest rate given is an annual rate,
divide it by 12 to convert it to a monthly rate.
• Define the Nper argument with a cell location that
contains the amount of time to repay the loan or lease.
If the amount of time is in years, multiply it by 12 to
convert it to number of months.
• Define the Pv argument with a cell location that con-
tains the principal of the loan or the price of the item
being leased. Cell locations or values used for this ar-
gument must be preceded by a minus sign.
• Define the Fv argument with a cell location that con-
tains the residual value of the item being leased or the
lump sum payment for a loan.
• Define the Type argument with a 1 if payments are
made at the beginning of each period or 0 if payments
are made at the end of each period.
• Type a closing parenthesis ).
• Press the Enter key.

2.3.4 Linking Worksheets (Creating a Summary Worksheet)

So far, cell references in formulas and functions allow Excel to pro-


duce new outputs when the values in the cell references are changed.
Cell references can also be used to display values or the outputs of
formulas and functions in cell locations on other worksheets. This is
how data will be displayed on the Budget Summary worksheet in the
Personal Budget workbook. Outputs from the formulas and functions
that were entered in the Budget Detail, Mortgage Payments, and Car
Lease Payments worksheets will be displayed on the Budget Summary
worksheet using cell references. The following steps explain how this
is accomplished.

1. Click cell C3 in the Budget Summary worksheet.

2. Type an equal sign =.


2.3 functions for personal finance 121

3. Click the Budget Detail worksheet tab.

4. Click cell D12 on the Budget Detail worksheet.

5. Press the Enter key. The output of the SUM function in


cell D12 on the Budget Detail worksheet will be dis-
played in cell C3 on the Budget Summary worksheet.

Figure 89 shows how the cell reference appears in the Budget Sum-
mary worksheet. Notice that the cell reference D12 is preceded by the
Budget Detail worksheet name enclosed in apostrophes followed by
an exclamation point (’Budget Detail’!) This indicates that the value
displayed in the cell is referencing a cell location in the Budget Detail
worksheet.

Figure 89: Cell Reference Showing the Total Expenses in the Budget Sum-
mary Worksheet

As shown in Figure 89, the Budget Summary worksheet is designed


to show the expense budget for the mortgage payments and the auto
lease payments. However, recall that the PMT function was used to
calculate the monthly payments. In the Budget Summary worksheet,
the total annual payments must be shown. As a result, create a for-
mula that references cell locations in the Mortgage Payments and Car
Lease Payments worksheets and then multiply that amount by 12. The
following steps explain how this is accomplished.

1. Click cell C4 in the Budget Summary worksheet.

2. Type an equal sign =.

3. Click the Mortgage Payments worksheet tab.


122 mathematical computations

4. Click cell B5 in the Mortgage Payments worksheet.

5. Type an asterisk * for multiplication.

6. Type the number 12. This multiplies the monthly pay-


ments by 12 to calculate the total payments required for
the year. The formula in the formula bar should read:
=’Mortgage Payments’!B5*12

7. Press the Enter key. The value of multiplying the


monthly mortgage payments by 12 is now displayed on
the Budget Summary worksheet.

8. Click cell C5 on the Budget Summary worksheet.

9. Type an equal sign =.

10. Click the Car Lease Payments worksheet tab.

11. Click cell B6 in the Car Lease Payments worksheet.

12. Type an asterisk * for multiplication.

13. Type the number 12. This multiplies the monthly lease
payments by 12 to calculate the total payments required
for the year.

14. Press the Enter key. The value of multiplying the


monthly lease payments by 12 is now displayed on the
Budget Summary worksheet.

Figure 90 shows the results of creating formulas that reference


cell locations in the Mortgage Payments and Car Lease Payments work-
sheets.
2.3 functions for personal finance 123

Figure 90: Formulas Referencing Cells in Mortgage Payments and Car Lease
Payments Worksheets

Other formulas and functions can be added to the Budget Summary


worksheet to calculate the difference between the total spend dollars
vs. the total net income in cell D2. The following steps explain how
this is accomplished.

1. Click cell D6 in the Budget Summary worksheet.

2. Type an equal sign =.

3. Type the function name SUM followed by an open


parenthesis (.

4. Select the range C3:C5.

5. Type a closing parenthesis ) and press the Enter key or


simply press the Enter key to close the function. The total
for all annual expenses now appears on the worksheet.

6. Click cell D7 on the Budget Summary worksheet. Enter


a formula to calculate Net Change in Cash in this cell.

7. Type an equal sign =.

8. Click cell D2.

9. Type a minus sign - and then click cell D6.

10. Press the Enter key. This formula produces an output


of $1, 942, indicating the income is greater than the total
expenses.
124 mathematical computations

Figure 91 shows the results of the formulas that were added to the
Budget Summary worksheet. The output for the formula in cell D7
shows that the net income exceeds total planned expenses by $1, 942.
Overall, having the income exceed expenses is a good thing because
the surplus can be saved for future spending needs or unexpected
events.

Figure 91: Formulas Added to Show Income Is Greater Than Expenses

Now, a few formulas can be added that calculate both the spend-
ing rate and the savings rate as a percentage of net income. These
formulas require the use of absolute references, which were covered
earlier in this chapter. The following steps explain how to add these
formulas.

1. Click cell E6 in the Budget Summary worksheet.

2. Type an equal sign =.

3. Click cell D6.

4. Type a forward slash / for division and then click D2.

5. Press the F4 key. This adds an absolute reference to cell


D2.

6. Press the Enter key. The result of the formula shows that
total expenses consume 94.1% of the net income.

7. Click cell E6.

8. Place the mouse pointer over the Auto Fill Handle.


2.3 functions for personal finance 125

9. When the mouse pointer turns to a black plus sign, left


click and drag down to cell E7 to copy and paste the
formula into cell E7.

10. Save the CH2-Personal Budget file.

11. Compare the worksheet with the self-check answer key


(CH2-Personal Budget Solution) and then close and sub-
mit the CH2-Personal Budget workbook as directed by
the instructor.

Figure 92 shows the output of the formulas calculating the spend-


ing rate and savings rate as a percentage of net income. The absolute
reference shown for cell D2 prevents the cell from changing when the
formula is copied from cell E6 and pasted into cell E7. The results of
the formula show that the current budget allows for a savings rate of
5.9%, which is a good savings rate.

Figure 92: Calculating the Savings Rate


126 mathematical computations

Key Take-Aways

Functions for Personal Finance

• The PMT function can be used to calculate the


monthly mortgage payments for a house or the
monthly lease payments for a car.
• When using the PMT function, each argument must
be separated by a comma.
• To calculate the monthly payment for a loan using the
PMT function, the Rate and Nper arguments must
be defined in terms of months. The Rate should be
divided by 12 to convert it from an annual rate to a
monthly rate. The Nper should be multiplied by 12 to
convert the term of the loan from years to months.
• The PMT function produces a negative output if the
Pv argument is not preceded by a minus sign. For
the purposes of this textbook, a minus sign will be
entered before the Pv argument in the PMT dialog
box.

2.4 preparing to print

Learning Objectives

• Review and learn new cell formatting techniques.


• Understand how to modify page scaling and margins.
• Create custom headers and footers to automatically
update information.

This section reviews some of the formatting techniques covered in


Chapter 1, fundamental skills, as well as introduces new tech-
niques. A two-page worksheet will be previewed and then page setup
options will be adjusted to present the data in a professional manner.
A new data file will be used for this section.
2.4 preparing to print 127

Figure 93: Finished Prepare to Print Worksheet in Print Preview

2.4.1 Formatting the Worksheet

Sales data for a bakery supply company needs to be formatted in a


professional manner. This worksheet will be printed and presented
to investors, so it needs to be prepared for printing as well. Figure 93
shows how the finished worksheet will appear in Print Preview.

1. Click File ⇒ Open ⇒ Browse.

2. Navigate to CH2-PTP Data and click Open.

3. Click File ⇒ Save As ⇒ Browse.

4. Navigate to the desired file location and save it with the


name CH2-Sales Data.
128 mathematical computations

5. To change the font of the entire worksheet, click the Se-


lect All button in the top left corner of the worksheet
grid (see Figure 94).

6. Change the font to Calibri, Size 12.

Figure 94: Select All button

Using the skills learned in Chapter 1, fundamental skills,


page 3, make the following formatting changes.

1. A1:H1 — Merge and Center; font is 14 point bold; fill


color is Blue, Accent 1, Darker 25%; font color is White

2. A2:H2 — Merge and Center; font is 12-point bold italic;


fill color is Blue, Accent 1, Lighter 40%; font color is Black

3. A5:H5 — font is bold; fill color is Blue, Accent 1, Lighter


40%; font color is Black

4. C5:H5 — Center align

5. A15:H15 — Apply Top Border to the cells; format text


as bold

6. C6:H6 and C15:H15 — Apply Accounting Number for-


mat with 0 decimal places

7. C7:H14 — Apply Comma style with 0 decimal places

8. A6:A14 (salespeople’s names) — Home ⇒ Alignment ⇒


Increase Indent. This will indent the text from the cell
border.
2.4 preparing to print 129

Figure 95: Increase Indent button

2.4.2 Using Page Setup Options

Once the worksheet is professionally formatted, look at it in Print


Preview to see how the pages will print.

1. Click File to open the Backstage view.

2. Click Print.

3. Notice that the worksheet is currently printing on two


pages, with the page breaking between the April and
May columns. To fix this problem, first change the left
and right margins while still in Print Preview.

4. Click Page Setup ⇒ Margins Tab (The Page Setup link


is at the bottom of the settings column, see Figure 96).

5. Type in 0.5 for the Left Margin and 0.5 for the Right
Margin.

6. Click OK. Changing the margins brought the May col-


umn onto the same page, but the June column is still on
a separate page. Use Page Scaling to fix this while still
in Print Preview.

7. Click the Scaling drop-down arrow in the Settings sec-


tion (it is the last setting and, by default, is set for No
Scaling, see Figure 96).

8. Select Fit All Columns on One Page.

9. Exit Backstage View by clicking the circled arrow at the


top right corner of the screen.
130 mathematical computations

Figure 96: Settings section of Print Preview

2.4.3 Creating a Footer Using Page Setup

Now that the entire worksheet is printing on one page, add a footer
with information about the date the file was printed along with the
filename. Chapter 1, fundamental skills, page 3, demonstrated
how to create headers and footers using the Insert ribbon tab. Headers
and footers can also be created using the Custom Header/Footer dialog
box.

1. Click Page Layout ⇒ Page Setup ⇒ Dialog Box


Launcher. (Note, the Dialog Box Launcher is a small icon
that looks like an arrow in a box found in the lower right
corner of the Page Setup group.)

2. Click the Header/Footer tab in the Page Setup dialog box.


A window similar to Figure 97 will appear.
2.4 preparing to print 131

Figure 97: Page Setup Dialog Box

3. Click the Custom Footer button. The Footer dialog box


will appear (see Figure 98).

Figure 98: Footer Dialog Box

1. Click in the Left section box and type Printed on.

2. Making sure to leave a space after the word on, click the
Insert Date button.

3. Click in the Right section box and type Filename:.

4. Making sure to leave a space after the colon, click the


Insert File Name button.

5. The Footer dialog box should look like Figure 99.


132 mathematical computations

6. Click the OK button. Click OK again to close the Page


Setup dialog box.

7. Go to File ⇒ Print to see that the current date and file


name are displayed in the footer.

8. Exit Backstage View.

9. Save the CH2-Sales Data file.

10. Compare the worksheet with the self-check answer key


(CH2-Sales Data Solution) and then close and submit
the CH2-Sales Data workbook as directed by the instruc-
tor.

Figure 99: Completed Custom Footer Dialog Box

Key Take-Aways

Save

• It is important to always check workbooks in Print


Preview to ensure that the data is printed in a profes-
sional and easy to read manner.
• Adjust margins and page scaling as needed to keep
columns of data together on one page if possible.
• Use headers and footers to display information in the
top and bottom margins of the printed worksheet.
• Use the Insert buttons to insert changing information,
such as dates and file names, instead of typing them
in directly.

2.5 chapter practice

2.5.1 Financial Plan for a Lawn Care Business

Running a lawn care business can be an excellent way for young peo-
ple to make money over the summer. It can also be a way to supple-
ment existing income for the purpose of saving money for retirement
or for a college fund. However, managing the costs of the business
will be critical for it to be a profitable venture. In this exercise, a sim-
2.5 chapter practice 133

ple financial plan will be created for a lawn care business by using
the skills covered in this chapter.

1. Open the file named PR2-Data and then Save As PR2-


Lawn Care.

2. Annual Plan worksheet.


a) Click cell C5.
b) Write a formula that calculates the average price
per lawn cut. Do not use the AVERAGE function.
The formula should be the Price per Acre * Average
Acreage per Customer.
c) Click cell C8.
d) Enter a formula that calculates the total number of
lawns that will be cut during the year: Number of
Customers * Frequency of Lawn Cuts per Customer.
e) Click cell D9.
f) Enter a formula that calculates the total sales for
the plan: Average Price per Cut * Total Lawn Cuts.

3. Leases worksheet.
a) Click cell F3. The PMT function will be used to cal-
culate the monthly lease payment for the first item.
For many businesses, leasing (or renting) equip-
ment is a more favorable option than purchasing
equipment because it requires far less cash. This en-
ables someone to begin a business such as a lawn
care business without having to put up a lot of
money to buy equipment. The PMT function can
be entered using the Insert Function button as seen
in this chapter, or the PMT function can be typed
directly into a cell. For this assignment, type the
function into cell F3 using the following instruc-
tions.
b) Type =PMT(. Define the arguments of the function
as follows.
i. Rate: Click cell B3, type a forward slash / for di-
vision, type the number 12, and type a comma
,. Since monthly payments are being calculated,
the annual interest rate must be converted to a
monthly interest rate by dividing by 12.
ii. Nper: Click cell C3, type *12 and then type a
comma ,. Like the Rate argument, the terms of
134 mathematical computations

the lease must be converted to months by multi-


plying by 12 since monthly payments are being
calculated.
iii. Pv: Type a minus sign -, click cell D3, and type
a comma ,. Remember that this argument must
always be preceded by a minus sign.
iv. Fv: Click cell E3 (Residual Value) and type a
comma ,.
v. Type: Type the number 1, type a closing paren-
thesis ), and press the Enter key. This assumes
the lease payments will be made at the begin-
ning of each month, which requires that this
argument be defined with a value of 1.
c) Copy the PMT function in cell F3 and paste it into
the range F4:F6 or use the Auto Fill Handle.
d) Click cell F10.
e) Enter an Autosum function to calculate the total for
the monthly lease payments. Make sure that blank
rows (7 through 9) were included in the range for
the SUM function so if other items are added later,
they will be included in the output of the SUM
function.
f) Select the range A2:F6.
g) The data in this range will be sorted, first by Interest
Rate and then by Price. Click Data ⇒ Sort & Filter
⇒ Sort. In the Sort dialog box, select Interest Rate in
the Sort by drop-down box. Select Largest to Small-
est for the sort order. Then, click Add Level. Select
Price in the Then by drop-down box. Select Largest
to Smallest for the sort order. Click OK.

4. Annual Plan worksheet.


a) Click cell B11. The monthly lease payments that are
calculated in the Leases worksheet will be displayed
in this cell.
b) Type an equal sign =, click the Leases worksheet,
click cell F10, and press the Enter key.
c) Click C12. Create a formula that calculates the an-
nual lease payments. This should be the Monthly
Lease Payments ∗12.
2.5 chapter practice 135

d) Click cell C14. Create a formula that calculates the


Total Lawn & Equipment Expenses (Lawn & Equip-
ment Expenses per Cut * Total Lawn Cuts).
e) Click cell D16. Enter a SUM function that adds the
Expenses for the business in Column C. Make sure
to add the Expenses only (not the Sales Plan informa-
tion).
f) Click cell D17. Enter a formula that calculates the
annual profit (Operating Income) for the business.
This should be the Total Sales – Total Expenses.
g) Format all cells that contain money amounts for Ac-
counting Number Format ($) with no decimals.

5. Investments worksheet.
a) Click cell B10.
b) Enter a COUNT function that counts the number
of investments that currently have a balance in Col-
umn B. Make sure that the additional blank rows
in Row 6 through Row 8 are included in the range
for this function. The function output will automat-
ically change if any new investments are added to
the worksheet. It is important to note, however, that
the Total in cell B9 should not be included in the
Count range.
c) Click cell D3.
d) Type an equal sign =. Click the Annual Plan work-
sheet. Click cell D17 and type a forward slash /
for division. Click the Investments worksheet. Click
cell B10 and press the Enter key. This formula
divides the profit calculated on the Annual Plan
worksheet by the number of investments in the In-
vestments worksheet. This assumes that the profits
from this business will be invested evenly among
the funds listed in Column A of the Leases work-
sheet.
e) Before copying and pasting the formula created
in cell D3, absolute references must be added to
the cell locations in the formula. Edit the formula
in cell D3 on the Investments worksheet so that
cells D17 and B10 are absolute. The formula in
cell D3 should be: =’Annual Plan’!$D$17/ Invest-
ments!$B$10. When the formula is copied down
136 mathematical computations

from cell D3, the cell references will not change, be-
cause they are absolute. The formula will continue
to divide the Operating Income in cell D17 of the
Annual Plan by the Number of Investments in cell
B10 of the Investments sheet.
f) Copy cell D3 and paste it into cells D4 and D5 or
use the Auto Fill Handle to copy down.
g) Click cell B9.
h) Enter a SUM function that adds the current bal-
ance for all investments in Column B. Make sure
that blank rows (Row 6 through Row 8) are added
to the range for the function so additional invest-
ments will automatically be included in the Auto-
sum function output.
i) Copy the SUM function in cell B9 and paste it into
cell D9.

6. Format the Investments and Leases sheets appropriately


for Accounting Format. This should include $ signs on
the top row and total row for money amounts, and
comma style in the middle rows.
a) On the Investments sheet, apply Accounting for-
mat with 0 decimals to B3, D3 B9, and D9. Ap-
ply Comma format with 0 decimals to the ranges
B4:B8 and D4:D8.
b) On the Leases worksheet, apply Accounting format
with two decimals to the range D3:F3 and F10. Ap-
ply Comma format with two decimals to the range
D4:F9.
Double check that the formatting matches Figures 100,
101, and 102.

7. Save the PR2-Lawn Care workbook.

8. Compare the worksheet with the self-check answer key


(PR2-Lawn Care Solution) and then close and submit
the PR2-Lawn Care workbook as directed by the instruc-
tor.
2.5 chapter practice 137

Figure 100: Completed Lawn Care Annual Plan Worksheet

Figure 101: Completed Lawn Care Investments Worksheet


138 mathematical computations

Figure 102: Completed Lawn Care Leases Worksheet

2.6 scored assessment

2.6.1 Hotel Occupancy and Expenses

The hotel management industry presents a wide variety of career op-


portunities, ranging from running a bed and breakfast to a manage-
ment position at a large hotel. Regardless of the hotel management
career, understanding hotel occupancy and costs are critical to run-
ning a successful operation. This exercise examines the occupancy
rate and expenses of a small hotel.

1. Open the file named SC2-Data and then Save As SC2-


Hotel.

2. Enter a formula in cell C5 on the Occupancy worksheet


to calculate the January capacity for the hotel. The capac-
ity shows how many people the hotel can hold during
the month. It is calculated by first multiplying the Num-
ber of Rooms by the Occupants per Room in the hotel. This
result is then multiplied by the number of Days in Month
(cell B5 for January). Create this formula using absolute
references so that the appropriate cells do not change
when the formula is pasted throughout Column C. Hint:
two of the cells in the formula need to be absolute refer-
ences.

3. Copy the formula in cell C5 and paste it into the range


C6:C16. Use a paste method that does not remove the
border at the bottom of cell C16.
2.6 scored assessment 139

4. Enter a formula in cell E5 on the Occupancy worksheet


to calculate the Percent Occupied of the hotel (this statistic
shows what percentage of the hotel is full or occupied).
The formula should divide the Actual Occupancy by the
Hotel Capacity. Then copy and paste the formula into the
range E6:E16. Use a paste method that does not remove
the border at the bottom of cell E16. Format the results
in E5:E16 as percentages with two decimal places.

5. Enter a function in cell C17 on the Occupancy worksheet


that sums the values in the range C5:C16. Copy the func-
tion and paste it into cell D17.

6. Copy the formula in cell E16 and paste it into cell E17.
Make sure cell E17 is formatted as a percentage with
two decimals and bold.

7. On the Statistics worksheet, enter a function into cell B3


that shows the highest value (Max) in the range D5:D16
in the Actual Occupancy column on the Occupancy work-
sheet.

8. On the Statistics worksheet, enter a function into cell B4


that shows the lowest value (Min) in the range D5:D16
in the Actual Occupancy column on the Occupancy work-
sheet.

9. On the Statistics worksheet, enter a function into cell B5


that shows the average value in the range D5:D16 in the
Actual Occupancy column on the Occupancy worksheet.

10. Use the Auto Fill Handle to copy the formulas in the
range B3:B5 to the range C3:C5.

11. Format the range B3:B5 for comma format with zero
decimal places. Format cells C3:C5 as percentages with
two decimal places.

12. The hotel is considering buying or leasing a car to shut-


tle customers to and from the airport. The hope is to
keep the monthly payment under $400. On the Lease or
Buy worksheet, type the terms in Figure 103 for the pur-
chase vs. lease of the car. Make sure that dollar amounts
and percentages are formatted to match Figure 103.
140 mathematical computations

Figure 103: Terms for the Purchase vs. Lease of the Car

13. In cell B8 create a PMT function to calculate the


Monthly Payment if the car is purchased. Make sure
the arguments in the PMT function are converted into
months and that the Monthly Payment is a positive num-
ber.

14. In cell C8 create a PMT function to calculate the


Monthly Payment if the car is leased. The car will have a
residual value of $15, 000 when the lease is over. Assume
that payments are made at the end of the month.

15. Format the Monthly Payments in B8:C8 for Accounting


Number Format with two decimals.

16. Select the range A4:A8 and click the Increase Indent but-
ton once to indent the labels in Column A.

17. Click Page Layout ⇒ Page Setup ⇒ Dialog Box


Launcher.

18. Center the Lease or Buy worksheet horizontally on the


page.

19. Insert a footer on the Lease or Buy worksheet. Insert


the date (use the Insert Date button) in the left section
of the footer. Insert the File Name (use the Insert File
Name button) in the right section of the footer.

20. Save and close the SC2-Hotel workbook.

21. Submit the SC2-Hotel workbook as directed by the in-


structor.
FORMULAS
3
Excel workbooks are designed to create useful and complex calcula-
tions. In addition to doing arithmetic, Excel can look up data and dis-
play results based on logical conditions. Finally, Excel can highlight
specific results to enhance analysis. These skills will be demonstrated
in the context of a typical grade book spreadsheet that contains the
results for an imaginary Excel class.

Learning Objectives

• Use the Quick Analysis Tool to find the Total Points and
Points Possible for all students.
• Write a division formula to find the Percentage for
each student, using an absolute reference to the Total
Points Possible.
• Write an IF Function to determine Pass/Fail where
passing is 70% or higher.
• Write a VLOOKUP to determine the Letter Grade us-
ing a Letter Grades scale.
• Use the TODAY function to insert the current date.
• Review common Error Messages using Smart Lookup
to get definitions of some of the terms in the spread-
sheet.
• Apply Data Bars to the Total Points values.
• Apply Conditional Formatting to the Percentage, Pass/-
Fail, and Letter Grade columns.
• Printing Review – Change to Landscape, Scale to Fit
Columns on One Page and Set Print Area.

Figure 104 shows the completed workbook that will be demon-


strated in this chapter. Notice the techniques used in Column O and
Column R that highlight the results of the calculations. Notice, also
that there are more numbers on this version of the file than in the
original data file. These are all completed using Excel calculations.

141
142 formulas

Figure 104: Completed Grade Book Worksheet

3.1 more on formulas and functions

Learning Objectives

• Review the use of the =MAX function.


• Examine the Quick Analysis Tool to create standard cal-
culations, formatting, and charts very quickly.
• Create Percentage calculation.
– Use the Smart Lookup tool to acquire additional
information about percentage calculations.
– Review the use of Absolute cell reference in a
division formula.

3.1.1 Another Use for =MAX

Before moving on to the more interesting calculations discussed in


this chapter, it is necessary to determine how many points it is pos-
sible for each student to earn for each of the assignments. This infor-
mation will go into Row 25. The =MAX function is the tool of choice
for this task.

1. Open the data file CH3-Data and save the file as CH3-
Grade Book.
3.1 more on formulas and functions 143

2. Click B25.

3. Start typing =MAX (See Figure 105). Note the explana-


tion that pops up on the offered list of functions. Either
keep typing ( (an open parenthesis) or double click MAX
from the popup list.

Figure 105: Entering a function

4. Select the range B5:B24. The calculation will update to:


=MAX(B5:B24). Press Enter to complete the formula.

5. Now, use the Auto Fill Handle to copy B25 to C25:N25.


Note that as the calculation is copied from one column
to the next, the cell references change. The calculation
in B25 reads: =MAX(B5:B24) and the one in N25 reads
=MAX(N5:N24). These cell references are called relative
references.

By default, the calculations that Excel copies change their cell ref-
erences relative to the row or column they are copied to. That makes
sense. Column N should not display an answer that uses the values
from Column K.
To see all the calculations that were just created, press Ctrl + ‘ (that
is the back-tic near the one on the keyboard, see Figure 106) Ctrl + ‘
displays the calculations (formulas) in each cell. Pressing Ctrl + ‘ a
second time will display calculations as values, which is the default
view for cells.

Figure 106: Relative References – Displayed as calculations.


144 formulas

3.1.2 Quick Analysis Tool

The Quick Analysis Tool creates standard calculations, formatting, and


charts very quickly. In this exercise, it is used to insert the Total Points
for each student in Column O.
If necessary, press Ctrl + ‘ to return the spreadsheet to the normal
view (the results of the formulas in Row 25 should be displayed, not
the formulas themselves).

1. Select B5:N25

2. In the lower right corner of the selection, notice the


Quick Analysis Tool (see Figure 107).

Figure 107: Quick Analysis Tool

3. In the Quick Analysis Tool, select Totals ⇒ COLUMN


SUM (see Figure 108). (Note: there are two SUM buttons,
the second will sum columns, as indicated by the tan-
colored column indicator on the button.) Selecting the
COLUMN SUM button places a =SUM() calculation all
cells in Column O.

Figure 108: Quick Analysis Tool – Totals, Sum Column


3.1 more on formulas and functions 145

3.1.3 Percentage Calculation

Column P requires a Percentage calculation. Before creating a calcu-


lation for this, it might be handy to know precisely what is needed.
The Smart Lookup tool is a handy way to get more information if the
computer is connected to the Internet.

1. Select cell P4.

2. Click Review ⇒ Insights ⇒ Smart Lookup (see Figure


109). This will find more about Percentage calculations.
If this is the first time that the Smart Lookup tool has been
used a privacy statement may pop up. Press the Got it
button.

Excel searches the web for articles relevant to percentage and lists
links to those articles. Figure 109 illustrates the result of the search
done when this lesson was written, but that result will change de-
pending on what information is available on the web.

Figure 109: Smart Lookup tool

Now that the data needed for the Percentage calculation is known,
a formula can be written so Excel will complete the calculation. The
Total Points for each student must be divided by the Total Points Possi-
ble. Notice that there is a different number of points earned for each
student, but there is only one Total Points Possible — the value in cell
O25.

1. Click in P5.

2. Press = then click O5.


146 formulas

3. Enter /

4. Click O25. The calculation should look like =O5/O25.

5. Press Enter . The result of the formula should be


0.95641026. So far, so good. DeShea Andrews is doing
well in this class, with a percentage grade of almost
96%—definitely an “A”!)

6. Next use the Auto Fill Handle to copy the calcula-


tion from P5 to P6:P24 to calculate the other students’
grades. Unfortunately, this error message is displayed:
#DIV/0. This message means that an attempt has been
made to divide a number by 0 (zero), which is impos-
sible. The formula in P9 reads = O9/O29. The first cell
reference is correct — it points to Moesha Gashi’s total
points for the class. But the second reference is wrong. It
points to an empty cell, O29.

Figure 110: Illegal Cell Reference

Before copying the calculation, the second reference, (O25), must


be changed to an absolute cell reference. That way, when it is copied
down the column, the cell reference for O25 will be locked and will
not change.

1. Click in P5.

2. In the Formula Bar click on O25 (see Figure 111).


3.1 more on formulas and functions 147

3. Press F4 to make the O25 reference absolute. That way,


it will not change when the cell is copied (see Figure
112). It is also easy enough to simply type a $ before the
O and another one before the 25 for devices like tablets
and laptops that may not have function keys.

4. Press Enter .

5. The formula in P5 now looks like =O5/$O$25.

6. Click in P5 and use the Auto Fill Handle to copy that


cell to P6:P24. Now the formula has the correct values
for all students.

Figure 111: Editing a Formula

Figure 112: Absolute Cell reference – press F4

Those long decimals in the percent column are nonstandard so they


should be changed to a percent by applying cell formatting.

1. Select the range P5:P24.


148 formulas

2. Click Home ⇒ Number ⇒ % (Percent).

Skill Refresher
Absolute References

• Click in front of the column letter of a cell reference


in a formula or function that should not be altered
when the formula or function is pasted into a new
cell location.
• Press the F4 key or type a dollar sign ($) in front of
the column letter and row number of the cell refer-
ence.

Key Take-Aways

Functions

• Functions can be created using cell ranges or selected


cell locations separated by commas. Make sure to use
a cell range (two cell locations separated by a colon)
when applying a statistical function to a contiguous
range of cells.
• To prevent Excel from changing the cell references
in a formula or function when they are pasted to a
new cell location, use an absolute reference. Do this
by placing a dollar sign ($) in front of the column let-
ter and row number of a cell reference or by using the
F4 function key.
• The #DIV/0 error appears if a formula attempts to di-
vide a constant or the value in a cell reference by zero,
typically because it refers to an empty cell.

3.2 logical and lookup functions

Learning Objectives

• Use an IF Function to make logical comparisons be-


tween a value and what is expected.
• Create a VLOOKUP calculation to look up informa-
tion in a table.
• Understand error messages.
• Understand how to enter and format Date/Time
Functions.
3.2 logical and lookup functions 149

In addition to doing arithmetic, Excel can do other kinds of func-


tions based on the data in the spreadsheet. In this section an =IF
function will be used to determine whether a student is passing or
failing the class. Then, a =VLOOKUP function will be used to deter-
mine what grade each student has earned.

3.2.1 If Function

The IF function is one of the most popular functions in Excel. It makes


logical comparisons between a value and what was expected and then
fills a cell based on that comparison. In its simplest form, the IF func-
tion says something like, If the value in a cell is expected (true) then do
this; otherwise do that.
The IF function has three arguments.

• Logical test. This is the test to see if the value in a selected cell
expected. A test can be something like “B7 = 14” or “B7 > 12”
or “B7 < 6.”

• Value if true. What to do if the requirements in the logical test


are met, for example, if B7 is equal to 14 then fill the cell with
text like “True,” or “On budget!” Alternatively, this argument
can contain a calculation, like B7 ∗ 2. That is, if B7 equals 14
then multiply it by 2. Finally, if Excel should put nothing at all
in the cell then type “” (two empty quotes).

• Value if false. What to do if the requirements in the logical test


are NOT met; for example, if B7 does NOT equal 14. To have
Excel do nothing, then type empty double quotes. Of course,
Excel can also enter whatever text or calculation is desired.

For the grade book, Column Q should indicate whether a student


is passing or failing the class. Students who score 70% or better are
considered passing while scores less than 70% are failing.

1. Click in Q5.

2. Click Formulas ⇒ Function Library ⇒ Logical ⇒ IF (see


Figure 113).
150 formulas

Figure 113: IF Function

The IF Function dialog box pops up with a place to enter each of


the three arguments.

1. Click in the box for Logical Test. To test whether a stu-


dent’s score is less than 0.7 enter P5 < 0.7.

2. Click in the box for Value if true. If the student’s score is


less than 0.7, then they are failing the class. In this box,
type Fail. Note: Excel automatically encloses the word
Fail in quote marks.

3. Click in the box for Value if false. If the student’s score


is NOT less than 0.7, then they are passing the class. In
this box, type Pass. Note: Excel automatically encloses
the word Pass in quote marks.

4. Make sure that the dialog box matches Figure 114.

Figure 114: IF Function Dialog Box

Notice that as each box is filled, Excel offers a brief explanation of


the contents (below the boxes.) In the lower left corner is the results
3.2 logical and lookup functions 151

of the calculation so it can be checked before the function is inserted


in the cell. In this case, DeShae is passing the class. Below that is a
link to Help on this function. Selecting this link will open Excel help
for this function, along with detailed information on how it works.

1. Once the required arguments are entered and checked,


press OK.

2. The text Pass should be displayed in Q5 because DeShae


is passing the class.

3. Click on Q5. The formula bar should display the IF cal-


culation: = IF(P5 < 0.7,”Fail”,”Pass”) (see Figure 115).

4. Use the Auto Fill Handle to copy Q5 to Q6:Q24.

Figure 115: IF Function Results

3.2.2 Vlookup Function

A VLOOKUP function is used to look up information in a table. Some-


times that table is on a different sheet in the workbook, though it can
be in another file entirely. In this case, all students’ grades are deter-
mined by their percentage score. For this grade book, the table that
relates a score to a grade is in A28:B32.
There are four pieces of information that are needed to build the
VLOOKUP function.
152 formulas

• The Lookup value is the value to look up. For this exercise, the
lookup value will be the student’s percentage score in Column
P.
• The Table array is the range (or table) where the lookup values
are located. In this example the table of percentages and cor-
responding letter grades is in the range A28:B32. The lookup
value, or percentage grade in this case, should always be in the
first column in the table array for VLOOKUP to work correctly.
• The Col index num is the column number in the range that
contains the value to return. In this example, A28:B32 is the
Table array range so Column A is the first column (1), Column B
is the second column (2). To return the grade in Column B, the
number 2 would be entered as the Col index num.
• The Range lookup is TRUE for an approximate match or FALSE
for an exact match. If this is left blank the default value is TRUE,
or an approximate match.
Follow these steps to create the VLOOKUP to display the correct
Letter Grade in Column R.

1. Click in R5.

2. Click Formulas ⇒ Function Library ⇒ Lookup & Refer-


ence ⇒ VLOOKUP. (See Figure 116).

Figure 116: VLOOKUP Function

3. Fill in the dialog box so that it looks like Figure 117.


3.2 logical and lookup functions 153

• Lookup value. Specify the percentage score, which


is in cell P5 for the first student.
• Table array. This is the range that contains the
value to be returned by the function. In this case,
that range is A28:B32. Note that this range does
NOT include the label in Row 27, just the actual
data. It is important that the cell references for
the Table array need to be absolute: $A$28:$B$32.
When this function is copied to other cells the cell
references should not change.
• Col index number. This is the column in the ta-
ble array range that includes the information that
should be returned. In this case, the grades are in
the 2nd column of the range so the column index
will be 2.
• Range lookup. Since an approximate match is ap-
propriate for this application the default value of
TRUE is appropriate. Since that is the default, noth-
ing needs to be entered for this value.

4. Be sure to observe the helpful definitions that Excel of-


fers while filling in the VLOOKUP dialog box.

5. When the dialog box is complete, press OK.

6. The calculation in the formula bar is:


=VLOOKUP(P5,$A$28:$B$32,2)

7. Use the Auto Fill Handle to copy R5 to R6:R24.

Figure 117: VLOOKUP completed dialog box

Figure 118 illustrates the grade book when the VLOOUP function
is applied.
154 formulas

Figure 118: VLOOKUP Complete

What if the VLOOKUP function does not work as expected? In this


case, a mistake was made in either the calculation of the % scores
in Column P or there is an error in the VLOOKUP function. To make
repairs to the function, make sure that R5 is the active cell. On the
Formula bar, press the Insert Function button (see Figure 119). That
will reopen the dialog box to make repairs. A common error is to
forget to make the cell references for the Table array absolute. Press
OK when the correction is completed and then recopy the corrected
function.

Figure 119: Insert Function


3.2 logical and lookup functions 155

3.2.3 Error Messages

Sometimes Excel notices errors in the calculations and may post a


slightly mysterious error message. Table 9 lists the common error
messages that Excel displays along with their meanings1 .

Message What Went Wrong


The division operation refers to a cell that contains the
#DIV/0
value 0 or is blank.
Technically, this is not an error value but a special value
that can be manually entered into a cell to indicate that
#N/A
there is no value yet. This is a placeholder used while a
spreadsheet is being developed.
This error value appears when a range name is incorrectly
entered, or the name is deleted. Also, this commonly
#NAME?
means that the formula is missing quotation marks around
a text string.
This error occurs if a space is used instead of a comma
#NULL between ranges in function arguments. The formula needs
to be carefully checked and corrected.
This error is caused by an invalid argument in an Excel
#NUM function or by a formula that produces a number too large
or too small for the worksheet.
This error occurs when a cell referred to in a formula has
#REF
been deleted.
This error is most often the result of specifying a
#VALUE mathematical operation that refers to one or more cells
that contain text.

Table 9: Common Error Messages

3.2.4 Date Functions

Very often dates and times are an important part of Excel data. Num-
bers that are correct today may not be accurate tomorrow, so it is fre-
quently useful to include dates and times on the spreadsheets. Dates
and times fall into two general categories.

• Remain the same. For instance, if a spreadsheet includes data


for May 15th then that date should not change each time the
spreadsheet is accessed.

• Change to reflect the current date/time. When it is important


to have the current date or time on a spreadsheet then Excel
should update the information regularly.

1 Table 9 was adapted from https://www.dummies.com/software/microsoft-office/ex


cel/understanding-excel-2010s-formula-error-values/
156 formulas

Look at the functions at Formulas ⇒ Function Library ⇒ Date & Time


(see Figure 120).

Figure 120: Date & Time Functions

For the grade book, the date and time should be displayed in A2,
and it needs to be updated whenever the workbook file is opened.

1. Click in A2. Notice that A2 extends all the way from


Column A to Column R. Previously, the Merge & Center
tool was used on this cell to make it match the width of
the title in Row 1.

2. Click Formulas ⇒ Function Library ⇒ Date & Time ⇒


NOW.

3. Click OK.

4. The result in the formula bar is: =NOW() and the result
in A2 depends on the current date and time. The NOW
function is a very handy function; it takes no arguments
and is volatile! That is not as alarming as it may seem.
This just means that it does not need any information to
do its job and the results will change frequently.

5. Wait at least one minute and then click in A2 and press


F9 to update the time.

Excel will update this field automatically whenever the file is saved,
reopened, or printed. It may also happen more frequently than that,
depending on how Excel is set up.
3.2 logical and lookup functions 157

Another variation of the current date is the TODAY function.

1. Click in A2. Press Delete to remove the NOW function.

2. Click Formulas ⇒ Function Library ⇒ Date & Time ⇒


TODAY.

3. Click OK.

4. The result in the formula bar is =TODAY() and the re-


sult in A2 is the current date. Since the time was not
requested it is likely 12 : 00 AM. That is not helpful, so
the date format needs to be adjusted.

5. Click Home ⇒ Number ⇒ Number Format Launcher


(see Figure 121).

6. In the Format Cells dialog box, click the Number tab.


Choose the Date category and select the second option,
Wednesday, March 14, 2012 (this format is called Long
Date).

7. Click OK.

8. The current day and date should now be displayed in


A2.

Figure 121: Number Format Launcher

Keyboard Shortcuts

Static Date and Time

• CTRL + ; (semicolon) inserts the current date


• CTRL + : (colon) inserts the current time.
158 formulas

Key Take-Aways

Date Functions

• Functions do not always have to be about arithmetic.


Excel provides functions that helps perform logical
evaluations, look things up, and work with dates and
times.
• Excel displays error messages when formulas and
functions are not constructed properly.

3.3 conditional formatting

Learning Objectives

• Use Conditional Formatting techniques to provide


flexible highlighting or applying specified formatting
only when certain conditions are met. Techniques in-
clude:
– Data bars. Makes it easy to visualize values in a
range of cells.
– Cell Rules. Highlights values that match speci-
fied requirements.

3.3.1 Initiating Conditional Formatting

All necessary calculations are now in the CAS 170 Grades spreadsheet.
However, the grade book contains a lot of data. To make it easier to
quickly find the most important pieces of data, Excel provides Condi-
tional Formatting.

1. Select the range O5:O24.

2. At the bottom of the selection, click on the Quick Anal-


ysis Tool. This is a popup tool with an icon that looks
like a spreadsheet with colored lines.

3. Click Formatting ⇒ Data Bars (see Figure 122).

Excel places blue bars on top of the values; long blue bars for larger
numbers, shorter ones for smaller numbers. This makes it easier to see
how well each student did in the class immediately without having
to look at the specific numbers.
3.3 conditional formatting 159

Figure 122: Data Bars on the Quick Analysis tool

Following is another way to apply Data Bars.

1. Select the range O5:O24.

2. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Data Bars.

3. From there, data bars of different colors and opacities


can be selected (see Figure 123).
160 formulas

Figure 123: Data Bars on the Conditional Formatting tool

It is even more important to highlight the students who are failing


in the class, so that will be done in two places, the Percentages and
Letter Grade columns. To start, any F letter grades should be formatted
with a light red fill color and dark red text.

1. Select the range R5:R24.

2. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Highlight Cells Rules (see Figure 124).

3. Select Equal To

4. Enter F in the Format cells that are EQUAL TO text box,


so those cells are highlighted with Light Red Fill with
Dark Red Text (see Figure 125).

5. Click OK.
3.3 conditional formatting 161

Figure 124: Conditional Formatting Equal To

Figure 125: Conditional Formatting Equal To Dialog Box

Now, highlight students who are passing the class. This time use
the Pass/Fail text in the Pass/Fail column. If the text for a student is
Pass the cell should be formatted with a yellow fill and dark yellow
text.
162 formulas

1. Select the range Q5:Q24.

2. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Highlight Cells Rules (see Figure 124).

3. Select Equal To

4. Enter Pass in the Format cells that are EQUAL TO text


box, so those cells are highlighted with Yellow Fill with
Dark Yellow Text.

5. Click OK.

The default styles are a simple way to make specified data stand
out, but any cell formatting can be set. When using custom cell for-
matting, it is probably a good idea to include other styling in addition
to color. Remember that spreadsheets are often printed in black and
white so conditional formatting that relies only on color would be
lost. Next, use conditional formatting to display any Percentages that
are less than 60% with red text formatted in bold and italic.

1. Select the range P5:P24.

2. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Highlight Cells Rules (see Figure 124).

3. Select Less Than

4. Fill out the Less Than dialog box so that cells that are less
than 0.6 (that is 60%) will have conditional formatting.
Instead of using the default red text on a light red fill,
press the down arrow at the end of the with box and
select Custom Format.

5. On the Font tab of the Format Cells dialog box, in the Font
style box, select Bold Italic. In the Color box, select Red
(see Figure 126).

6. Press OK. Then press OK again.


3.3 conditional formatting 163

Figure 126: Conditional Formatting Custom Format Cells Dialog box

Conditional Formatting is valuable since it reflects the current data


and it changes whenever the data changes. To test this, delete DeShea’s
final exam score. (Click N5 then press Delete on the keyboard.) Sud-
denly, DeShae is failing the course and the Conditional Formatting
reflects that. Press CTRL + Z (Undo). The test score reappears, and
the Conditional formatting reflects that as well.

3.3.2 Modifying Conditional Formatting

What if there is a mistake with the Conditional Formatting or it needs


to be deleted altogether? Use the Conditional Formatting Manage Rules
tool. The following steps remove the conditional formatting rule that
formats the Pass text with yellow and modify the minimum passing
percentage.

1. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Manage Rules.

2. Select This Worksheet for Show formatting rules for (see


Figure 127).
164 formulas

3. Since there is no need to highlight the students who are


passing the class, click the second rule in the Rules Man-
ager (“Cell Value = ’Pass”’) and press the Delete Rule
button.

Figure 127: Conditional Formatting Manage Rules

In a previous exercise (the IF function), it was decided that students


were failing if they got a percentage score of less than 70%, so the Con-
ditional Formatting rule in the Percentage column needs to be changed
to match that value.

1. Click the first rule, it reads Cell Value < 0.6.

2. Click the Edit Rule button and change the 0.6 to 0.7 (see
Figure 128).

3. Click OK (or Apply) two times.

Figure 128: Conditional Formatting Edit Formatting Rule Dialog box


3.3 conditional formatting 165

Double check that the completed workbook matches Figure 129.

Figure 129: Completed Ch3-grade book

3.3.3 Setting the Print Area

Before this workbook is finished, it needs to be prepared for printing.


The first thing to do is set the Print Area so that the table of Letter
Grades in A27:B32 does not print.

1. Select A1:R25. This is the only part of the worksheet to


be printed.

2. Click Page Layout ⇒ Page Setup ⇒ Print Area ⇒ Set


Print Area.

Next, preview the worksheet in Print Preview to check that the print
area setting worked and to make sure it is printing on one page.

1. Click File ⇒ Print.

2. Set the orientation to Landscape.

3. Change the scaling so that the entire worksheet prints


on one page.

4. Close the print preview by clicking the arrow at the top


left corner of the preview screen.

5. Save the CH3-Grade Book workbook.


166 formulas

6. Compare the worksheet with the self-check answer key


(CH3-Grade Book Solution) and then close and submit
the CH3-Grade Book workbook as directed by the in-
structor.

3.4 preparing to print

Learning Objectives

• Locate and fix formatting consistency errors.


• Apply new formatting techniques.
• Use Print Titles to repeat rows and columns on each
page of a multiple page worksheet.
• Control where page breaks occur in a multiple page
worksheet.

In this section, a worksheet will be reviewed for formatting consis-


tency and two new formatting techniques are presented. The work-
sheet used in this section currently prints on four pages, so new page
setup options are used to control how these pages print.

3.4.1 Reviewing Formatting for Consistency

The workbook used for this exercise contains data about the national
parks in the western United States. The workbook has been formatted
but needs to be reviewed for consistency and prepared for printing.
Figure 130 shows how the second page of the finished worksheet will
appear in Print Preview.
3.4 preparing to print 167

Figure 130: Completed National Parks worksheet

3.4.2 Reviewing Formatting for Inconsistencies

The first thing to do is review the worksheet for formatting inconsis-


tencies.

1. Open the data file named CH3-PTP Data and use the
File/Save As command to save it as CH3-National Parks.

2. Scroll through the worksheet and locate the following


formatting errors.
• The formatting of the Utah label does not match the
other states.
• The Year Established values for Hawaii are not center
aligned like the other years.
• The cells for the Nevada data should have the same
green fill color as the other alternating states.
• The number of digits after the decimal place for
the Size values is inconsistent. Also, these values
should be formatted with Comma style to make
them easier to read.

3. Complete the following steps to fix these errors.


• Select A34:A38.
• Click Home ⇒ Alignment ⇒ Merge & Center.
168 formulas

• Change the font size to 16 and apply Bold format.


• Select C28:C29.
• Click Home ⇒ Alignment ⇒ Center.
• Select A31:E31.
• Apply a fill of Green, Accent 6, Lighter 60%.
• Select E4:E43.
• Click Home ⇒ Number ⇒ Comma.
• Click Home ⇒ Number ⇒ Decrease Decimal un-
til one digit appears after the decimal place for all
values.

4. While these formatting errors are being corrected all ty-


pos should also be corrected.

3.4.3 Fine-Tuning Formatting

Now that the formatting inconsistencies have been corrected, apply


additional formatting techniques to make the worksheet look better.
Start by vertically aligning the names of the states within the cells.

1. Select A4:A43 (the cells with the state labels).

2. Click Home ⇒ Alignment ⇒ Middle Align (see Figure


131). Notice that the names of the states are now cen-
tered between the top and bottom borders of the cells.

Figure 131: Alignment Group

The next formatting correction is to change the label in E3 from


Size (km2) to Size (km2 ) with the 2 after km formatted as a superscript.

1. Double-click on cell E3 to enter Edit mode

2. Select just the 2 (be careful not to select anything else).


3.4 preparing to print 169

3. Click Home ⇒ Font ⇒ Dialog Box Launcher.

4. In the Effects section of the Format Cells dialog box, check


the box for Superscript (see Figure 132).

5. Click OK.

6. Save the CH3-National Parks file.

Figure 132: Font Tab in Format Cells Dialog Box

3.4.4 Repeating Column (And Row) Labels

Now that the cell and text formatting are corrected, review the work-
sheet in Print Preview. Notice that the worksheet is printing on mul-
tiple pages and it is not possible to know what each column of data
represents on some of the pages.

1. With the CH3-National Parks file still open, click File ⇒


Print.

2. Click through each of the pages using the page number


identifier at the bottom of the preview. The worksheet is
currently printing on four pages, with the City and Sizes
170 formulas

columns printing on separate pages from the rest of the


data.

3. Using the Orientation button on the left side of the pre-


view, change the orientation to Landscape to fit all the
columns on one page. Unfortunately, the second and
third pages have no column labels to identify the infor-
mation in each column.

4. Exit Print Preview by clicking the arrow button at the top


left corner of the preview.

5. Click Page Layout ⇒ Page Setup ⇒ Print Titles. The


dialog box shown in Figure 133 should appear.

Figure 133: Print Titles

6. Click the Collapse Dialog button next to the Rows to


repeat at top: text box in the Page Setup dialog box.

7. In the worksheet, select Row 1 through Row 3.

8. Press the Enter key. This returns the Page Setup dialog
box to its expanded form. Notice that that the Rows to
repeat at top argument is now defined as $1:$3.

9. Click OK.

The worksheet does not change in Normal view, so return to Print


Preview. While in Print Preview, notice that the pages are breaking
3.4 preparing to print 171

in the middle of the information for a single park, but that will be
corrected next.

1. Click File ⇒ Print. Notice that the first three rows are
now repeated at the top of each page.

2. Exit Print Preview by clicking the arrow button at the top


left corner of the preview.

Skill Refresher
Creating Print Titles

• Open the Page Setup dialog box and click the Sheet tab.
• Click in the Rows to repeat at top: box or the Columns to
repeat at left: box.
• Click in the worksheet and select the row(s) or col-
umn(s) to be repeated on each page.

3.4.5 Inserting Page Breaks

Notice that the data for California is split between the first and second
pages. Since it is desirable to keep all the data for each state on the
same page, the page breaks need to be adjusted. Start by inserting a
page break before the California data to force it to start on the second
page, then move the page break for the third page if needed. To make
these changes work in Page Break Preview.

1. Click View ⇒ Workbook Views ⇒ Page Break Preview.


The screen should be like Figure 134.
172 formulas

Figure 134: Page Break Preview

In Page Break Preview, automatic page breaks are displayed as dot-


ted blue lines. Notice the dotted blue lines after Row 20 and Row 37,
which indicate where Excel will start a new page. For this worksheet,
the first page should break at the California data, so insert a manual
page break there.

1. Select cell A15. When inserting a page break, select the


cell below where the page break should appear.

2. Click Page Layout ⇒ Page Setup ⇒ Breaks ⇒ Insert


Page Break (see Figure 135).

3. There is now a solid blue line after Row 14, which indi-
cates a manual page break was inserted.

4. Click File ⇒ Print. Notice that the California data now


starts on the second page.
3.4 preparing to print 173

Figure 135: Breaks Button on Page Layout tab

After looking at each page in Print Preview it was decided that the
third page should start with Montana. To make this change, move the
automatic page break that appears after Nevada.

1. Exit Print Preview by clicking the arrow button at the top


left corner of the preview.

2. Switch back to Page Break Preview if needed.

3. Locate the dotted blue line (automatic page break) after


Row 31.

4. Put the pointer over the dotted blue line, and it will
switch to a vertical double-headed arrow. Click on the
dotted blue line and drag it above Row 30 (Montana).

5. The line will now be a solid blue line, indicating a man-


ual page break.

6. Click File ⇒ Print. The Montana row now appears at


the top of the third page.

While evaluating the pages in Print Preview it appears that there is


too much white space at the bottom of the pages. To fix this, center
the contents vertically on the pages.

1. Click the Page Setup link at the bottom of the Settings


section of Backstage View to open the Page Setup dialog
box.

2. Click on the Margins tab.

3. In the Center on page section, check the box for Vertically


then click OK.

4. Review each page in Print Preview to see the changes.

5. Exit Print Preview by clicking the arrow button at the top


left corner of the preview.
174 formulas

3.4.6 Creating a Header and Footer Using Page Layout View

Now that the worksheet is printing on three pages, with page breaks
in appropriate places, it is time to add a header with the current date
and filename. A footer will also be added with the page number and
the total number of pages that will appear as Page 1 of 3.

1. Click View ⇒ Workbook Views ⇒ Page Layout.

2. The white space at the top of the worksheet should say


Add header.

3. Place the mouse pointer over the left section of the


Header and click to activate that section.

4. Click Header & Footer Tools Design ⇒ Header &


Footer Elements ⇒ Current Date (see Figure 136). In-
serting the date this way will insert a field that will up-
date every time the workbook is opened. ( Excel 365 This
tab is called Header & Footer.)

5. Place the mouse pointer over the right section of the


Header and click to activate that section.

6. Click Header & Footer Tools Design ⇒ Header &


Footer Elements ⇒ Filename (see Figure 136). Inserting
the filename this way will insert a field that will update
if the filename is changed.

7. Click Header & Footer Tools Design ⇒ Navigation ⇒


Go to Footer.

8. In the center section of the footer, type the word Page


with a space after it.

9. Click Header & Footer Tools Design ⇒ Header &


Footer Elements ⇒ Page Number (see Figure 136), then
type a space after the &[Page] code that appears.

10. Type the word of with a space after it.

11. Click Header & Footer Tools Design ⇒ Header &


Footer Elements ⇒ Number of Pages (see Figure 136).
The footer should match Figure 137.

12. Click anywhere on the worksheet to close the Footer edit-


ing.

13. Click File ⇒ Print. Check that the date and file name
are in the header and the page numbers in the footer are
correct.
3.4 preparing to print 175

14. Exit Print Preview by clicking the arrow button at the top
left corner of the preview.

15. Save the CH3-National Parks workbook.

16. Compare the worksheet with the self-check answer key


(CH3-National Parks Solution) and then close and sub-
mit the CH3-National Parks workbook as directed by
the instructor.

Figure 136: Header & Footer Elements buttons

Figure 137: Completed Footer

Skill Refresher
Inserting Page Numbers

• In Page Layout View, click in the section of the header


or footer where the page number should appear.
• Type the word Page followed by a space.
• Click Header & Footer Tools Design ⇒ Header & Footer
Elements ⇒ Page Number. This will create Page 1.
• Type a space after the &[Page] code then type the
word of followed by a space.
• Click Header & Footer Tools Design ⇒ Header & Footer
Elements ⇒ Number of Pages. This will create Page 1 of
4.
176 formulas

Key Take-Aways

Preparing to Print

• Always check the formatting of worksheets for consis-


tency.
• If a worksheet is printing on multiple pages, use Print
Titles to repeat rows at the top and/or columns at the
left of every page to make it easier to interpret the
data.
• Insert manual page breaks as needed in Page Break
Preview to control where a new page begins.
• Multiple page worksheets should include the page
number in either the header or footer. Be sure to in-
sert the Page Number element so that the correct page
number will display on each page of the worksheet.

3.5 chapter practice

3.5.1 Household Budget

Elijah and Kelly Williams are a recently married couple living in Port-
land, Oregon. Elijah works part time and attends the local community
college. Kelly works as a marketing manager at a clothing company in
North Portland. They are trying to decide if they can afford to move to
a better apartment, one that is closer to work and school. They want
to use Excel to examine their household budget. They have started
their budget spreadsheet, but they need help with it.

1. Open the file named PR3-Data and then save it as PR3-


Williams.

2. Insert two new rows at the top of the worksheet.

3. Enter the following text in the indicated cells.


• A2: Category
• B2: Item
• C2: January
• O2: Yearly Total (adjust column width as needed
to fit this text)

4. Starting in C2, use the Auto Fill Handle to fill in the


months February through December in cells D2:N2. Ad-
just the widths of Column C to Column N to 10.
3.5 chapter practice 177

5. Select A2:O2.

6. Click Home ⇒ Font ⇒ Bold.

7. Click Home ⇒ Alignment ⇒ Center.

8. Click A1 and enter Williams Family Budget.

9. Select A1:O1.

10. Click Home ⇒ Alignment ⇒ Merge & Center.

11. Select A1:O1.

12. Click Home ⇒ Font ⇒ Bold.

13. Click Home ⇒ Font ⇒ 22 point.

14. Fill the cells for fixed expenses.


a) Copy C3:C4 and paste to D3:N4.
b) Copy C8:C9 and paste to D8:N9.
c) Copy C25 and paste to D25:N25.
d) Copy C27 and paste to D27:N27.
e) Copy C41 and paste to D41:N41.

15. Select O3:O44.

16. Click Formulas ⇒ Function Library ⇒ AutoSum.

17. Delete the formulas from O7, O17, O24, O32, and O38.

18. Select C6.

19. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C3:C5 for the AutoSum function
then press Enter . This will calculate the Total Income for
January.

20. Use the Auto Fill Handle to copy C6 to D6:O6.

21. Select C16.

22. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C8:C15 for the AutoSum func-
tion then press Enter . This will calculate the Total Home
Expenses for January.

23. Use the Auto Fill Handle to copy C16 to D16:O16.

24. Select C23.


178 formulas

25. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C18:C22 for the AutoSum func-
tion then press Enter . This will calculate the Total Daily
Living Expenses for January.

26. Use the Auto Fill Handle to copy C23 to D23:O23.

27. Select C31.

28. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C25:C30 for the AutoSum func-
tion then press Enter . This will calculate the Total Trans-
portation Expenses for January.

29. Use the Auto Fill Handle to copy C31 to D31:O31.

30. Select C37.

31. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C33:C36 for the AutoSum func-
tion then press Enter . This will calculate the Total Enter-
tainment Expenses for January.

32. Use the Auto Fill Handle to copy C37 to D37:O37.

33. Select C45.

34. Click Formulas ⇒ Function Library ⇒ AutoSum. Make


certain that Excel selects C39:C44 for the AutoSum func-
tion then press Enter . This will calculate the Total Personal
Expenses for January.

35. Use the Auto Fill Handle to copy C45 to D45:O45.

36. Select C3:O3.

37. Click Home ⇒ Number ⇒ Accounting.

38. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

39. Click Home ⇒ Font ⇒ Top Border

40. Select C16:O16.

41. Click Home ⇒ Number ⇒ Accounting.

42. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

43. Click Home ⇒ Font ⇒ Top Border


3.5 chapter practice 179

44. Select C23:O23.

45. Click Home ⇒ Number ⇒ Accounting.

46. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

47. Click Home ⇒ Font ⇒ Top Border

48. Select C31:O31.

49. Click Home ⇒ Number ⇒ Accounting.

50. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

51. Click Home ⇒ Font ⇒ Top Border

52. Select C37:O37.

53. Click Home ⇒ Number ⇒ Accounting.

54. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

55. Click Home ⇒ Font ⇒ Top Border

56. Select C45:O45.

57. Click Home ⇒ Number ⇒ Accounting.

58. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

59. Click Home ⇒ Font ⇒ Top Border

60. Select C4:O5.

61. Click Home ⇒ Number ⇒ Comma.

62. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

63. Select C8:O15.

64. Click Home ⇒ Number ⇒ Comma.

65. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

66. Select C18:O22.

67. Click Home ⇒ Number ⇒ Comma.


180 formulas

68. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

69. Select C25:O30.

70. Click Home ⇒ Number ⇒ Comma.

71. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

72. Select C33:O36.

73. Click Home ⇒ Number ⇒ Comma.

74. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

75. Select C39:O44.

76. Click Home ⇒ Number ⇒ Comma.

77. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

78. Click A47 and enter Total Expenses.

79. Click C47 and enter =SUM(C16,C23,C31,C37,C45)

80. Copy C47 to D47:O47.

81. Click A49.

82. Enter NET INCOME.

83. Click Home ⇒ Font ⇒ Bold.

84. Click Home ⇒ Alignment ⇒ Indent.

85. Click C49.

86. Enter =C6-C47.

87. Copy C49 to D49:O49.

88. Select C47:O47.

89. Click Home ⇒ Number ⇒ Accounting.

90. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

91. Click Home ⇒ Font ⇒ Bold.

92. Select C49:O49.


3.6 scored assessment 181

93. Click Home ⇒ Number ⇒ Accounting.

94. Click Home ⇒ Number ⇒ Decrease Decimal until there


are no decimal places displayed.

95. Click Home ⇒ Font ⇒ Bold.

96. Click Home ⇒ Font ⇒ Top and Bottom Border

97. Select C49:N49.

98. Click Home ⇒ Styles ⇒ Conditional Formatting ⇒


Data Bars ⇒ Gradient Fill Blue.

99. Click B50.

100. Enter New Apartment?.

101. Click C50.

102. Enter an IF statement in that displays the word No if the


amount in C49 is less than or equal to zero and Maybe if
the amount is greater than zero. Hint: remember that the
words “No” and “Maybe” must be enclosed in quotes.

103. Copy C50 to D50:N50.

104. Check to see if the IF statement worked correctly in Row


50. If the cells say No when the data bar in the cell above
it is red and Maybe when the data bar in the cell above
it is blue, then the IF statement is correct.

105. Review the worksheet in Print Preview. Make any


changes needed to make the worksheet print with land-
scape orientation on one page.

106. Save the PR3-Williams workbook.

107. Compare the result with the self-check answer key (PR3-
Williams Solution) and then close and submit the PR3-
Williams workbook as directed by the instructor.

3.6 scored assessment

3.6.1 Astrocoffee Company

Cynthia McHenry owns a coffee supply company named AstroCoffee.


She needs some help writing the formulas for the order form she uses
to invoice customers. Formulas are needed for all of the calculations
182 formulas

on the form. Some of the more complex parts are determining if the
customer will get a discount (based on the customer status) as well
as the shipping charge (orders over $200 get free shipping). Use IF
functions for both of those calculations.

1. Open the SC3-Data workbook and save it as SC3-


AstroCoffee.

2. Enter the following order information.


• Order #: 45676
• Order Date: use a function that displays the current
date

3. Enter the following Billing Information.

Edwina Copeland
4270 Heron Way Portland, OR 97225
503-779-1873
[email protected]

4. For the Shipping Information, create formulas using cell


references to display the corresponding information
from the Billing Information section. For example, the Cus-
tomer cell will display the name of the customer found
in C11.

5. In the range B19:E22, enter the following item orders:

Item # Description Qty Unit


Price

K56 Dark Mocha K-Cups (12 pack) 1 10.99


G03 Decaf Dark Roast – Ground (1 lb.) 3 12.99
B07 Dark Roast – Whole Bean (1 lb.) 2 13.99
K52 Chai Latte K-Cups (12 pack) 3 12.99

Table 10: AstroCoffee Orders


3.6 scored assessment 183

6. In cell F19, enter an IF function that tests whether the


order quantity in cell D19 is greater than 0 (zero). lf it
is, return the value of the Qty (in D19) multiplied by the
Unit Price (in E19), otherwise, return no text by entering
“”.

7. Copy/fill the formula in F19 F20:F25. Hint: be sure to


copy the formula to all of the Item Total cells, even if they
are blank so the worksheet is prepared for orders with
more items in the future.

8. In cell F26, calculate the sum of all of the Item Total cells.

9. In cell F27, use an IF function to calculate the discount


amount for this order based on the customer’s status
(which is found in F16). If the customer’s status is Pre-
ferred, the discount amount will be the Order Subtotal
times the discount percentage found in cell B29; oth-
erwise the discount amount will be 0 (zero). Hint: a for-
mula is needed for the Value if True argument.

10. Calculate the Discounted Total for this order in cell F28.
Hint: Use a simple subtraction formula.

11. In cell F29, use an IF function to display the correct Ship-


ping Charge, based on the amount of the Discounted To-
tal. If the Discounted Total is greater than or equal to the
Free Shipping Minimum found in cell B28, the Shipping
Charge is 0 (zero), otherwise, the Shipping Charge is 5%
of the Discounted Total. Hint: a formula is needed for
the Value if False to calculate what 5% of the Discounted
Total will be.

12. Calculate the Invoice Total in cell F31. Hint: This will be
the total of the Discounted Total and the Shipping Charge.

13. Review the worksheet in Print Preview. Make any


changes needed to make the worksheet print on one
page.

14. Save and close the SC3-AstroCoffee workbook.

15. Submit the SC3-AstroCoffee workbook as directed by


the instructor.
Part II

I N T E R M E D I AT E E X C E L

This part covers creating and using Excel charts to sim-


plify data analysis, including selecting an appropriate type
of chart for the audience and data. It next covers Excel ta-
bles and how they can be used to provide analysis tools
like filters to simplify data. Finally, this part covers us-
ing multiple worksheets for complex data structures. Stu-
dents who complete this part will be able to add graphic
elements to worksheets and will be prepared for more ad-
vanced topics.
P R E S E N T I N G D ATA W I T H C H A R T S
4
One of the most important things to consider when using charts in
Excel is that they are intended to be used for communicating an idea
to an audience, whether that audience is reading a written report or
listening to a presentation. Excel charts are often imported or pasted
into Word documents or PowerPoint slides, which serve the purpose
of communicating ideas to an audience. Although there are no rules
set in stone for using specific charts for certain data types, some chart
types are designed to communicate certain messages better than oth-
ers. This chapter explores numerous charts that can be used for a va-
riety of purposes. In addition, the chapter examines formatting charts
and using those charts in Word and PowerPoint documents.

4.1 choosing a chart type

Learning Objectives

• Construct a line chart to show a time series trend.


• Learn how to adjust the Y Axis scale.
• Construct a line chart to present a comparison of two
trends.
• Learn how to use a column chart to show a frequency
distribution.
• Create a separate chart sheet for a chart embedded in
a worksheet.
• Construct a column chart that compares two fre-
quency distributions.
• Learn how to use a pie chart to show the percent of
total for a data set.
• Construct a stacked column chart to show how a per-
cent of total changes over time.

This section reviews the most used Excel chart types. To demon-
strate the variety of chart types available in Excel, it is necessary to
use a variety of data sets. This is necessary not only to demonstrate
the construction of charts but also to explain how to choose the right
type of chart given the data and idea being communicated.
Here are a few key points to consider before creating any chart in
Excel.

187
188 presenting data with charts

• Identify the idea or message. It is important to keep in mind


that the primary purpose of a chart is to present quantitative in-
formation to an audience. Therefore, first decide what message
or idea is being presented. This is critical in selecting specific
data from a worksheet that will be used in a chart. This chap-
ter continually reinforces the idea of determining the intended
message before creating each chart.

• Select the right chart type, based on the data and the message
to communicate.

• Identify the values that should appear on the X Axis and Y


Axis. One of the ways to identify which values belong on the
axes is to sketch the chart on paper first. Visualizing the chart
first makes easier to select the information and then use Excel
to construct an effective chart that accurately communicates the
message.

Table 11, Key Steps Before Constructing an Excel Chart, provides a


summary of the preceding points.

Step Description
Identify the main idea being communicated. If there is
Define the
no main point or important message that can be
message
revealed by a chart, then do not create a chart.
Once there is a clear message, identify the data on a
Identify the worksheet that is needed to construct a chart. In some
data cases, formulas may be needed to better define the data,
needed or some data items may need to be consolidated into
broader categories.
Select a The type of chart selected will depend on the message
chart type being communicated and the data being presented.
After selecting a chart type, drawing a sketch is often
Identify the helpful in identifying which values should be on the X
values for Axis and Y Axis. In Excel, the axes are: the X, or
the X Axis “category,” axis, which is the horizontal axis, where the
and Y Axis labels are found; and the Y, or “value,” axis, which is the
vertical axis, where the numbers are found.

Table 11: Key Steps before Constructing an Excel Chart

4.1.1 Time Series Trend: Line Chart 1

Figure 138 shows part of the data that will be used to create two
different line charts. The first will show the trend of the NASDAQ
stock index1 .
1 The NASDAQ data was found at http://www.investopedia.com/terms/n/nasdaq.as
p
4.1 choosing a chart type 189

This chart will be used to communicate a simple message: to show


how the index has performed over a two-year period. This chart can
be used in a presentation to show whether stock prices have been
increasing, decreasing, or remaining constant over the designated pe-
riod.

Integrity Check

Carefully Select Data When Creating a Chart

Just because a worksheet contains data does not mean it


must all be placed onto a chart. When creating a chart,
it is common for only specific data points to be used. To
determine what data should be used when creating a
chart, start by identifying the message or idea that must be
communicated to the audience.

Figure 138: Stock Trends

Before creating the line chart, it is important to identify why it is


an appropriate chart type given the message being communicated
and the data available. When presenting the trend for any data over
a designated period, the most used chart types are the line chart and
the column chart. The line chart constructed in this exercise will show
the Month number on the X Axis and the volume of sales for the
NASDAQ on the Y Axis. Column charts will be used in later projects.

1. Open data file CH4-Data and save it as CH4-Charting.

2. Open the Stock Trend worksheet.

3. Select the range B4:C28. (Notice that labels in the B4:C4


and all the labels in B5:B28 are selected. Observe where
they show up in the completed chart.)
190 presenting data with charts

4. Click Insert ⇒ Charts ⇒ Line Chart Down Arrow ⇒ 2D


Line Chart (this is the first option from the Line Chart list,
see Figure 139).

Figure 139: Selecting the Basic Line Chart

This adds, or embeds, the line chart to the worksheet, as shown in


Figure 140. Notice where the labels showed up on the chart.
4.1 choosing a chart type 191

Why?

Line Chart vs. Column Chart

Both a line chart and a column chart can be used to


illustrate a trend over time. However, a line chart is far
more effective when there are many periods of time
being measured. For example, if fifty-two weeks are being
reported a column chart would require fifty-two bars. A
general rule of thumb is to use a column chart when
twenty bars or fewer are required. A column chart becomes
difficult to read as the number of bars exceeds twenty.

Notice that additional tabs, called “contextual” tabs, are added to


the ribbon when a chart is selected and only appear when the chart is
active. The commands in these tabs will be demonstrated throughout
this chapter.

Figure 140: Embedded Line Chart in the Stock Trend Worksheet

As shown in Figure 140, the embedded chart is not placed in an


ideal location on the worksheet since it is covering several cell lo-
cations that contain data. The following steps demonstrate common
adjustments that are made when working with embedded charts.
Note for the next step: The pointer will change into
the shape illustrated on the right when it is in
the right place to move the chart.
Note for the next step: The pointer will change into
the shape illustrated on the right when it is in
the right place to resize the chart.
192 presenting data with charts

1. Click and drag the chart until its upper left corner is
near the top-left corner of cell B30.

2. Place the mouse pointer over the sizing handle in the


upper right corner of the chart, hold down the Alt key
on the keyboard, and click and drag that handle until
it “snaps” to the top of Row 30 and the right side of
Column I.

3. Place the mouse pointer over the sizing handle in the


lower left corner of the chart, hold down the Alt key
on the keyboard, and click and drag that handle until it
“snaps” to the bottom of Row 45 and the left side “snaps”
to the left side of Column B.

4. Click the chart title once and then click in front of the
first letter. This should place a blinking cursor in front
of the letter which allows the title of the chart to be mod-
ified. Type the following in front of the first letter in the
chart title: May 2014-2016 Trend for NASDAQ Sales.

5. Click anywhere outside of the chart to deactivate it.

6. Save the CH4-Charting workbook.

Figure 141 shows the line chart after it is moved and resized. Notice
that the title of the chart has been edited to read May 2014-2016 Trend
for NASDAQ Sales Volume. Notice that the sizing handles do not ap-
pear around the perimeter of the chart since the chart has been deacti-
vated. To activate the chart, click anywhere inside the chart perimeter.
4.1 choosing a chart type 193

Figure 141: Line Chart Moved and Resized

Skill Refresher
Inserting a Line Chart

• Select a range of cells that contain data that will be


used to create the chart. Be sure to include labels in
the selection.
• Click Insert ⇒ Charts ⇒ Line Chart. Then, click the icon
for the specific type of chart desired.

Integrity Check

Category Axis

When using line charts in Excel, keep in mind that


anything placed on the X Axis is considered a descriptive
label, not a numeric value. This is an example of a category
axis. This is important because there will never be a change
in the spacing of any items placed on the X Axis of a line
chart. If numeric data must be placed on the category axis,
the chart will need to be modified, which is covered later
in the chapter.

4.1.1.1 Adjusting the Y Axis Scale

After creating an Excel chart, it may be necessary to adjust the scale


of the Y Axis. Excel automatically sets the maximum value for the
194 presenting data with charts

Y Axis based on the data used to create the chart and the minimum
value is usually set to zero. That is usually appropriate. However,
depending on the data used to create the chart, setting the minimum
value to zero can substantially minimize the graphical presentation of
a trend. For example, the trend shown in Figure 141 appears to be in-
creasing slightly in recent months. The presentation of this trend can
be improved if the minimum value of the Y Axis started at 500, 000
instead of zero. The following steps explain how to make this adjust-
ment to the Y Axis.

1. Click anywhere on the Y Axis (Value Axis or Vertical Axis)


on the May 2014-2016 Trend for NASDAQ Sales Volume
line chart in the Stock Trend worksheet.

2. Right Click and select Format Axis in the popup context


menu. The Format Axis pane should appear on the right
side of the screen, as shown in Figure 142. Note: If For-
mat Axis is not on the menu then the mouse was clicked
in the wrong location. Press Escape to turn the menu off
and try again.

Figure 142: Format Axis Pane

3. In the Format Axis pane, click the input box for the Mini-
mum axis option and delete the content of that box. Then
type the number 500000 and press Enter . As soon as this
change is made the Y Axis on the chart adjusts.

4. Click the X in the upper right corner of the Format Axis


pane to close it.

5. Save the CH4-Charting workbook.

Figure 143 shows the change in the presentation of the trend line.
Notice that with the Y Axis starting at 500, 000, the trend for the NAS-
DAQ is more pronounced. This adjustment makes it easier for the
audience to see the magnitude of the trend. Do be careful when ad-
4.1 choosing a chart type 195

justing the Y Axis. Adjusting the minimum or maximum of this axis


makes it easy to distort a relatively small trend to make it look bigger
than it really is.

Figure 143: Adjusted Y Axis for the S&P 500 Chart

Skill Refresher
Adjusting the Y Axis Scale

• Right-click anywhere along the Y Axis to popup the


context menu.
• Select Format Axis where changes can be made to the
axis.
• Enter the desired amounts for the Minimum or Maxi-
mum values.
• Click the Close button at the top right of the Format
Axis pane to close it.

4.1.2 Trend Comparisons: Line Chart 2

A second line chart will be created using the data in the Stock Trend
worksheet. The purpose of this chart is to compare two trends: the
change in NASDAQ Volume and Closing Price.
Before creating the chart to compare the NASDAQ Volume and Clos-
ing Price, it is important to review the data in the range B4:D28 on the
Stock Trend worksheet. Even a brief examination reveals that the NAS-
DAQ Volume and Closing Price cannot be used directly on the same
chart because the values are not comparable. That is, the NASDAQ
Volume is in a range of 684, 000 to 3, 711, 000 but the Closing Price is in
a range of $45.00 to $115.00. If these values are used without scaling,
the Closing Price would not be visible at all when compared to the
NASDAQ Volume.
196 presenting data with charts

The process to construct the second line chart will be like the first
one. The X Axis will be the month numbers in B4:D28.

1. Select the range B4:D28 on the Stock Trend worksheet.

2. Click Insert ⇒ Charts ⇒ Line Chart Down Arrow ⇒ 2D


Line Chart (this is the first option from the Line Chart
list).

Figure 144 shows the appearance of the line chart comparing the
NASDAQ Volume to the Closing Price before it is moved and resized.
Notice that the red line for Closing Price (labeled as Close in the legend)
appears as a straight line at the bottom of the chart. Also, the chart is
so large that it is covering the data and the title needs to be changed.

Figure 144: Trend Comparison Line Chart

1. Move the chart, so the upper left corner is in the middle


of cell M3.

2. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 3
Left Left of Column M
Bottom Bottom of Row 17
Right Right of Column U
4.1 choosing a chart type 197

3. Edit the Chart Title text box and replace the contents with
24 Month Trend Comparison.

The Closing Price data is just a flat red line at the very bottom of the
chart and cannot be seen very well. That is because the scale for this
chart goes from 0 to 4, 000, 000 so the Closing Price data is compressed
at the bottom of the scale. Complete the following steps to add a
secondary axis to correct this problem.

1. Right click the red line at the bottom of the chart that
represents the Closing Price.

2. On the popup context menu, select Format Data Series


to open the Format Data Series pane.

3. In the Series Options, select Secondary Axis.

Figure 145: Adding a Secondary Axis

The chart is better; but it would be nice to be able to see that the
values on the right represent prices rather than just numbers.

1. Right click the Secondary Vertical Axis. (The vertical axis


on the right that goes from 0 to 140.)

2. From the context menu, select Format Axis.

3. In Axis Options, select Number. (The menu may need to


be scrolled down.)

4. Use the Symbol list box to add the $ (see Figure 146).
198 presenting data with charts

5. Press the X (close) button to close the Format Axis pane.

6. Save the CH4-Charting worksheet.

Figure 146: Modifying the Secondary Axis

Now the chart makes it easy to compare the sales volume with the
closing price.

Figure 147: Final Comparison Line Chart


4.1 choosing a chart type 199

4.1.3 “Instant” Chart – F11

Excel includes an Instant Chart capability that makes charts easy to


add with only a few mouse clicks. While these charts may need to
be adjusted somewhat, they are often ready to use without any addi-
tional work. Follow these steps to add an “instant” chart.

1. Select A4:A28 on the Stock Trend worksheet.

2. Hold down the Ctrl key and select D4:D28. Figure 148
shows the top of the two selected columns.

Figure 148: Range Selection

3. Press F11 . If the factory default settings have not been


changed, Excel will create a column chart and place it
on a separate chart sheet, as illustrated in Figure 149.

4. Change the name of the new worksheet by double-


clicking its name: Chart1. Type Closing Prices as the
new name and press Enter .

5. Save the CH4-Charting workbook.


200 presenting data with charts

Figure 149: Instant Chart

4.1.4 Frequency Distribution: Column Chart 1

A column chart is used to show trends over time if the data is limited
to no more than twenty points. A common use for column charts is a
frequency distribution, which shows the number of occurrences by es-
tablished categories. For example, a common frequency distribution
used in most academic institutions is a grade distribution. A grade
distribution shows the number of students that achieve each level of a
typical grading scale (A, A-, B+, B, etc.). The Grade Distribution work-
sheet contains final grades for several hypothetical Excel classes. To
show the grade frequency distribution for all the Excel classes in that
year, the numbers of students appear on the Y Axis and the grade cat-
egories appear on the X Axis. The number of students for this chart
is in Column C. The labels for grades are in Column A. The following
steps explain how to create this chart.

1. Click the Grade Distribution worksheet to activate it.

2. Change the years in Row 3 to the current academic term


and year.

3. Select A3:A8, which shows the grade categories.

4. Press Crtl and select C3:C8

5. Click Insert ⇒ Charts ⇒ Column ⇒ Clustered Column


(this is the first option in the 2-D Column section).
4.1 choosing a chart type 201

Figure 150: Selecting a Column Chart

6. Click and drag the chart, so the upper left corner is in


the middle of cell H2.

7. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 2
Left Left of Column H
Bottom Bottom of Row 10
Right Right of Column O

8. Excel may have automatically created a legend with the


chart, but since the it presents only one data series, a
legend is not necessary. Delete it by clicking it one time
and pressing the Delete key on the keyboard.

9. Add the text Final Grades for to the beginning of the


chart title. The chart title should now be Final Grades
for All Excel Classes 2020/2021 (or whichever academic
year is being used).

10. Click any cell location on the Grade Distribution work-


sheet to deactivate the chart.
202 presenting data with charts

11. Save the CH4-Charting workbook.

Figure 151 shows the completed grade frequency distribution chart.


By looking at the chart, it is obvious that the greatest number of stu-
dents earned a final grade in the B+ to B- range.

Figure 151: Grade Frequency Distribution Chart

4.1.5 Creating a Chart Sheet

The charts that have been created up to this point have been added
to, or embedded in, an existing worksheet (except the Instant Chart
created using F11 ). Charts can also be placed in a dedicated work-
sheet called a chart sheet because it contains only an Excel chart. Chart
sheets are easier to navigate than having multiple charts embedded
in a single worksheet. The following steps explain how to move the
grade frequency distribution chart to a dedicated chart sheet.

1. Right-click anywhere near the edge of the Final Grades


for All Excel Classes chart on the Grade Distribution work-
sheet.

2. Select Move Chart, which opens the Move Chart Dialog


box.

3. Click the New sheet option on the Move Chart dialog


box. (The top option.)

4. The entry in the input box for assigning a name to the


chart sheet tab should automatically be highlighted once
the New sheet option is clicked. Type All Excel Classes.
4.1 choosing a chart type 203

This replaces the generic name in the input box (see Fig-
ure 152).

5. Click the OK button at the bottom of the Move Chart


dialog box. This adds a new chart sheet to the workbook
with the name All Excel Classes.

6. Save the CH4-Charting workbook.

Figure 152: Moving a Chart to a Chart Sheet

Why?

Column Chart vs. Bar Chart

When using charts to show frequency distributions,


the difference between a column chart (where the bars are
vertical) and a bar chart (where the bars are horizontal) is
really a matter of preference. Both are effective in showing
frequency distributions. However, to show a trend over
a period of time, a column chart is preferred because a
period is typically shown on a horizontal axis, with the
oldest date on the left edge and the newest date on the
right edge.

Figure 153 shows the Final Grades for all Excel Classes column chart
is in a separate chart sheet. Notice the new worksheet tab added to
the workbook matches the name entered into the Move Chart dialog
box. Since the chart is moved to a separate chart sheet, it is no longer
displayed in the Grade Distribution worksheet.
204 presenting data with charts

Figure 153: Chart Sheet Added to the Workbook

4.1.6 Frequency Comparison: Column Chart 2

A second column chart will be created to show a comparison be-


tween two frequency distributions. Column B on the Grade Distribu-
tion worksheet contains data showing the number of students who
received grades within each category for the Spring Quarter. This col-
umn chart will compare the grade distribution for Spring (Column
B) with the overall grade distribution for the whole year (Column C).
However, since the number of students in the term is significantly
different from the total number of students in the year, a percentage
must be calculated to make an effective comparison. The following
steps explain how to calculate the percentages.

1. Click the Grade Distribution tab to activate that work-


sheet.

2. Select the range B9:C9.

3. Click Home ⇒ Editing ⇒ Autosum. This automatically


adds SUM functions that sum the values in the range
B4:B8 and C4:C8.

4. Click E4.

5. Enter a formula that divides the value in cell B4 by the


total in cell B9. Add an absolute reference to cell B9 in
the formula, like this =B4/$B$9.

6. Copy the formula in cell E4 and paste it into the range


E5:E8 using the Paste command or with the Auto Fill
Handle.

7. Click F4.
4.1 choosing a chart type 205

8. Enter a formula that divides the value in cell C4 by the


total in cell C9. Add an absolute reference to cell C9 in
the formula, like this =C4/$C$9.

9. Copy the formula in cell F4 and paste it into the range


F5:F8 using the Paste command or the Auto Fill Handle.

Figure 154 shows the completed percentages added to the Grade


Distribution worksheet.

Figure 154: Completed Grade Distribution Percentages

Next, create a column chart that uses the grade categories in the
range A4:A8 on the X Axis and the percentages in the range E4:F8 on
the Y Axis.

1. Select A3:A8 then hold down the Ctrl key and select
E3:F8.

2. Click Insert ⇒ Charts ⇒ Column. Select the first option


from the drop-down list of chart formats, which is the
2-D Clustered Column.

3. Click and drag the chart, so the upper left corner is in


the middle of cell H2.

4. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.
206 presenting data with charts

Chart Side Locked To


Top Top of Row 2
Left Left of Column H
Bottom Bottom of Row 10
Right Right of Column N

5. Change the chart title to Grade Distribution Compari-


son. To add a chart title if one is not present, click Chart
Tools Design ⇒ Chart Layouts ⇒ Add Chart Element
⇒ Chart Title ⇒ Above Chart.

6. Save the CH4-Charting workbook.

Figure 155 shows the completed data series operation.

Figure 155: Completed Data Series for the Class Grade Distribution

Figure 156 shows the final appearance of the column chart. The
column chart is an appropriate type for this data because there are
fewer than twenty data points and it is easy to compare each cate-
gory. A reader can quickly see that the spring class issued fewer A’s
compared to the rest of the academic year, but more B’s and C’s.
4.1 choosing a chart type 207

Figure 156: Completed Grade Distribution Column Chart

Integrity Check

Too Many Bars on a Column Chart?

Although there is no specific limit for the number of


bars used on a column chart, a general rule of thumb is
twenty bars or less. Figure 157 contains a total of thirty-two
bars. This is considered a poor use of a column chart
because it is difficult to identify meaningful trends or
comparisons. The data used to create this chart might be
better used in two or three different column charts, each
with a distinct idea or message.

Figure 157: Poor Use of a Column Chart


208 presenting data with charts

4.1.7 Percent of Total: Pie Chart

A pie chart is used to show a percent of total for a data set at a specific
point in time. The data used to demonstrate a pie chart is related to
enrollment data for Portland Area Community Colleges for Fall of
2014. That data is found on the Enrollment Statistics sheet.

1. Click the Enrollment Statistics worksheet to activate it.

2. Select A2:B6.

3. Click Insert ⇒ Charts ⇒ Pie ⇒ The First 2-D Option.

4. To make the “slices” stand out better, choose to “ex-


plode” the pie chart using the following steps.
• Click and hold the mouse button down in any of
the slices of the pie. Note that there are selection
handles on all the pie slices.
• Without letting go of the mouse button, drag one
of the slices away from the center.
• All the slices “explode” out from the center.
• Note: if the mouse button is released and clicked
a second time before dragging a “slice” of the pie
then only that one slice will move. This is another
option for displaying the data. If this happens acci-
dentally, use the Undo button, and then try again.

5. Click off the slices and then click the white canvas to
deselect the pie and select the entire chart.

6. Click and drag the pie chart, so the upper left corner is
in the middle of cell E2.

7. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 2
Left Left of Column E
Bottom Bottom of Row 10
Right Right of Column L
4.1 choosing a chart type 209

Figure 158: Pie Chart Moved and Resized

8. Click the chart legend once and press the Delete key. A
pie chart typically shows labels next to each slice. There-
fore, the legend is not needed.

9. Right click any of the slices in the pie chart and select
Add Data Labels from the list. This will add the values
for each of the slices in the pie.

10. Now, right click one of the numbers that was just added
to the pie chart and select Format Data Labels from the
list. This will open the Format Data Labels pane on the
right.

11. Check the boxes for Category Name and Percentage


then uncheck the Value box in the Label Options section
in the Format Data Labels pane (see Figure 159).

12. Click the Close button at the top of the Format Data Labels
pane.

13. Select the data labels again (if needed) by clicking on


one of the labels. Click Home ⇒ Font ⇒ Bold to make
the labels bold font.

14. Save the CH4-Charting workbook.


210 presenting data with charts

Figure 159: Final Settings in the Format Data Labels Pane

Although there are no specific limits for the number of categories


that can be used on a pie chart, a good rule of thumb is ten or less.
As the number of categories exceeds ten it becomes more difficult
to identify key categories that make up most of the total. Figure 160
shows the completed pie chart.

Figure 160: Final Enrollment Statistics Pie Chart

Skill Refresher
Inserting a Pie Chart

• Select a range of cells that contain the data used to


create the chart.
• Click Insert ⇒ Charts ⇒ Pie.
• Select a format option from the Pie Chart drop-down
menu.
4.1 choosing a chart type 211

4.1.8 Percent of Total: Stacked Column Chart

The last chart type demonstrated in this chapter is the stacked column
chart. A stacked column chart is used to show a percent of a total.
For example, the data on the Enrollment Statistics worksheet shows
student enrollment by race for several colleges. Suppose that it was
necessary to show all the data for all colleges.

1. Click the Enrollment Statistics worksheet to activate it


if it is not already activated.

2. Select A2:D6.

3. Click Insert ⇒ Charts ⇒ Column. Select the 100%


Stacked Column format option from 2-D Column sec-
tion in the drop-down list (see Figure 161).

Figure 161: Selecting the 100% Stacked Column Chart

Figure 162 shows the column chart that is created after selecting
the 100% Stacked Column format option. As mentioned, the goal of
this chart is to show the enrollment of students by race. However,
notice that Excel places the racial categories on the X Axis. It would
be more useful if the college names were on that axis instead.
212 presenting data with charts

Figure 162: Initial Construction of the 100% Stacked Column Chart

The reason that Excel organized the data this way is that there
are more Race/ethnicity categories (data in Column A) than there are
colleges (data in Row 2). This is not a bad guess on Excel’s part; but
this is not what is wanted in this case. The next steps explain how to
correct this problem and complete the chart.

1. Click Chart Tools Design ⇒ Data ⇒ Switch Row/Col-


umn. This reverses the legend and current X-Y Axis cat-
egories. ( Excel 365 named the tab Chart Design.)

Figure 163: Switch Row/Column

2. Click and drag the chart, so the upper left corner is in


the middle of cell E12.

3. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.
4.1 choosing a chart type 213

Chart Side Locked To


Top Top of Row 12
Left Left of Column E
Bottom Bottom of Row 30
Right Right of Column N

4. Click the legend one time and press the Delete key on
the keyboard.

5. Add a Data Table. This is another way of displaying a


legend for a column chart along with the numerical val-
ues that make up each component.

6. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Data Table ⇒ With Legend Keys.
( Excel 365 named the tab Chart Design.)

7. Change the Chart Title to Enrollment by Race. If there is


no chart title, click Chart Tools Design ⇒ Chart Layouts
⇒ Add Chart Element ⇒ Chart Title ⇒ Above Chart.
( Excel 365 named the tab Chart Design.)

8. Save the CH4-Charting workbook.

Figure 164 shows the final stacked column chart. Notice the sim-
ilarities and differences in the enrollments at the local community
colleges.

Figure 164: Final 100% Stacked Column Chart


214 presenting data with charts

Skill Refresher
Inserting a Stacked Column Chart

• Select a range of cells that contain data that will be


used to create the chart.
• Click Insert ⇒ Charts ⇒ Column.
• Select the Stacked Column format option from the Col-
umn Chart drop-down menu to show the values of
each category on the Y Axis. Select the 100% Stacked
Column option to show the percent of total for each
category on the Y Axis.

Key Take-Aways

Save

• Identifying the message to be conveyed to an audi-


ence is a critical first step in creating an Excel chart.
• Both a column chart and a line chart can be used to
present a trend over a period. However, a line chart is
preferred over a column chart when presenting data
over long periods of time.
• The number of bars on a column chart should be lim-
ited to twenty bars or less.
• When creating a chart to compare trends, the val-
ues for each data series must be within a reasonable
range. If there is a wide variance between the values
in the two data series (two times or more), the percent
change should be calculated with respect to the first
data point for each series.
• When working with frequency distributions, the use
of a column chart or a bar chart is a matter of pref-
erence. However, a column chart is preferred when
working with a trend over a period.
• A pie chart is used to present the percent of total for
a data set.
• A stacked column chart is used to show how a percent
total changes over time.
4.2 formatting charts 215

4.2 formatting charts

Learning Objectives

• Apply formatting commands to the X Axis and Y


Axis.
• Enhance the visual appearance of the chart title and
chart legend by using various formatting techniques.
• Assign titles to the X Axis and Y Axis that clarify la-
bels and numeric values for the reader.
• Apply labels and formatting techniques to the data
series in the plot area of a chart.
• Apply formatting commands to the chart area and the
plot area of a chart.
• Employ series lines and annotations to enhance
trends and provide additional information on a chart.

A variety of formatting techniques can be used to enhance the ap-


pearance of a chart once it is created. Formatting commands are ap-
plied to a chart for the same reason they are applied to a worksheet,
they make the chart easier to read. However, formatting techniques
also help qualify and explain the data in a chart. For example, foot-
notes can be added that explain the data source as well as notes that
clarify the type of numbers being presented (i. e., if the numbers in a
chart are truncated, a note can state whether they are in thousands,
millions, etc.). These notes are also helpful in answering questions
when using charts in a live presentation. This section demonstrates
these formatting techniques using the column chart and stacked col-
umn chart from the previous section.

4.2.1 Axis Formats

There are numerous formatting commands that can be applied to the


X Axis and Y Axis of a chart. Although adjusting the font size, style,
and color are common, many more options are available through the
Format Axis pane. The following steps demonstrate a few of these for-
matting techniques on the Grade Distribution Comparison chart. (Note:
this section continues the previous exercise. Students who only need
to complete this section can open CH4-Charting Solution 1 1 to start
where the previous exercise ended.)

1. Switch to the Grade Distribution worksheet and click


anywhere along the X Axis (horizontal axis) of the Grade
Distribution Comparison chart.
216 presenting data with charts

2. Right click and select Font.

3. Change the font to Arial, the Font Style to Bold, and the
Size to 11 (see Figure 165).

4. Click OK.

Figure 165: Font Dialog Box

5. Click anywhere along the Y Axis to activate it.

6. Right click and select Font.

7. Change the font to Arial, the Font Style to Bold, and the
Size to 11.

8. Click on the chart title.

9. Right click and select Font.

10. Change the font to Arial, the Font Style to Bold, and the
Size to 14.

11. The final appearance of the axes is shown in Figure 166.


4.2 formatting charts 217

Figure 166: Formatted X and Y Axes

Next, make some changes to the percentage numbers on the Y Axis


(vertical axis).

1. Right click the Y Axis.

2. Select Format Axis. This opens the Format Axis pane.

3. Click Number at the bottom of list of options. The op-


tions in this section of the Format Axis pane are used to
format the numbers that appear on the axis.

4. Click in the Decimal places input box and change the


value to 1.

5. Select Axis Options at the top of the list of options.

6. Change the Minimum Bound to .05 to make the differ-


ences in the columns more dramatic. The Format Axis
pane should match Figure 167.

7. Click the Close button at the top of the Format Axis pane.

8. Save the CH4-Charting workbook.


218 presenting data with charts

Figure 167: Format Axis Pane Changes

Note
Experiment!

The font styling can also be changed using shortcut


keys and the buttons on the Home tab.

Skill Refresher
Formatting the X Axis and Y Axis

• Click anywhere along the X Axis or Y Axis to activate


it.
• Click either the Home tab or Chart Tools Design tab of
the ribbon.
• Select any of the available formatting commands in
these tabs.
4.2 formatting charts 219

Skill Refresher
X Axis and Y Axis Number Formats

• Click anywhere along the X Axis or Y Axis to activate


it.
• Click Chart Tools Format ⇒ Format Selection.
• Click Number from the list of options on the left side
of the Format Axis dialog box.
• Select a number format and set decimal places on the
right side of the Format Axis dialog box.
• Click the Close button in the Format Axis pane.

4.2.2 Chart Legend and Title Formats

The next items to be formatted on the Grade Distribution Comparison


chart are the chart legend and title. Like the X Axis and the Y Axis,
format these items by activating them and using commands in the
Home tab or the Format pane. The following steps explain how to
change these formats.

1. Right click the legend on the Grade Distribution Compari-


son chart and select Format Legend.

2. Select Right in the Legend Position options.

3. Close the Format Legend pane.

4. Move the legend by placing the cursor, shaped like a


plus sign with four arrows, on the edge of the selection
box. Click and drag the legend so the top of the legend
aligns with the 35% line next to the plot area (see Figure
168).

Figure 168: Moving the Legend

5. While the legend is still selected, change Home ⇒ Font


to Arial, Bold, Italics, Size 12.
220 presenting data with charts

6. Click and drag the left sizing handle so the legend is just
touching the horizontal grid lines of the plot area and
the bottom sizing handle, so the entire legend is visible
(see Figure 169).

Figure 169: Legend Formatted and Resized

7. Right click on the chart title and select Format Chart


Title to open the Format Chart Title pane (see Figure 170).

8. Under Title Options in the Effects group (the option in


the middle) select the first outer preset shadow.

9. Select Blue, Accent 1 as the shadow color.

10. Close the Format Chart Title pane.

11. Save the CH4-Charting workbook.


4.2 formatting charts 221

Figure 170: Format Chart Title Pane

Skill Refresher
Formatting the Chart Legend

• Click the Legend to activate it.


• Click either the Home tab or right click to activate the
appropriate formatting pane.
• Select any of the available formatting commands.
• Click and drag the legend to move it.
• Click and drag any of the sizing handles to adjust the
size of the legend.

Skill Refresher
Formatting the Chart Title

• Click anywhere on the chart title.


• Click either the Home tab or right click to activate the
appropriate formatting pane.
• Select any of the available formatting commands.
222 presenting data with charts

4.2.3 X Axis and Y Axis Titles

Titles for the X Axis and Y Axis are necessary for defining the num-
bers and categories presented on a chart. For example, by looking at
the Grade Distribution Comparison chart, it is not clear what the per-
centages along the Y Axis represent. The following steps explain how
to add titles to the X Axis and Y Axis to define these numbers and
categories.

1. Click anywhere on the Grade Distribution Comparison


chart in the Grade Distribution worksheet to activate it.

2. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Axis Titles ⇒ Primary Vertical (See
Figure 171). ( Excel 365 named the tab Chart Design.)

Figure 171: Adding a Title for the Y Axis

3. Using Home ⇒ Font, change the font of the axis title to


Arial, Bold, Size 11.

4. Click in the beginning of the Y Axis title and delete the


generic title, then type Percent of Enrolled Students (see
Figure 172).
4.2 formatting charts 223

Figure 172: Adding and Formatting the Y Axis Title

Next, add the title for the X Axis.

1. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Axis Titles ⇒ Primary Horizontal.
( Excel 365 named the tab Chart Design.)

2. Using Home ⇒ Font, change the font of the axis title to


Arial, Bold, Size 11.

3. Click in the beginning of the X Axis title and delete the


generic title, then type Final Course Grade. Figure 173
shows the added titles for the X Axis and Y Axis. The
titles provide definitions for the grade categories along
the X Axis as well as the percentages on the Y Axis.

4. Save the CH4-Charting workbook.


224 presenting data with charts

Figure 173: X and Y Axis Titles Added

Skill Refresher
X Axis and Y Axis Titles

• Click anywhere on the chart to activate it.


• Click Chart Tools Design ⇒ Chart Layouts ⇒ Add Chart
Element.
• Select one of the options from the second drop-down
list.
• Click in the axis title to remove the generic title and
type a new title.

4.2.4 Data Series Labels and Formats

Adding labels to the data series of a chart is a key formatting feature.


A data series is the item that is being displayed graphically on a chart.
For example, the blue bars on the Grade Distribution Comparison chart
represent one data series. Labels can be added at the end of each bar
to show the exact percentage the bar represents. In addition, other
formatting enhancements can be added to the data series, such as
changing the color of the bars or adding an effect. The following steps
explain how to add these labels and formats to the chart.

1. Click on any of the red bars representing the All Excel


Classes data series on the Grade Distribution Comparison
chart in the Grade Distribution worksheet. Clicking one
bar automatically activates all bars in the data series. If
4.2 formatting charts 225

a bar is clicked a second time, only that one bar is acti-


vated.

2. Right click and select Format Data Series to open the


Format Data Series pane.

3. Click the Fill and Line (paint bucket) button to bring up


the Fill and Border group of commands.

4. Click the word Fill (if needed) to expand the list of Fill
options.

5. Select Pattern Fill. Then select Dotted: 30% (fifth column,


top row). Changing the fill pattern to a pattern makes
it easier to distinguish between the data series when
the chart is printed or viewed in black and white. Ex-
periment with the fill pattern by selecting different fore-
ground and background colors.

6. Close the Format Data Series pane.

Figure 174: Changing the Fill of a Data Series

Next, add the Data Labels at the end of the columns.

1. Be sure that the entire chart is selected, not just one of


the data series.
226 presenting data with charts

2. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Data Labels ⇒ Outside End (see Fig-
ure 175.) ( Excel 365 named the tab Chart Design.)

3. Click on one of the Data Labels for the first data series.
Notice that all the data labels for that data series are
selected.

4. Using Home ⇒ Font, change the font to Arial, Bold, Size


9.

5. Click on one of the data labels for the second data series.
Using Home ⇒ Font, change the font to Arial, Bold, Size
9.

6. Save the CH4-Charting workbook.

Figure 175: Adding Labels to a Data Series

Figure 176 shows the Grade Distribution Comparison chart with the
completed formatting adjustments and labels added to the data series.
Note that each individual data label can be moved if two data labels
4.2 formatting charts 227

overlap or if a data label falls in the middle of a grid line. To move an


individual data label, click it twice and then click and drag.

Figure 176: Completed Formatting Adjustments for the Data Series

Skill Refresher
Adding Data Labels

• Click anywhere on the chart to activate it.


• Click Chart Tools Design ⇒ Chart Layouts ⇒ Add Chart
Element.
• Select Data Labels
• Select one of the preset positions from the drop-down
list.

Skill Refresher
Formatting a Data Series

• Click any bar or line for a data series.


• Right click to activate the Format Data Series pane.
• Use the formatting tools in the pane to make changes
to the data series.

4.2.5 Adding Series Lines and Annotations to a Chart

Series lines are used in stacked column charts to show the change
from one stack to the next. Annotations are useful for clarifying the
data presented in a chart or for identifying data sources. In addition
to demonstrating these skills, this section will review several of the
formatting skills that were covered earlier.
228 presenting data with charts

1. Locate the Enrollment by Race stacked column chart on


the Enrollment Statistics worksheet. Activate the chart
by clicking anywhere inside the chart perimeter.

2. Click Chart Tools ⇒ Design ⇒ Location ⇒ Move Chart.


( Excel 365 named this tab Chart Design.)

3. Select New sheet and type the following in the input box:
Enrollment by Race Chart.

4. Click OK. The chart will be moved to a new worksheet


and that sheet will be activated.

5. Click anywhere on the data table (on the X Axis) to ac-


tivate it. When active, the data table will have a resizing
handle at each of the four corners.

6. Using Home ⇒ Font, change the font to Arial, Bold, size


12.

7. Click on the Y Axis and apply the same formatting ad-


justments as used in the data table.

8. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Axis Titles ⇒ Primary Vertical.
( Excel 365 named the tab Chart Design.)

9. Double-click in the default Y Axis title and change it to


Percent Enrollment by Race.

10. Click the border of the Y Axis title to select the entire
title. When active, the title will have a resizing handle at
each of the four corners.

11. Using Home ⇒ Font, change the font to Arial, Bold, size
14.

12. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Element ⇒ Axis Titles ⇒ More Axis Title Op-
tions. ( Excel 365 named the tab Chart Design.)

13. Click the Y Axis title to select it. When active, the title
will have a resizing handle at each of the four corners.

14. In the Format Axis Title pane change the fill color to Blue,
Accent 1, Lighter 80% and the border color to Dark Blue,
Text 2, Lighter 60% .

15. Check the horizontal axis to see if this process created


an extra axis title there. If it did, delete it.
4.2 formatting charts 229

16. Activate the title of the chart by clicking it once. The


Format Chart Title pane should be open. If not, right click
the Chart title and select Format Chart Title from the
menu. Change the fill and border to match the vertical
Axis label.

17. Using Home ⇒ Font, change the font of the chart title
to Arial, Bold, size 20.

18. Close the Format Chart Title pane.

19. Click Chart Tools Design ⇒ Chart Layouts ⇒ Add


Chart Elements ⇒ Lines ⇒ Series Lines. ( Excel 365
named the tab Chart Design.) This adds lines to the chart,
connecting each data series between the three stacks (see
Figure 177).

Figure 177: Selecting the Series Lines Option

20. Right click on any of the series lines added to the chart.
Clicking one line will activate all lines on the chart. (If
the Format pane is open there is no need to right click.
Just left click on any of the series lines to change the
format pane to Format Series Lines.)

21. Select Format Series Lines. This will open the Format
Series Lines pane.

22. Change the width to 2.25 pt.

23. Close the Format Series Lines pane.


230 presenting data with charts

Figure 178 shows the appearance of the chart with the series lines
connecting the two stacks. This formatting enhancement is common
for stacked column charts. The lines help focus the audience’s atten-
tion to changes in the percent of total trend.

Figure 178: Series Lines Added to the Stacked Column Chart

The chart demonstrates the percentage differences in enrollment


between the community colleges. But it would be handy to know the
total enrollment at each of the colleges. To display that, add text boxes
above each column. To start, make room for the text boxes.

1. Select the Plot Area. Place cursor on the top center han-
dle of the Plot Area and drag down about 1/2 inch. (See
Figure 179.)
4.2 formatting charts 231

Figure 179: Resizing the Plot Area

4.2.6 Add Additional Information to the Chart.

1. Click Insert ⇒ Text ⇒ Text Box.

2. Place the mouse pointer on the left edge of the chart area
approximately one-quarter inch from the top. Click and
drag a rectangle approximately one and a half inches
wide and one-quarter inch high. Do not worry if it is not
exact, it will be moved and resized later.

3. Type Total Enrollment in the text box.

4. Select all the text in the text box. (The text can be selected
by either dragging over it with the mouse or by clicking
on the border of the text box once).

5. Click Home ⇒ Font. Change the font to Arial, size 14.

6. Resize and position the text box, so it fits above the 100%
label on the Y Axis, as in 180

7. Repeat the process to add and format text boxes above


each column. The boxes can be copy/pasted to save
time.

8. In each text box, type the Total Enrollment for each


school:
232 presenting data with charts

• Mt Hood — 9,276
• Portland — 30,929
• Clackamas — 7,302

9. Check to be sure the text boxes look like Figure 180 and
then save the CH4-Charting workbook.

Figure 180: Enrollment Text boxes Added

10. Excel also makes several graphic objects like circles, ar-
rows, and stars available to draw attention to elements
on charts. It is important to keep in mind the purpose
of a chart is to present information to the audience, not
show off the skill of the designer, so do not overdo these
types of graphic objects.

11. Click the chart to activate it if it is not already active.

12. Click Insert ⇒ Illustrations ⇒ Shapes ⇒ Callouts ⇒


Rounded Rectangular Callout (see Figure 181). ( Excel 365
named this callout Speech Bubble: Rectangle with Corners
Rounded.)
4.2 formatting charts 233

Figure 181: Selecting Rounded Rectangular Callout

13. Drag a square on the graph. Do not worry about exact


placement since the text square and callout line will be
resized and repositioned later. See Figure 182 for guid-
ance.
14. The callout is initially filled with blue, but that does
not offer enough contrast with the chart bar. The For-
mat Shape panel opens when the callout is added. If the
Format Shape panel did not open, right-click on the call-
out and select Format Object. Click the Shape Options tab
on the format panel and make these adjustments.
a) Select Orange, Accent 6, Lighter 60% as the fill color
for the box.
b) Select Orange, Accent 6, Darker 25% as the color for
the line.
c) Set the line width to 2.5 pt.
15. Click the Text Options tab on the format panel and make
sure the text fill is black.
16. Double-click inside the callout box and enter Diversity
Program Result.
234 presenting data with charts

17. Click the border of the callout box to select it.

18. Using Home ⇒ Font, change the font to Arial, 12pt, Bold
font.

19. Click Home ⇒ Alignment ⇒ Center.

20. Using the drag handles, resize and position the callout
box so it is like Figure 182.

21. Save the CH4-Charting workbook.

Figure 182: Completed Stacked Column Chart

Skill Refresher
Adding Series Lines

• Click anywhere on the chart area.


• Click Chart Tools Design ⇒ Chart Layouts ⇒ Add Chart
Elements ⇒ Lines ⇒ Series Lines.
4.2 formatting charts 235

Skill Refresher
Adding Annotations

• Click anywhere on the chart area.


• Click Insert ⇒ Text ⇒ Text Box.
• Click and drag the size of the text box needed on the
chart.
• Apply any desired format changes from the Home tab
of the ribbon.
• Type the desired text.

Integrity Check

Annotations and Axis Titles

Although adding annotations and axis titles can be a


tedious process, doing so creates a high level of integrity
for charts. People can misinterpret the message being
conveyed by the chart if they make inaccurate assumptions
about the values displayed. Axis titles and annotations
help prevent readers from making false assumptions and
ensure that readers see the most accurate representation of
the message being conveyed by the chart.

Key Take-Aways

Formatting Charts

• Applying appropriate formatting techniques is criti-


cal for making a chart easier to read.
• Many formatting commands in the Home tab of the
ribbon can be applied to a chart.
• To change the number format for a data label, use the
Number section in the Format Data Labels dialog box.
Note that number format commands in the Home tab
of the ribbon cannot be used for a data label.
• To change the number format for the values on the
Y Axis, and the X Axis, use the Number section of the
Format Axis dialog box. Note that number format com-
mands in the Home tab of the ribbon cannot be used
for axis labels.
• Axis titles and annotations help prevent false assump-
tions from being made and ensure that the reader sees
the most accurate representation of the information
presented on a chart.
236 presenting data with charts

4.3 using charts with microsoft word and microsoft


powerpoint

Learning Objectives

• Learn how to paste an image of an Excel chart into a


Word document.
• Learn how to paste a link to an Excel chart into a
PowerPoint slide.

Charts that are created in Excel are used in Microsoft Word® doc-
uments or PowerPoint® presentations and Excel provides options for
pasting a chart’s image into either. Additionally, a link can be estab-
lished between Excel and Word or PowerPoint so that if the data
changes in the Excel file it is automatically updated in the Word or
PowerPoint files. Both methods of sharing a chart are covered in this
section.

4.3.1 Pasting a Chart Image Into Word

This exercise needs two files:

• The Excel spreadsheet used in this chapter: CH4-Charting. (Note:


this section continues the previous exercise. Students who only
need to complete this section can open CH4-Charting Solution
1 2 to start where the previous exercise ended.)

• This Word document: CH4-Diversity

Excel charts can be valuable tools for explaining quantitative data


in a written report. Reports that address business plans, public poli-
cies, budgets, and so on all involve quantitative data. For this exam-
ple, assume that the Enrollment by Race stacked column chart (Figure
182) is being used in a student’s written report. The following steps
demonstrate how to paste an image, or picture, of this chart into a
Word document.

1. Open the Word document, CH4-Diversity. (Note: the


student files include both a Word document and Pow-
erPoint presentation named Diversity. Be sure to open
the Word document for this activity.) Save it as CH4-
Diversity Report.

2. Click below the figure heading in the Word document


that reads: Figure 1: Enrollment by Race. The image of the
stacked column chart will be placed below this heading.
4.3 using charts with microsoft word and microsoft powerpoint 237

3. If needed, open the Excel file used in this chapter, CH4-


Charting.

4. Click the Enrollment by Race chart in the Enrollment by


Race Chart sheet to active the chart.

5. Click Home ⇒ Copy Down Arrow ⇒ Copy as Picture.

6. The Copy Picture dialog box will open. Select OK — Ac-


cepting the Copy Pictures defaults:
• As shown on Screen
• Picture

7. Go back to the CH4-Diversity Report Word document


by clicking the file in the taskbar.

8. Confirm that the insertion point is below the Figure 1:


Enrollment by Race heading (see Figure 183).

9. Click Home ⇒ Paste (or press Crtl + V ).

Figure 183: Paste Picture in Word

Unfortunately, the picture is so big that it overlaps the next page.


Use this procedure to change its size.

1. Click anywhere on the picture to activate it.

2. Click Picture Tools ⇒ Format ⇒ Size ⇒ Shape Width


Down Arrow. Continue to click the down arrow until
the width of the picture is 5.4 inches (see Figure 184). As
the width is reduced the height is automatically reduced.
238 presenting data with charts

(The height should end up about 3.92 inches) ( Excel 365


names the tab Picture Format.)

3. To center the chart on the page, make sure the chart is


activated and click Home ⇒ Paragraph ⇒ Center.

4. Save the document and close Word.

Figure 184: Changing the Size of a Picture in Word

Figure 185 shows the final appearance of the Enrollment by Race


Source chart pasted into a Word document.

Note
Resizing Images

It is best to use either the Shape Width or Shape Height


buttons to reduce the size of an embedded chart. Using
either button automatically reduces both height and width
in proper proportion. If the sizing handles are used, hold
the Shift key while clicking and dragging on a corner
sizing handle to keep the chart in proper proportion.
4.3 using charts with microsoft word and microsoft powerpoint 239

Figure 185: Final Appearance of Pasting a Chart Image into Word

Skill Refresher
Pasting a Chart Image into Word

• Activate an Excel chart and click Home ⇒ Copy.


• Click on the location in the Word document where the
Excel chart will be pasted.
• Click Home ⇒ Paste Down Arrow ⇒ Picture.
• Click Picture Tools ⇒ Format. Resize the picture by
clicking the up or down arrow on the Shape Width or
Shape Height buttons.

4.3.2 Pasting a Linked Chart Image into PowerPoint

This exercise requires two files:

• The Excel spreadsheet used in this chapter: CH4-Charting. (Note:


this section continues the previous exercise. Students who only
need to complete this section can open CH4-Charting Solution
1 2 to start where the previous exercise ended.)

• A PowerPoint file: CH4-Diversity

Microsoft PowerPoint is perhaps the most used tool for deliver-


ing live presentations. The charts used in a live presentation are crit-
ical for efficiently delivering ideas to an audience. Like written doc-
uments, a wide range of presentations may require the explanation
240 presenting data with charts

of quantitative data. This demonstration includes a PowerPoint slide


that could be used in a presentation. The Enrollment by Race chart will
be pasted into this PowerPoint slide. However, instead of pasting an
image, as demonstrated in the Word document above, a link will be
established to the Excel file. As a result, if the chart in the Excel file
is changed that change will be reflected in the PowerPoint file. The
following steps explain how to link these two files.

1. Open CH4-Diversity.pptx and save it as CH4-Diversity


Presentation. (Note: the student files include both a
PowerPoint presentation and a Word document named
Diversity. Be sure to open the PowerPoint presentation
for this activity.)

2. Navigate to Slide 6 — Diversity in Enrollment. This is the


slide where the linked chart will be placed.

3. If needed, open the Excel file used in this chapter, CH4-


Charting. Click the Enrollment by Race chart in the Enroll-
ment by Race Chart sheet to activate it.

4. Click Home ⇒ Copy Down Arrow ⇒ Copy (NOT Copy


as Picture).

5. Go back to CH4-Diversity Presentation by clicking the


file in the taskbar.

6. Make sure Slide 6, Diversity in Enrollment, is still active.


Click on the outside edge of the empty Click to add text
box on the right to activate it.

7. Click Home ⇒ Paste Down Arrow in the PowerPoint


file.

8. Hover over each of the Paste Options until Keep Source


Formatting & Link Data (F) is highlighted (see Figure
186). Select this option. This pastes an image of the Ex-
cel chart into the PowerPoint slide. In addition, a link is
created so that any changes made to the chart (in Excel)
appear on the PowerPoint slide.
4.3 using charts with microsoft word and microsoft powerpoint 241

Figure 186: Creating a Link to an Excel Chart in PowerPoint

Next, the chart needs to be cleaned up a bit. First, apply a different


chart style.

1. Click anywhere in the plot area of the column chart


pasted into the PowerPoint slide. The same Chart Tools
tabs found in Excel are displayed on the ribbon (see Fig-
ure 187).

2. Click Chart Tools Design ⇒ Chart Style ⇒ Style 8.


( Excel 365 named the tab Chart Design.) This is the style
with a dark brown background.
242 presenting data with charts

Figure 187: Selecting a New Chart Style

Linking this chart caused trouble with the text boxes, so delete
them.

1. Select each text box by hovering the mouse over the out-
side edge of the text box until it changes into a four-
headed arrow, then click.

2. Press the Delete key. Be sure that the insertion point is


NOT blinking inside the text box. If it is, the contents of
the text box will be edited instead of deleting the com-
plete text box.

3. Reposition and resize the Diversity Program Result callout


box so the text is visible and the callout points to the top
of the first data item for Portland Community College.

The benefit of adding this chart to the presentation as a link is that


it will automatically update when the data in the linked spreadsheet
file is changed.

1. Return to the CH4-Charting Excel file.


4.3 using charts with microsoft word and microsoft powerpoint 243

2. Select the Enrollment Statistics worksheet (the one with


the Enrollment data). Change the value in cell D3 to
1000 to change the number of white students at Clacka-
mas Community College to 1000. This is not true but
is a large enough change to see the result in the linked
charts.

3. Select the Enrollment by Race Chart worksheet. Notice


how the chart has changed.

4. Return to Diversity Presentation by clicking the file in


the taskbar.

5. On Slide 6, notice that the chart was updated to reflect


the change in enrollment (see Figure 185).

6. If the chart has not changed, be sure that the chart is


selected, click Chart Tools Design ⇒ Chart Tools ⇒
Refresh Data. ( Excel 365 named the tab Chart Design.)
The change made in the Excel workbook is now reflected
on the PowerPoint slide.

7. If that still does not work, check to see if a “normal”


link was created instead of a “Paste” Link. If so, delete
the chart and follow the steps again from the beginning
of this section.

8. Return the changed number to its original value. Open


the CH4-Charting Excel file.

9. Select the Enrollment Statistics worksheet (the one with


the Enrollment data). Change the value in cell D3 to
4751, the original value.

10. Save all files and close PowerPoint. The files will be sub-
mitted at the end of the next section.

Figure 188 shows the appearance of the PowerPoint slide after the
Excel chart was added.
244 presenting data with charts

Figure 188: Final PowerPoint Slide

Skill Refresher
Pasting a Linked Chart Image into PowerPoint

• Activate an Excel chart and click the Copy button in


the Home tab of the ribbon.
• Click in the PowerPoint slide where the Excel chart
will be pasted.
• Click the down arrow of the Paste button in the Home
tab of the ribbon.
• Click the Keep Source Formatting & Link Data option
from the drop-down list.
• Click the Refresh Data button in the Design tab of the
ribbon to ensure any changes in the Excel file are re-
flected in the chart.

Integrity Check

Refreshing Linked Charts in PowerPoint and Word

When creating a link to a chart in Word or Power-


Point, the data must be refreshed when there are changes
in the Excel workbook. This is especially true if the changes
are made in the Excel file prior to opening the Word or
PowerPoint file that contains a link to a chart. To refresh
the chart, make sure it is activated, then click Chart Tools
Design ⇒ Chart Tools ⇒ Refresh Data. Forgetting this step
can result in old or erroneous data being displayed in the
chart.
4.4 preparing to print 245

Key Take-Aways

Using Excel Charts with Word or PowerPoint

• When pasting an image of an Excel chart into a Word


document or PowerPoint file, use the Picture option
from the Paste drop-down list of options to make it
act as an image. Note that if the underlying data is up-
dated the picture is not changed if it has been pasted
as an image.
• When creating a link to a chart in Word or PowerPoint,
the data may need to be refreshed if changes are made
in the originating spreadsheet.

Integrity Check

Severed Link?

When creating a link to an Excel chart in Word or


PowerPoint, the Excel workbook must stay in its original
location on the computer or network. If the workbook
is moved or deleted, an error message will be generated
when the link in the Word or PowerPoint file is updated.
An error is also generated if the Excel workbook is saved
on a network drive that the computer cannot access. These
errors occur because the link to the Excel workbook has
been severed. Therefore, if a USB drive is being used for a
presentation then all the linked Excel workbooks must be
moved to the USB drive before establishing the Word or
PowerPoint link.

4.4 preparing to print

Learning Objectives

• Review each worksheet in a workbook in Print Pre-


view.
• Modify worksheets as needed to professionally print
data and charts.

This section considers each of the worksheets created in the pre-


vious sections. Since these worksheets contain a combination of data
and charts, there are specific things to watch for when they are printed.
A good start point is to look at each worksheet in Print Preview in
Backstage View. Then make any necessary changes, such as changing
246 presenting data with charts

the orientation and scaling, or moving charts around on the work-


sheet. To make sure that no worksheets are missed, review them in
the order they appear in the tabs.

4.4.1 Previewing Chart Sheets for Printing

The first worksheet, Closing Prices, is a chart sheet. This means that it
contains only a chart with no data; but it still needs to be reviewed in
Print Preview.

1. Open CH4-Charting if it is not already open. (Note:


this section continues the previous exercise. Students
who only need to complete this section can open CH4-
Charting Solution 1 3 to start where the previous exercise
ended.)

2. Click on the Closing Prices worksheet tab.

3. Click File ⇒ Print.

4. Notice that the chart will print on the entire page in


Landscape orientation.

5. There is nothing to change so close the print preview by


clicking the arrow at the top left corner of the preview
screen.

4.4.2 Printing Worksheets with Data and Charts

The next worksheet (Stock Trend) has data and two charts. To print the
data and the charts, the page setup will need some modification.

1. Click the Stock Trend worksheet tab to open that work-


sheet.

2. Click File ⇒ Print.

3. Notice that this worksheet is currently printing on seven


pages.

4. Click through each page and note the following.


• The data is split between the first and third pages.
• The line chart starts on the first page, but part of it
is also on the second page.
• The double-line chart starts on the third page and
then finishes on the fifth page.
4.4 preparing to print 247

• The fourth and sixth pages are blank (or nearly


blank).
• The last page has a column of seemingly random
numbers.

5. Close the print preview by clicking the arrow at the top


left corner of the preview screen.

The first thing to do is remove the numbers that are appearing on


page seven. To do this, hide the column where they are stored. It is
important to hide the column instead of deleting the numbers in case
they are being utilized somewhere else in the workbook.

1. Scroll to the right on the worksheet until the numbers in


Column AH are visible.

2. Click anywhere in Column AH.

3. Click Home⇒ Cells ⇒ Format ⇒ Visibility ⇒ Hide &


Unhide ⇒ Hide Columns (see Figure 189).

Figure 189: Hide Columns in Format Menu

4. The visible column headings should now go from AG to


AI.

5. Click File ⇒ Print.

6. Notice that there are now five pages. The data and charts
are still splitting across multiple pages, but the numbers
in Column AH are no longer printing.
248 presenting data with charts

7. Remain in Print Preview for the next steps.

The data is still split between Page 2 and Page 3, and the charts are
splitting oddly as well. The first step to fix these issues is to change
the page orientation and scaling.

1. While still in Print Preview, change the page orientation


to Landscape.

2. This puts all the data on one sheet, but the charts are
still split between two pages.

3. Change the page scaling to Fit Sheet on One Page.

4. This fits everything on one page, but it is too small to be


able to read.

5. Change the page scaling back to No Scaling.

The next thing to try is moving one, or both, of the charts.

1. Close the print preview by clicking the arrow at the top


left corner of the preview screen.

2. Click View ⇒ Workbook Views ⇒ Page Break Preview.


The screen should look like Figure 190. (Remember that
the dotted blue lines indicate automatic page breaks.)

3. Move the 24 Month Comparison (double-line) chart closer


to the top of its page.

4. Move the May 2014-2015 Trend for NASDAQ Sales Volume


(line chart) so that it is under the 24 Month Comparison
chart.

5. The link to the data source is still at the bottom of page


2 (in A50:A51) so it needs to be moved to M31:M32.

6. The screen should look similar to Figure 191.


4.4 preparing to print 249

Figure 190: Page Break Preview before moving the charts in Step 3

Figure 191: Page Break Preview after moving the charts and text

The data source link text should not print on its own page, but
there is no room to move it onto the same page as the charts. To fix
this, remove the automatic page break between the charts and the text
in M31:M32.

1. Place the pointer on the horizontal blue dashed line (au-


tomatic page break) between the line chart and the Data
Source link text.

2. When the pointer changes to the double arrow (pointing


up and down), drag the page break down into the gray
area. This removes the page break.
250 presenting data with charts

3. If the vertical automatic page break between Column L


and Column M moves, drag it back between Column L
and Column M. This will make it a solid blue line, which
will no longer adjust automatically.

4. The screen should now look like Figure 192.

Figure 192: Page Break Preview after removing a page break

Now complete one final check of this worksheet in Print Preview.

1. Click View ⇒ Workbook Views ⇒ Normal.

2. Click File ⇒ Print.

3. Page 1 should contain just the data and page 2 should


have both charts and the Data Source link text.

4. Close the print preview by clicking the arrow at the top


left corner of the preview screen.

5. Save the CH4-Charting workbook.

4.4.3 Preview Remaining Worksheets for Printing

There are four remaining worksheets to be reviewed. Some of them


will need minor changes and some will not need any changes. Print
preview each one and make the changes specified.

1. All Excel Classes: this is a chart sheet, so it should not


need any changes.
4.4 preparing to print 251

2. Grade Distribution: the chart is split across two pages.


Fix this by changing the orientation (Landscape) and
scaling (Fit Sheet on One Page).

3. Enrollment by Race Chart: this is a chart sheet, so it


should not need any changes.

4.4.4 Printing a Chart Only

Sometimes a worksheet may have both data and a chart but only
the chart should print. That is the case with the Enrollment Statistics
worksheet.

1. Switch to the Enrollment Statistics worksheet.

2. Click the pie chart to activate it.

3. Click File ⇒ Print.

4. Only the chart is printing. (If it shows the data printing


along with the chart, exit print preview and be sure to
select just the chart on the worksheet.)

5. If needed, change the orientation to Landscape. This ori-


entation looks better when printing just a chart.

6. Exit print preview.

4.4.5 Hiding a Worksheet

It is possible to hide an entire worksheet so it will not print nor will


anyone looking at the workbook see it. Keep in mind that this is not
a security feature since someone can simply unhide the sheet, but it
makes it easier to focus on the data and charts that are important. For
this section, hide the Enrollment by Race Chart sheet.

1. Right-click on the Enrollment by Race Chart tab.

2. Select Hide from the menu that appears. The Enrollment


by Race Chart sheet should no longer be visible.

3. To unhide the worksheet, right-click on any other work-


sheet tab and select Unhide from the menu. A list of hid-
den worksheets will be displayed. Select the Enrollment
by Race Chart and click OK.
252 presenting data with charts

4. Save the CH4-Charting workbook.

5. Compare all workbooks with their self-check answer


key: CH4-Charting Solution, CH4-Diversity Report So-
lution, and CH4-Diversity Presentation Solution.

6. Close and submit all three files (CH4-Charting, CH4-


Diversity Report, and CH4-Diversity Presentation) as
directed by the instructor.

4.5 chapter practice

Although Excel is primarily used in business and scientific applica-


tions, it is useful in other areas of study as well. In the following
exercises, Excel is used to create charts using historical, health, and
social justice data.

4.5.1 Charting Historical Data (Comprehensive Review)

Excel is an excellent tool for helping to display historical data. This


exercise examines information on minimum wage data and life ex-
pectancy.

4.5.1.1 Task1 – National Minimum Wage in the Us – 1960-2014

Since the beginning of the previous century, the United States has set
a minimum wage to set a “floor” beneath which wages cannot fall.
Most states have set their own minimum wages, but none are lower
than the national minimum wage2 .

1. Open the file named PR4-Data and then Save As PR4-


Historical Data.

2. On the Minimum Wage worksheet, select the range


B4:C60.

3. Click Insert ⇒ Charts ⇒ Recommended Chart. Recom-


mended Charts allows users to first see how selected data
would be represented on a variety of chart types before
committing to a particular type of chart. Being able to
see the data as it would look in a variety of charts helps
when selecting the kind of chart that best matches the
data. It does a particularly good job when using dates
or years as labels, though sometimes Excel gets confused

2 To learn more about the national minimum wage, look at https://en.wikipedia.org


/wiki/Minimum wage in the United States.
4.5 chapter practice 253

and thinks that dates are part of the data instead of la-
bels.

4. Select the first Line Chart and press OK.

5. The line chart is created in the Minimum Wage work-


sheet.

6. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 4
Left Left of Column E
Bottom Bottom of Row 20
Right Right of Column M

7. Click the chart title once and then click in front of the
first letter. A blinking cursor appears in front of the letter.
Type the following in front of the first letter in the chart
title: US National (be sure to leave a space after the word
National).

8. While the chart is still selected, click Chart Tools Design


⇒ Chart Styles. ( Excel 365 named the tab Chart Design.)
If necessary, press the More button to see the available
styles.

9. Float the cursor over the available styles to see how each
will affect the chart. Select Style Four, which fills a verti-
cal stripe pattern under the line.

10. The years across the X Axis are a little hard to read. Se-
lect the labels so there is a box surrounding the list of
years.

11. Click Home ⇒ Alignment ⇒ Orientation ⇒ Angle


Counterclockwise.

12. Click A1 to select that cell.

13. Prepare the Minimum Wage worksheet for printing by


changing the scaling on the Print Preview screen to Fit
Sheet on One Page.

14. Close the print preview by clicking the arrow at the top
left corner of the preview screen.
254 presenting data with charts

4.5.1.2 Task2 – Oregon: Projected Life Expectancy at Birth

In the past 40 years, between 1970 and 2010, life expectancy for Ore-
gon men improved by 8.7 years and for women by 5.5 years. Ore-
gon’s life expectancy has remained slightly higher than the U.S. aver-
age. The life expectancy will continue to improve for both men and
women; however, the gain for men has been outpacing the gain for
women. Consequently, the difference between men’s and women’s
life expectancies has continued to shrink3 .

1. On the Life Expectancy sheet, select A5:B11

2. Press F11 to automatically create a column chart on a


new worksheet.

3. Double click the chart sheet tab name and change it to


Men.

4. Take a good look at this chart. It is not what was ex-


pected. Excel has made a mistake and charted the Birth
Year information as though it was data, instead of using
it to label the Y Axis.

5. Click the chart to activate it.

6. Click Chart Tools Design ⇒ Data ⇒ Select Data.


( Excel 365 named the tab Chart Design.) This opens the
Select Data Source dialog box. The box at the top tells us
the range that was selected, which looks fine.

The Legend Entries in the large box on the left side of the Select Data
Source box need to be corrected. Also, the Horizontal Axis Labels are
just a series of default numbers, but they need to be the range that
contains the years.

1. In the Legend Entries, click in the small box in front of


Birth Year to remove the check mark. This will remove
the Birth Year as a data series on the chart.

2. In the Horizontal (Category) Axis Labels box, press the Edit


button. This will open the Axis Labels dialog box. Press
the Select range button.

3. Navigate to the Life Expectancy tab and select A6:A11.


After =’Life Expectancy’!A6:A11 is displayed in the box,
press the Select Range button. Press OK. Press OK a sec-
ond time.

3 This data was found at https://www.oregon.gov/das/OEA/Documents/OR pop t


rend2012.pdf.
4.5 chapter practice 255

4. Change the chart title so that it reads: Life Expectancy


for Oregon Men.

5. Remove the Legend from the bottom of the chart by


right-clicking on it and selecting Delete from the con-
text menu.

6. Return to the Life Expectancy tab, select A5:A11, C5:C11


(Select the first range, hold down the Ctrl key, select both
noncontiguous ranges at the same time.

7. Repeat the above steps to create a matching chart for


Life Expectancy for Oregon Women.

8. Return to the Life Expectancy tab, select A5:D11.

9. Use the Recommended Charts tool to create a line chart


(it will be the first option).

10. Resize the chart using the following values. For each
side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 3
Left Left of Column G
Bottom Bottom of Row 18
Right Right of Column N

11. Change the Chart Title to Oregon: Projected Life Ex-


pectancy at Birth.

12. The green line across the bottom of the chart repre-
sents the difference between men’s and women’s life ex-
pectancy, but it is not helpful as it is. Right click on the
green line to open the context menu. Select Format Data
Series. In the Format Data Series pane, under the Series
Options tab, select the radio button in front of Secondary
Axis.

13. Close the Format Data Series pane.

14. Add a text box that explains the Difference calculation.


While the chart is still selected:
• Click Insert ⇒ Text ⇒ Text Box.
• Notice that the cursor has turned into a cross hair
(thin black plus sign)
256 presenting data with charts

• Click once in the lower left corner of the chart, near


0.0 on the Y Axis. This creates a text box.
• Type the following into the text box: Difference =
Female life expectancy minus male. Press the Enter
key after the word life to create a two-line entry.
• Move or resize the text box as desired.

15. Move or resize the chart so that it no longer is on top of


the spreadsheet data.

16. Click Chart Tools Design ⇒ Chart Styles and select the
first style. ( Excel 365 named the tab Chart Design.)

17. Preview the Life Expectancy worksheet in Print Preview


and make any necessary changes to ensure the entire
worksheet is visible.

18. Save the PR4-Historical Data workbook.

19. Compare the worksheet with the self-check answer key


(PR4-Historical Data Solution) and then close and sub-
mit the PR4-Historical Data workbook as directed by
the instructor.

4.6 scored assessment

4.6.1 Charting Social Justice Data (Comprehensive Review)

4.6.1.1 Task 1 International Incarceration Rates

1. Open the file named SC4-Data and then Save As SC4-


Social Justice.

2. On the International tab, use a function in cell D20 to


find the average of the Individuals Incarcerated data.

3. Create a bar chart that looks like Figure 193:


4.6 scored assessment 257

Figure 193: International Incarceration Rates

1. Move and or resize the chart so that it does not cover


any of the data.

2. In cell A25 write a brief note explaining why a bar (or


column) chart is a better choice for this data than a pie
chart.

3. Set the Print Area so that everything prints, except for


the explanation that was added in cell A25.

4. Preview the International worksheet in Print Preview and


make any changes needed to print professionally on one
page.

4.6.1.2 Task 2 Disenfranchisement Rate

Felony disenfranchisement is the exclusion from voting of people


otherwise eligible to vote (known as disfranchisement) due to con-
viction of a criminal offense; usually restricted to felonies, the most
serious class of crimes. Jurisdictions vary as to whether they make
such disfranchisement permanent or restore suffrage after a person
has served a sentence or completed parole or probation. Affected in-
dividuals suffer “collateral consequences” including loss of access to
jobs, housing, and other facilities.
258 presenting data with charts

Opponents have argued that such disfranchisement restricts and


conflicts with principles of universal suffrage. It can affect civic and
communal participation in general4 .

1. On the Disenfranchisement Rate sheet, use the Recom-


mended Charts tool to create the three charts illustrated
in Figures 194, 195, and 196.

2. Put each chart on its own individual sheet rather than


an object in a spreadsheet.

3. Be sure that years are used as labels on the horizontal


axis instead of numbers like 1, 2, 3.

4. Format the Washington and Oregon charts so the maxi-


mum for the left vertical axis is 20000 and the right ver-
tical axis is .20.

5. Edit the text of the Chart Titles on all three charts and
format the title font: Arial, bold, 18pt.

Figure 194: Felony Disenfranchisement Rate Washington

4 For more information about disenfranchisement, see https://en.wikipedia.org/wiki/


Felony disenfranchisement.
4.6 scored assessment 259

Figure 195: Felony Disenfranchisement Rate Oregon

Figure 196: Comparison of Oregon and Washington

1. Preview the worksheet(s) in Print Preview and make any


necessary changes for professional printing.

2. Save and close the SC4-Social Justice workbook.

3. Submit the SC4-Social Justice workbook as directed by


the instructor.
TA B L E S
5
Excel workbooks are designed to store data and it is challenging to
organize that data to yield meaningful information. Excel has many
features that can help organize data and find needed information
efficiently. Setting up data as a table from the onset allows users to
sort, filter, total, and subtotal the data easily. In Excel, a table is a
collection of data about a subject stored in adjacent rows and columns.
Tables can improve the look and feel of a worksheet. This chapter
explores how to set up, edit, and work with Excel tables effectively.
These skills will be demonstrated in the context of a multi-sheet file
that shows national average weather for two vastly different cities in
the United States. Weather data is often voluminous and difficult to
summarize since so much is collected every hour of every day and
providing meaningful summaries of such data is a useful skill. The
skills learned using weather data in this chapter can be transferred to
data found in any discipline or field.

5.1 basic table skills

Learning Objectives

• Understand table structure.


• Plan, create, and edit a table.
• Freeze rows and columns.
• Sort data in a table.

This section reviews the fundamental skills for setting up and main-
taining an Excel table. The objective used for this chapter is the con-
struction of a multi-sheet file to keep track of two cities’ national
weather data for the month of January. Organizing, maintaining, and
reporting data are essentials skills for employees in most industries.
Figure 197 shows the completed workbook that will be created in
this chapter. Notice that this workbook contains four worksheets. The
first worksheet contains weather data for Portland, Maine, the second
contains weather data for Portland, Oregon, the third organizes the
Oregon data by week, and the fourth contains subtotals for the Ore-
gon data.

261
262 tables

Figure 197: Completed National Weather Workbook

5.1.1 Creating a Table

When data is presented in long lists or columns, it helps if the table is


set up properly. Here are some rules of data-entry etiquette to follow
when creating a table from scratch.

• Whenever possible, organize information using adjacent (neigh-


boring) columns and rows.

• Start the table in the upper-left corner of the worksheet and


work down the sheet.

• Do not skip columns and rows just to “space out” the infor-
mation. To place white space between information in adjacent
columns and rows, widen columns, heighten rows, or change
the alignment.

• Reserve a single column at the left edge of the table for the
table’s row headings or identifying information.

• Reserve a single row at the top of the table for the table’s column
headings.

• If the table requires a title, put the title in the row(s) above the
column headings.

Following these rules will help ensure that the sorts, filters, totals,
and subtotals applied to the table with return the desired results.
With these rules in mind, begin working on National Weather work-
book.
5.1 basic table skills 263

1. Open data file CH5-Data and save the file as CH5-


National Weather.

2. Click the Portland ME worksheet tab to activate it.

3. Notice that the data is in adjacent columns and rows.


The upper-left corner of the table is in A5 and the titles
are above the column headings in Row 5.

4. Click cell A5.

5. Click Insert ⇒ Tables ⇒ Table.

6. The dialog box illustrated in Figure 198 pops up. Excel


has correctly determined that the data range is A5:E33
and that the table has headers.

Figure 198: Create Table

7. Click OK.

8. Click A5.

9. Adjust all column widths so that the complete headings


are visible in Row 5 with the filter arrows showing. The
filter arrows are the down-arrow buttons that appear in
the header row when the table is created.

After this, the top of the worksheet will look like Figure 199.
264 tables

Figure 199: Weather Table

Notice that a new ribbon tab, Table Tools Design, appears when the
mouse is clicked inside the table. This ribbon tab contains controls
to edit, style, and add functionality to the table. ( Excel 365 . The tab is
named Table Design, not Table Tools Design.)

1. Click the Portland OR worksheet tab to activate it.

2. Click cell A5.

3. Click Insert ⇒ Tables ⇒ Table.

4. Be sure Excel automatically determines the data is in


A5:E33 and that it has headers.

5. Click OK.

6. Click A5.

7. Adjust all column widths so that the complete headings


are visible in Row 5 with the filter arrows showing.

Skill Refresher
Create a Table

• Click on the top left cell in the data.


• Click Insert ⇒ Tables ⇒ Table.
• Make sure the data range is properly identified and
My table has headers is checked.
• Click OK.
• Click on the top left cell again.
• Adjust all columns widths so the complete headings
with the filter arrows are showing.
5.1 basic table skills 265

5.1.2 Formatting Tables

There are many ways to format an Excel table. One of the easiest to
use is a preset Table Style using Light, Medium, or Dark colors. There
are also a variety of Table Style Options as listed in Table 19.

Table Style Description


Top row of the table that includes column
Header Row
headings
Row added to the bottom that applies column
Total Row
summary calculations
Formatting added to the left-most column in the
First Column
table
Formatting added to the right-most column in
Last Column
the table
Alternating rows of color added to make it
Banded Rows
easier to see rows of data
Banded Alternating columns of color added to make it
Columns easier to see columns of data
Button that appear at the top of each column
Filter Button
that lists options for sorting and filtering

Table 19: Table Style Options

Add formatting to both of the Portland weather tables in the fol-


lowing steps.

1. Click on the Portland ME sheet to activate it.

2. Click cell A5.

3. Click Table Tools Design ⇒ Table Styles ⇒ More Down


Arrow. ( Excel 365 . The tab is named Table Design, not Table
Tools Design.)

4. A gallery of table styles will appear as in Figure 200.


266 tables

Figure 200: Table Styles

5. In the Table Styles gallery, in the Medium Section, click


Table Style Medium 7 (this is a green-colored style).

6. Uncheck Table Style Design ⇒ Table Style Options ⇒


Banded Rows.

7. The alternating colored rows will disappear. The data in


the table is now more difficult to read.

8. Try some of the other options in the Table Style Options


group. When finished, be sure that Header Row, Banded
Rows, and Filter Button are the only ones checked, as in
Figure 201.

Figure 201: Ribbon Table Style Options

9. Save the CH5-National Weather workbook.


5.1 basic table skills 267

5.1.3 Adding Data to Tables

Over time, new data will need to be added to a table, and that should
be added in a blank row. The easiest way to do this is to enter the
data below the last row in the table, then sort the table to arrange its
data. If data must be added in a specific place in the middle of a table,
insert a blank row and add the data there.
Add the last three days of the months to the Portland ME and Port-
land OR worksheets. The following steps walks through this process.

1. Click on the Portland ME worksheet.

2. Click on A34 (the left-most cell below the last row in the
table).

3. Enter the data from the following table.

High Low Rain Snow


Day
(°F) (°F) (inches) (inches)
29 31.4 13.3 0.12 0.59
30 31.6 3.4 0.08 0.47
31 31.7 13.5 0.12 0.63

Table 20: Portland, Maine data

Notice that the banded row formatting continues as additional


rows are added to the tables.

1. Click on the Portland OR worksheet.

2. Click on A34 (the left-most cell below the last row in the
table).

3. Enter the data from the following table.

High Low Rain Snow


Day
(°F) (°F) (inches) (inches)
29 48.8 36.2 0.16 0.00
30 49.0 36.2 0.11 0.32
31 49.1 36.1 0.16 0.00

Table 21: Portland, Oregon data


268 tables

1. Save the CH5-National Weather workbook.

5.1.4 Finding and Editing Data

It is inevitable that data errors which need to be corrected will appear


in a table. While it is possible to visually scan through a table to find
errors, this can be a tedious and tiresome process, especially if the
table is large. Excel can help with this through the Find command.
When using Find, the best practice is to start with the cell pointer in
cell A1 to ensure that all the data in the worksheet is included in the
search.
A temperature of 3.4 degrees was entered erroneously in the Port-
land ME sheet. It should have been 13.4. To fix this error, complete the
following steps.

1. Click on the Portland ME sheet.

2. Press the Ctrl + Home keys together to go to the top of the


sheet (cell A1).

3. Click Home ⇒ Editing ⇒ Find & Select ⇒ Find.

4. In the Find box, type 3.4, and then click Find Next.

Figure 202: Find and Replace

5. Click the Close button.

6. Replace 3.4 in the Low column for Day 10 with 13.4.

7. Now switch to the Portland OR sheet and find the Snow


error of 0.32 in Day 3. Change it to 0.12.

8. Save the CH5-National Weather workbook.


5.1 basic table skills 269

Skill Refresher
Finding and Replacing Data

• Click Home ⇒ Editing ⇒ Find & Select ⇒ Find.


• In the Find box, type the phrase to find then click Find
Next.
• Continue clicking Find Next until the desired phrase
is found.
• Click Close and edit the data.

5.1.5 Freeze Rows and Columns

When panes are “frozen” in a worksheet, Microsoft Excel keeps spe-


cific rows or columns visible in the table as it is scrolled on the screen.
For example, if the first row in the spreadsheet contains labels, that
row might be frozen to make sure that the column labels remain vis-
ible as the sheet is scrolled down. Follow these steps to freeze the
worksheet headings and keep them visible on the screen.

1. Click on the Portland ME sheet.

2. Click in A6, the left-most cell below the headings row.

3. Click View ⇒ Window ⇒ Freeze Panes ⇒ Freeze Panes


(see Figure 203).

4. Scroll up and down the sheet and notice that the head-
ings are always displayed at the top of the table. Also,
notice that a thin line appears under Row 5 to mark the
bottom of the frozen section.

Figure 203: Freeze Pane

To unfreeze the headings, follow these steps.


270 tables

1. Click View ⇒ Window ⇒ Freeze Panes ⇒ Unfreeze


Panes

5.1.6 Simple Sort

Content in a table can be sorted alphabetically, numerically, and in


many other ways. Sorting helps organize data by ordering one or
more columns in the table. Table 22 describes the different sort orders
available for each column of data.

Sort Order Text Numbers Dates


Alphabetical Smallest Chronological (oldest to
Ascending
(A-Z) to Largest newest)
Reverse
Largest to Reverse Chronological
Descending Alphabetical
Smallest (newest to oldest)
(Z-A)

Table 22: Sort Options

Suppose it is important to know what the snowiest day was in


January in Portland, Maine. One way to find that is to sort the Snow
column in Descending order.

1. Click on the Portland ME sheet.

2. Click on the Down Arrow to the right of the header in


E5, Snow (inches).

3. Click on Click ZA↓ Sort Largest to Smallest (see Figure


204).
5.1 basic table skills 271

Figure 204: Sort by One Column

If this is done correctly, the snowiest day, January 3rd (in Row 6)
with 0.73 inches of snow, will sort to the top of the list. Notice the filter
arrow changes in the snow column to a downward pointing arrow
to indicate that the column is sorted in descending order (largest to
smallest).

Figure 205: Snowiest Days in Maine

1. Now switch to the Portland OR sheet and repeat these


sort steps to find the snowiest day in Oregon. Check the
worksheet with Figure 206.
272 tables

Figure 206: Snowiest Days in Oregon

Skill Refresher
Sort a Column

• Click on the filter down arrow to the right of the


header in the column to be sorted.
• Click on the choice AZ↓ or ZA↓ to sort the data in that
column.

5.1.7 Multi-Level Sort

Sometimes a table needs to be sorted by more than one column at


a time to efficiently analyze the data. For example, if the data in-
cluded different types of loans from several bank offices, it would
need to be sorted by the type of loan and then by bank office name
to clearly see the different groups of loans. As another example, if
a worksheet included a list of grades for students over their time in
high school, the data should be sorted first by student name, then
by grade level (freshman, sophomore, junior, and senior) so that each
student’s grades appear in chronological order.
For the weather data, determine how cold the snow days were in
Oregon.

1. Click on the Portland OR sheet.

2. Click cell A6.

3. Click Data ⇒ Sort & Filter ⇒ Sort.


5.1 basic table skills 273

4. Click the down-arrow for Column Sort By and select


Snow (inches).

5. Click the down-arrow for Order and select Largest to


Smallest.

6. To add a 2nd level sort, click Add Level at the top left
corner of the dialog box.

7. Click the down-arrow for Then by and select Low (°F).

8. In the same row, click the down-arrow for Order and


select Smallest to Largest. The dialog box should look like
Figure 207.

Figure 207: Multi-Level Sort

9. Click OK.

10. The table sort results should look like Figure 208. Notice
for the two days with 0.08 inches of snow, the low temp
of 35.5 on Day 9 is displayed before the low temp of
36.2 on Day 25. The lowest of the two was listed first.
Also notice that the filter arrows changed on the sorted
columns to show how they are sorted.
274 tables

Figure 208: Multi-Level Sort Results

5.1.8 Custom Sorts

In most cases, the data should be sorted in “typical” sort order: num-
bers sorted highest to lowest, words sorted alphabetically, etc. Some
data does not make sense when sorted this way. For example, if the
days of the week are sorted alphabetically, the result would be Friday,
Monday, Saturday, Sunday, Thursday, Tuesday, and Wednesday. This
order would be of no use to anyone! Similarly, the months of the year
would not make sense alphabetically.
To illustrate how days can be sorted, a Week number column was
added to the Weekly OR sheet. Then, the Day column was changed
from a number to names like Sunday. This sheet facilitates further
analysis of the data to see if there are weekly trends in the weather.
To look for those trends, sort the Weekly OR sheet by Week and then
by Day.

1. Click on the Weekly OR worksheet.

2. Click cell A5

3. Click Insert ⇒ Tables ⇒ Table.

4. Click OK.

5. Click cell A5.

6. Click Data ⇒ Sort & Filter ⇒ Sort

7. Click the down-arrow for Column Sort By and select


Week.
5.1 basic table skills 275

8. Click the down-arrow for Order and select Smallest to


Largest.

9. To add a 2nd level sort, click Add Level at the top left
corner of the dialog box.

10. Click the down-arrow for Then by and select Day.

11. In the same row, click the down-arrow for Order and se-
lect Custom List. The dialog box should look like Figure
209 will appear on the screen.

Figure 209: Custom Lists

12. Click on Sunday, Monday, Tuesday, etc. in the Custom


lists on the left-side of the dialog box. NOTE: Make sure
to select the list with the days of the week spelled out,
not the abbreviations for the days of the week.

13. Click OK.

14. The Sort dialog box should look like Figure 210.
276 tables

Figure 210: Sort Dialog Box

15. Click OK.

16. The sorted table should now look like Figure 211. Notice
the data is in Week order and, within each week, in Day
order.

17. Save the CH5-National Weather workbook.

Figure 211: Custom Sort


5.2 advanced table skills 277

Key Take-Aways

Basic Table Skills

• Tables are made up of adjacent rows and columns of


data with a single row of column headings at the top.
• Tables are created by clicking in the top left-most cell
in the data and clicking Insert ⇒ Group ⇒ Table.
• There are a gallery of styles and options to choose
from to format a table.
• To add data it is best to add it one row below the
bottom of the table. The table can then be resorted to
organize the data.
• Freezing heading keeps column headings displayed
while scrolling through the table data.
• Filter arrows in the table headings sort the data by a
single column. Click Data ⇒ Sort & Filter ⇒ Sort to
sort by two or more columns at a time.
• Custom Sorts can be used when data needs to be
sorted in a special way (i. e.Days of the Week).

5.2 advanced table skills

Learning Objectives

• Filter table data.


• Add a total row to a table.
• Insert subtotals into a table.

5.2.1 Filtering Data

When an Excel table is first created, filter arrows appear in all the
column headings. Those arrows can be used to sort the data by a sin-
gle column. These same arrows can also be used to filter or limit the
displayed data within a column. There are many ways to filter data
within a column depending on whether the data is text or numeric.
Notice there is sometimes more than one way to filter data (i. e.with
a filter choice or a checked box). There are also single criteria filters
and multi-criteria filters. As an introduction to filtering, look at just
the first week of data in the Weekly OR sheet.

1. Click on the Weekly OR worksheet.

2. Click cell B5.


278 tables

3. Click the filter arrow to the right of the Week heading.

4. Click the Select All checkbox to deselect all the checkbox


choices.

5. Click on 1 to select just Week 1.

6. Click OK.

The table should look like Figure 212. Only seven rows of Week
One are visible in the table. Notice in the Status Bar at the bottom
of the screen the message “7 of 31 records found”. Also notice that
the filter arrow in the Week heading has changed to a funnel which
indicates that this column is currently filtered.

Figure 212: Filter

Follow this procedure to remove the filter.

1. Click the funnel next to the Week heading.

2. Click Clear Filter from “Week”.


5.2 advanced table skills 279

Skill Refresher
Filter a Column

• Click the filter arrow to the right of the heading in the


column to be filtered.
• Click the Select All checkbox to deselect all of the
checkbox choices.
• Click on the checkboxes to filter by.
• Click OK.

Un-Filter a Column

• Click the funnel to the right of the heading in the col-


umn to be filtered.
• Select Clear Filter.

As an example of using a numeric filter, find the days in Portland


ME when it was warmer than 32 degrees.

1. Click in the Portland ME worksheet.

2. Click cell B5.

3. Click on the filter arrow next to the High heading.

4. Click Number Filters ⇒ Greater Than....

5. The Custom AutoFilter dialog box will appear on the


screen.

6. Enter 32 in the space to the right of is Greater than. The


Custom AutoFilter dialog box should now match Figure
213.

7. Click OK.
280 tables

Figure 213: AutoFilter Dialog Box

It is now easy to see that it was above 32 degrees for only the first
three days, as illustrated in Figure 214.

Figure 214: Maine Filter Results

Review sorting and filtering in the following steps.

1. Click on the Weekly OR worksheet.

2. Sort the table by Week (smallest to largest).

3. Filter the Day to only show Monday.

4. Compare the results to Figure 215.

5. After checking the results, clear the Day filter.


5.2 advanced table skills 281

Figure 215: Oregon Filter Results

5.2.2 Filtering Using the Slicer

Beginning in Excel 2013, slicers were added as another way to filter


table data. A slicer is useful because it clearly indicates what data is
shown in the table after the data has been filtered.
Try using the Slicer to filter the Portland OR data table.

1. Click on the Portland OR worksheet.

2. Click cell A5.

3. Click Insert ⇒ Filters ⇒ Slicer.

Potential Error
Slicer Connections

After clicking the Slicer button, if Excel displays an


Existing Connections box with error messages about no
connections, then the table was not active. To correct this
error, click anywhere inside the table to activate it and then
try the Slicer button again.

1. Click on Day in the Insert Slicers dialog box, and then


click OK (see Figure 216).
282 tables

Figure 216: Slicer Dialog Box

2. Drag the slicer box so the top left corner is near the cen-
ter of cell G5.

3. Notice that when the Slicer was inserted, a Slicer Options


tab appears on the ribbon. ( Excel 365 . This tab is named
Slicer rather than Slicer Options.) This tab contains links
to change the style and size of the slicer box or individ-
ual slicer buttons.

4. Click Slicer Tools Options ⇒ Slicer Styles ⇒ Expand


Arrow. The styles illustrated in Figure 217 will become
available.

Figure 217: Slicer Styles

1. Select the first choice under Dark.

2. Click Slicer Tools Options ⇒ Size ⇒ Width and enter 1


inch. (Note: Do NOT set the size in the Buttons group.)
5.2 advanced table skills 283

3. Click in the slicer and scroll down to Day 15. Click the
15 button to show only the data for day 15 in the data
table.

4. Click the Multiselect button in the top center of the slicer


to permit the selection of multiple lines.

5. Click the Slicer buttons for Days 10 through 14. The table
should now show the data from Days 10 − 15.

6. Using the filter arrow on the right edge of the Day


header in A5, sort the column from smallest to largest
to show the days in order as in Figure 218.

Figure 218: Slicer Results

7. Click the red X in the top right corner of the slicer to


remove the filter and show the complete data file.

8. Using the filter arrow on the right edge of the Day


header in A5, sort the column from smallest to largest
to show the days in order.

9. Click in the top margin of the slicer to select the slicer


tool. It should have a thick border and drag handles.
Press Delete to remove the slicer.

5.2.3 Total Rows

By adding a total row to the bottom of the table, summary data is


easily seen for one or more of the columns. Total rows can be added
to tables as a whole or to only those that are filtered. Total rows can
easily be toggled on and off as the need for summary data arises.
284 tables

1. Click on the Portland ME worksheet.

2. Clear the filter from the High column by clicking the fil-
ter down-arrow and then Clear Filter from High (°F).

3. Click cell A5.

4. Click Table Tools Design ⇒ Table Style Options ⇒ To-


tal Row. ( Excel 365 . The tab is named Table Design rather
than Table Tools Design.)

5. Scroll to the bottom of the table to the Total Row. Notice


the total for the Snow data.

6. Click cell D37 (in the Rain column), and then click the
down-arrow that appears on the right of the cell.

7. Choose Sum to add a sum to the Total Row in the Rain


column.

8. To see the Average rainfall for the month, click on the


arrow again and choose Average.

9. Change the total in cell E37 (Snow) to see the Average


snowfall for the month.

10. Click Home ⇒ Number ⇒ Decrease Decimal to change


the decimal places in D37 and E37 to 2. Compare the
Total Row to Figure 219.

Figure 219: Total Row

Now switch to the Weekly OR sheet and add a Slicer and Total Row
to this table.
5.2 advanced table skills 285

1. Open the Weekly OR sheet.

2. If the Day column is still filtered, clear it by clicking the


filter down-arrow and then clicking the (Select All) check-
box.

3. Add a Slicer for the Day column to the sheet.

4. Drag the slicer so the top left corner is near the center of
cell H5.

5. Resize the slicer as desired and apply any Slicer Style.

6. Select Monday through Friday in the Slicer so that Sat-


urday and Sunday data do NOT show in the table.

7. Add a Total Row that averages the High and Low


columns. The averages should be High: 47.0 and Low:
35.8.

8. Change the Total label to Average by clicking cell A37 and


typing Average.

9. Save the CH5-National Weather workbook.

Skill Refresher
Add a Total Row

• Click Table Tools Design ⇒ Table Style Options ⇒ Total


Row.
• Scroll to the bottom of the table to find the Total Row.
• Click in one of the columns in the Total Row, and then
click the down-arrow that appears to the right of the
cell.
• Choose Sum to add a sum to the Total Row in the
column.
• To see the Average for column, click on the arrow
again and choose Average. Some other choices in the
Total Row are Count (for words), Count Numbers,
Max, and Min.
286 tables

Skill Refresher
Add a Slicer

• Click Insert ⇒ Filters ⇒ Slicer.


• Check the box for the column to which a Slicer is
added.
• Click OK.

5.2.4 Subtotaling

Subtotals and grand totals can be easily calculated for a column in a


table. This is a powerful tool that to quickly display multiple levels
of summary data within the table. This can provide Management
with a report of higher-level summary data one minute, and then
can be easily switched back to detailed data the next minute. It is
important to save often during this process and follow the steps carefully. It
is recommended to make a copy of the data to be subtotaled and place
it in a new sheet, so the summary subtotaled data can be separately
saved if desired.
The following steps summarize the process to add subtotals to a
worksheet.

1. Sort by the column to subtotal on.

2. Convert the table back to a normal Excel range since a


table cannot contain a subtotal.

3. Click Data ⇒ Outline ⇒ Subtotal.

4. To limit the displayed data further, click Data ⇒ Sort &


Filter ⇒ Filter.

To practice subtotaling, determine what the weather looks like for


each day of the week.

1. Click on the Weekly OR sheet.

2. Hover the mouse over the Weekly OR sheet tab at the


bottom of the screen, hold the Ctrl key down and then
click-and-drag the sheet to the right until it is past all
the existing sheets.

3. When a sheet icon with a + sign is visible, let go of the


mouse button and then the Ctrl key. A Weekly OR (2)
sheet will appear.
5.2 advanced table skills 287

4. Right-click on the new sheet tab, select Rename, type


Subtotal OR, and then press Enter .

5. Save the CH5-National Weather workbook.

6. Remove all filters in the table by clicking Data ⇒ Sort


& Filter ⇒ Clear.

7. Click in the top margin of the slicer to select the slicer


tool. It should have a thick border and drag handles.
Press Delete to remove the slicer.

8. Click Data ⇒ Sort & Filter ⇒ Sort.

9. Click the down-arrow for Column Sort By and select Day.

10. Click the down-arrow for Order and select Custom List.

11. Select the custom list Sunday, Monday, Tuesday, etc. (See
Figure 209 through Figure 211 for a review of Custom
Sorting.)

12. Click OK then click OK a second time.

13. Before adding subtotals, convert the table back to a reg-


ular range. To do this, click Table Tools Design ⇒ Tools
⇒ Convert to Range (see Figure 220). ( Excel 365 . This
tab is called Table Design rather than Table Tools Design.)

Figure 220: Convert to Range

14. When a box pops up with a warning about converting


the table, click Yes.

15. Click cell A6.

16. Click Data ⇒ Outline ⇒ Subtotal.

17. In the Subtotal Window, make the choices shown in the


Figure 221. It is essential to select the column that the
data is sorted by in the At each change in field at the top
of the window.

18. Click OK.


288 tables

Figure 221: Subtotal Window

The data should look like Figure 222. Successful subtotaling shows
only one subtotal for each group in the column sorted by. (HINT: If
there is more than one Subtotal for the same group (i. e.one of the
days of the week in the example), then the column was not sorted
before subtotaling. Remove the subtotals using the Remove All button
in Figure 221, sort the table, and then subtotal again.)

Figure 222: Subtotal Results

Notice the three Outline buttons circled in the upper-left corner of


the spreadsheet. These control the amount of subtotaled data that is
displayed. Table 23 describes the different Outline buttons.
5.2 advanced table skills 289

Button Content Displayed


Level 1 Only the grand average
Level 2 Subtotals and grand total
Level 3 Individual records, subtotals, and grand total

Table 23: Subtotal Outline Buttons

Click the three Outline buttons to see the difference in the data
displayed.

1. Click on the 1 Outline button in the upper left-hand cor-


ner of the sheet.

2. Only the Grand Average row with averages for High, Low,
Rain, and Snow should be visible.

3. Click on the 2 Outline button.

4. The average for each day of the week along with the
Grand Average are now visible.

5. Click on the + Sign button to the left of the Sunday


Average row.

6. This expands just the Sunday Day data and displays the
individual records for this subset of the data. Clicking
on + Sign buttons will expand a portion of the data at
a time. Clicking on – Sign buttons hide a portion of the
data at a time.

7. Click on the 3 Outline button.

8. All the individual records along with the subtotals, and


Grand Average should be displayed.

9. Save the CH5-National Weather workbook.


290 tables

Key Take-Aways

Advanced Table Skills

• Filtering is an easy way to see a subset of the data.


Filtering arrows appear to the right of each column
heading when the table has a header row.
• Data can be filtered by text or numerically.
• A slicer is another way to filter in Excel that provides
a set of filtering buttons on the sheet.
• Adding a total row to a table is a quick, efficient way
to see summary statistics for one or more columns in
a table.
• Subtotaling provides a way to quickly add totals to
groups within a column along with providing a grand
total at the bottom of the table.
• Subtotal Outline buttons allow users to see add of the
subtotaled data, just the totals and grand total, or sim-
ply the grand total.
• + and − buttons within subtotaling allow a user to
expand and hide portions of the subtotaled data.

5.3 preparing to print

Learning Objectives

• Review options for professional page setup for print-


ing.
• Understand how to insert a picture to enhance the
visual appearance of a worksheet.
• Preview worksheets containing tables to ensure they
will print in a professional manner.

5.3.1 Previewing a Worksheet

Now that the weather data has been sorted, filtered, and subtotaled
as needed, it is time to print the worksheets. Start with the Portland
ME worksheet.

1. Click on the Portland ME worksheet.

2. Click cell A1.

Notice that cells A1, A2, and A3 are not merged and centered over
the entire width of the table.
5.3 preparing to print 291

1. Select cell A1 and click Home ⇒ Alignment ⇒ Merge


& Center. This should split A1 into four cells (A1:D1).

2. Select the range A1:E1 and click Home ⇒ Alignment ⇒


Merge & Center. Cell A1 should now be merged across
A1:E1.

3. Repeat these steps for A2 and A3.

Next, open Print Preview and determine what page setup options
need to be set.

1. Click File ⇒ Print.

2. Notice that the table should be centered on the page.

3. At the bottom of the Settings section, click the link for


Page Setup. This opens the Page Setup dialog box.

4. Click on the Margins tab. See Figure 223.

Figure 223: Page Setup

5. In the Center on page section, check the box for Horizon-


tally.

6. Click OK. The table should now be centered horizontally


on the page.

7. Next, add a footer with the workbook filename and


worksheet name.
292 tables

8. At the bottom of the Print Preview Settings section, click


the link for Page Setup. This opens the Page Setup dialog
box.

9. Click the Header/Footer tab then click the Custom


Footer button.

10. In the Left section: box type File: (making sure to leave a
space after the colon).

11. Click the Insert File Name button (see Figure 224).

12. In the Right section: box type Worksheet: (making sure to


leave a space after the colon).

13. Click the Insert Sheet Name button.

Figure 224: File/Sheet Name Button Locations

14. The completed Footer dialog box should look like Figure
225. Click the OK button twice to return to Print Preview.

15. Confirm that the footer appears correctly, then click the
arrow at the top left corner of the screen to exit Print
Preview.

Figure 225: Custom Footer

5.3.2 Inserting an Image to Enhance a Worksheet

Next add a small weather-related graphic to the worksheet to enhance


its appearance. In Excel, an image file from either the local hard drive
or downloaded from an online source can be used. For this exercise,
use the graphic in the student files for this chapter.
5.3 preparing to print 293

1. Excel 2016Click Insert ⇒ Illustrations ⇒ Pictures. (This


inserts an image from the local computer. To search for
an online image, click the Online Pictures button.) (See
Figure 226.)

2. Excel 365Click Insert ⇒ Illustrations ⇒ Pictures ⇒ This


Device. (This inserts an image from the local computer.
To search for an online image, click the Online Pictures
button in the Pictures dropdown menu.)

Figure 226: Insert Pictures

3. Navigate to the folder containing the Chapter 5 files and


double-click the CH5-Weather.png image file.

The image now appears on the worksheet, but not in the desired
location. It is also slightly larger than desired (see Figure 227).

Figure 227: Inserted Image

1. Place the mouse pointer in the image so that the pointer


changes to crosshairs. Drag the image so that the top left
corner is at the left edge of cell E1.
294 tables

2. Using the resizing handle in the bottom right corner of


the image, resize the image so that it does not cover any
of the table. Hint: drag diagonally to the left and up.
The bottom right corner of the image will end up near
the left edge of cell F4.

3. Check Print Preview again to make sure the worksheet


with the image added looks good.

4. Exit Print Preview.

5. Save the CH5-National Weather workbook.

5.3.3 Previewing the Remaining Worksheets

Before considering this workbook finished, confirm that the remain-


ing worksheets are all printing appropriately.

1. Click the Portland OR worksheet.

2. Click File ⇒ Print.

3. No changes need to be made to this worksheet so click


the arrow in the top left corner of the screen to exit Print
Preview.

4. Click the Weekly OR worksheet.

5. Click File ⇒ Print.

6. Notice that the Slicer is printing on a second page. To


fix this, set the Page Scaling to Fit All Columns on One
Page.

7. If one or more Slicer buttons are cut off, exit Print Pre-
view, and resize the Slicer so that all of the buttons dis-
play then return to Print Preview.

8. Confirm the worksheet, including the slicer, is printing


appropriately.

9. Click the arrow in the top left corner of the screen to exit
Print Preview.

10. Click the Subtotal OR worksheet.

11. Click File ⇒ Print.

12. Click Page Setup at the bottom of the Settings area.


5.4 chapter practice 295

13. Center this worksheet horizontally on the page.

14. Click the arrow in the top left corner of the screen to exit
Print Preview.

15. Save the CH5-National Weather workbook.

16. Compare the worksheet with the self-check answer key


(CH5-National Weather Solution) and then close and
submit the CH5-National Weather workbook as di-
rected by the instructor.

Key Take-Aways

Printing

• When working with Excel workbooks, the final step


should always be to review the worksheets in Print
Preview to make sure they are printing appropriately.
• Images can be added to a worksheet to enhance its
appearance. Be sure to resize and move them appro-
priately so they do not detract from the data.

5.4 chapter practice

5.4.1 Tables for a Tourism Company

Figure 228: Chapter Practice Completed Exercise

Travel and tour companies need to keep track of client data as well
as travel/tour options and tour guides. Keeping up-to-date, accurate
296 tables

records is essential to their bottom line. To run a tour company, em-


ployees must be able to manipulate their data quickly and easily. This
exercise illustrates how to use the skills presented in this chapter to
generate the data needed daily by a tourism company. Figure 228
shows one of the completed worksheets.

1. Open the data file PR5-Data and save the file as PR5-
Canyon Trails.

2. In J4, calculate Total Cost (Guests*Per Person Cost).


Copy the formula down the column.

3. Format Column I and Column J as Accounting with no


decimal places.

4. Center all headings in Row 3.

5. Click cell A3. Insert a table with headers for the range
A3:J53.

6. Adjust column widths within the table so that all the


headings are completely visible.

7. Rename Sheet 1 to Current Tours. Sort this sheet alpha-


betically (A to Z) by Last Name.

8. Make a copy of the Current Tours sheet and rename it


Tours by Canyon.

9. Place the Tours by Canyon sheet to the right of the Cur-


rent Tours sheet.

10. Sort the Tours by Canyon worksheet by Tour Canyon (A


to Z), then Home Country (A to Z), and then Last Name
(A to Z).

11. Make another copy of the Current Tours sheet and re-
name it US Guests.

12. Place the US Guests sheet to the right of the Tours by


Canyon sheet.

13. Filter the US Guests worksheet so that only guests with


a Home Country of the United States show.

14. Sort the worksheet by Tour State (A to Z).

15. Add a Total Row that sums the Guests and Total Cost
columns.

16. Make another copy of the Current Tours sheet and re-
name it European Guests.
5.4 chapter practice 297

17. Place the European Guests sheet to the right of the US


Guests sheet.

18. On the European Guests worksheet, hide the Average


Age column.

19. Insert a slicer in the European Guests sheet for Home


Country. Move the slicer so its top left corner is near the
center of K3. Click-and-drag the bottom right corner of
the slicer so it is near the center of N16.

20. Select both Germany and the United Kingdom on the


slicer.

21. Sort the filtered sheet by Home Country (A to Z) and then


Last Name (A to Z).

22. Make one more copy of the Current Tours sheet and
rename it Tours by State.

23. Place the Tours by State sheet to the right of the Euro-
pean Guests sheet.

24. Subtotal the sheet by Tour State, summing the Total Cost
column. (Remember to sort the worksheet by Tour State
before applying subtotals.)

25. Change the name of the Tours by State sheet to 5 − 7


Day Tours by State. Filter out 3-day tours in the table.

26. Save the PR5-Canyon Trails workbook.

27. On each worksheet, make the following print setup


changes.
• Add a footer with the worksheet name in the center.
• Change to Landscape Orientation.
• Set the scaling to Fit All Columns on One Page.

28. For any worksheets that print on more than one page,
add Print Titles to repeat the first three rows at the top
of each page.

29. Make sure the sheets are in the following order from left
to right: Current Tours, Tours by Canyon, US Guests,
European Guests, and 5 − 7 Day Tours by State.

30. Save the PR5-Canyon Trails workbook.


298 tables

31. Compare the workbook with the self-check answer key


(PR5-Canyon Trails Solution) and then close and sub-
mit the PR5-Canyon Trails workbook as directed by the
instructor.

5.5 scored assessment

5.5.1 Tables for a Retail Company

Retail companies with online and in-store sales have a huge quantity
of data to keep track of. Keeping track of sales, costs, and profits
on a daily basis is essential to making the most of a business. This
exercise illustrates how to use the skills presented in this chapter to
generate the data needed on a daily basis by a retail company. Figure
229 shows the completed worksheet.

Figure 229: Scored Assessment Completed Exercise

1. Open SC5-Data and save the file as SC5-Dynamite Cus-


tomer Sales.

2. Click on the Sales worksheet.

3. In I4, enter a Vlookup function that will find the Product


Price for the Product in E4 using the table in the Prod-
uct Table worksheet. In the Vlookup function, fill in the
required parameters using the values below along with
Figure 230 as a reference. (Notice that the Table array pa-
rameter uses absolute cell references.)
• Lookup value: E4
• Table array: ’Product Table’!$A$1:$D$13
• Col index num: 4
• Range lookup: False
5.5 scored assessment 299

Figure 230: Vlookup window

4. Copy cell I5 to I6:I52.

5. In J4, enter a Vlookup function that will find the Product


Cost for the Product in E4 using the table in the Prod-
uct Table worksheet. Note that the COL INDEX NUM
needs to be 3 instead of 4.

6. Copy J4 to J5:J52.

7. In K4, calculate Profit (Product Price – Product Cost).

8. Copy K4 to K5:K52.

9. Format Columns I, Column J, and Column K as Account-


ing with two decimal places.

10. Click cell A3. Insert a table with headers for the range
A3:K52. BE CAREFUL HERE: Excel will try to insert a
table starting with A2. Be certain the range starts with
A3.

Online Sales by Date

1. Make a copy of the Sales sheet.

2. Rename Sales (2) to Online Sales by Date.

3. Place Online Sales by Date to the right of the Sales work-


sheet.

4. On the Online Sales by Date worksheet, filter Sales Type


so that only Online Sales are displayed.

5. Sort the filtered data by Date Sold (Oldest to Newest).


300 tables

June Sales by Country

1. Make a copy of the Sales sheet and rename it June Sales


by Country.

2. Place June Sales by Country to the right of the Online


Sales by Date worksheet.

3. On the June Sales by Country worksheet, filter Date Sold


to only show June dates by using the Date Filter Between.

4. Sort the worksheet by Country (A to Z) and then by Name


(A to Z).

Sales by Product

1. Make another copy of the Sales sheet and rename it


Sales by Product.

2. Place Sales by Product to the right of the June Sales by


Country worksheet.

3. In the Sales by Product worksheet, hide the Region col-


umn.

4. Insert a slicer for Product Sold. Move the slicer so its top
left corner is near the center of L3. Click-and-drag the
bottom right corner of the slicer so it is near the center
of O16.

5. Select both DETA100 and DETA200 in the slicer (all other


products should be off).

6. Sort the filtered sheet by Product Sold (A to Z).

7. Add a Total Row that includes the average for the Product
Price, Product Cost, and Profit columns.

8. Change the heading in A53 to Average.

Subtotals by Date

1. Make a copy of the Sales sheet and rename it Subtotals


by Date.

2. Place Subtotals by Date to the right of the Sales by Prod-


uct worksheet.
5.5 scored assessment 301

3. In the Subtotals by Date worksheet, subtotal the sheet


by Date Sold (Oldest to Newest), summing the Profit col-
umn.

4. Click the 2 Outline button to show just the subtotals by


date and the Grand Total.

Subtotals by Type

1. Make a copy of the Sales sheet and rename it Subtotals


by Type.

2. Place Subtotals by Type to the right of the Subtotals by


Date worksheet.

3. Subtotal the sheet by Sales Type, summing the Profit col-


umn.

4. Add a second subtotal that subtotals by Type and aver-


ages the Profit column. (Hint: uncheck Replace Current
Subtotals in the Subtotal dialog box.)

5. Notice that four outline buttons appear with the second


subtotal. Experiment to determine which outline button
to click to display the Average and Total subtotals for
both Online and Retail along with the Grand Average and
Grand Total.

Print Settings

1. For each worksheet, click Insert ⇒ Text ⇒ Header &


Footer to add a custom footer with the worksheet name
in the center.

2. Preview each worksheet in Print Preview and make any


necessary changes for professional printing. (Hint: Ori-
entation, page scaling, and print titles might need to be
adjusted.)

3. Double-check that the sheets are in the following order


from left to right: Sales, Online Sales by Date, June
Sales by Country, Sales by Product, Subtotals by Date,
Subtotals by Type, and Product Table.

4. Save and close the SC5-Dynamite Customer Sales work-


book.
302 tables

5. Submit the SC5-Dynamite Customer Sales workbook as


directed by the instructor.
M U LT I P L E S H E E T S
6
Excel workbooks often contain a large amount of data and work-
sheets can quickly become overwhelming. When one worksheet be-
comes cumbersome, data can be broken out into smaller subsets and
placed in separate worksheets within the same Excel file. Separating
out workbook data into smaller pieces can lead to better data organi-
zation within a file and increase its ease of use. For example, when
a retail company needs to track overall sales along with individual
store sales, it makes sense to place each store’s sales data in a sepa-
rate worksheet within a file. Adding a summary worksheet that sums
across all the worksheets will total the entire company sales data in
the same file. This chapter will show how to set up a workbook to
make using multiple worksheets quick and easy.
When spreading data across several worksheets, it is essential that
each worksheet is laid out in the same way. To facilitate this, a tem-
plate can be used. A template is the basic pattern for each new work-
sheet that can be used repeatedly to make sure each new worksheet
has the same setup, formatting, formulas, etc. as the existing work-
sheets in a file. In this chapter, both predefined Excel templates and
those created from scratch will be used to meet the specific needs of
the work required.

6.1 multiple worksheet basics

Learning Objectives

• Navigating through a file with multiple worksheets.


• Adding, deleting, copying, and moving worksheets.
• Grouping and ungrouping worksheets.

The Excel workbooks used throughout this textbook have included


multiple worksheets, so this concept will not be new. This chapter de-
velops a personal budget file that contains income and expenses for
an entire year. The file contains a worksheet for each month of the
year as well as a summary worksheet that totals all twelve monthly
worksheets. The chapter begins with exercises designed to demon-
strate moving through worksheets, organizing them, and making sure
that all twelve monthly worksheets are consistent. Figure 231 shows
the January worksheet in the Personal Budget file along with all the
worksheet tabs along the bottom of the window.

303
304 multiple sheets

Figure 231: January Worksheet in the Personal Budget File

6.1.1 Navigating Through File with Multiple Worksheets

1. Open CH6-Data and save the file as CH6-Personal Bud-


get. Notice that the file has an Expenses Summary work-
sheet tab at the far left followed by monthly worksheets.

2. Click on the different worksheet tabs at the bottom of the


screen to move through the worksheets. The Expenses
Summary worksheet is formatted differently from the
monthly worksheets, but all the monthly worksheets are
identical in layout and format.

3. Take a second look at the months and notice the monthly


expenses and income for September through October
has not been added and there is no worksheet for De-
cember.

4. Add the following data in the September, October, and


November worksheets.
6.1 multiple worksheet basics 305

Item September October November


Power $135 $135 $135
Water $30 $30 $30
Groceries $300 $325 $400
Miscellaneous $100 $50 $100
Bonus
Freelance $500 $150
Other $100

Table 24: Data for September/October/November

6.1.2 Copying a Worksheet

To make a December worksheet, copy the November worksheet.

1. Point the mouse at the November worksheet tab at the


bottom of the screen.

2. Hold down the left mouse button and then press and
hold down the Ctrl key.

3. Drag the mouse to the right and drop the copied work-
sheet to the right of the November worksheet.

4. There should now be a November (2) worksheet to the


right of the November worksheet as shown in Figure
232.

Figure 232: Additional November Worksheet

5. Right-click on the November (2) worksheet name at the


bottom of the screen and choose Rename.

6. Type December and press Enter .


306 multiple sheets

7. Click on the December worksheet tab to activate it. Note,


be sure to activate the cell and not just the Monthly Bud-
get image.

8. Click cell B1 and change November to December.

9. Make the following data changes.


• Miscellaneous: $300
• Bonus: $250 (holiday bonus)
• Freelance: delete amount

10. Save the CH6-Personal Budget workbook.

11. Point the mouse at the December worksheet tab at the


bottom of the screen.

12. Hold down the left mouse button and then press and
hold down the Ctrl key.

13. Drag the mouse to the right and drop the copied work-
sheet to the right of the December worksheet.

14. There should now be a December (2) worksheet to the


right of the December worksheet.

15. Rename the December(2) worksheet to Practice.

Skill Refresher
Copying a Worksheet

• Point the mouse at the worksheet to copy at the bot-


tom of the screen.
• Hold down the left mouse button and then press and
hold down the Ctrl key.
• Drag the mouse to the right (still holding down the
left-mouse button and the Ctrl key) until the black
down-pointing arrow is to the right of the existing
worksheet.
• Let go of the mouse button and then the Ctrl key.
There should now be a Sheetname (2) to the right of
the original worksheet.
• Rename the Sheetname (2) worksheet as desired.
6.1 multiple worksheet basics 307

6.1.3 Moving and Deleting Worksheets

Sometimes worksheets do not end up in the right order, and they


need to be moved.

1. Point to the Practice worksheet and hold down the left


mouse button.

2. Notice this time that there is still a black arrow to the


left of the Practice worksheet, but the piece of paper
is blank. It does not have a plus sign (+) because the
worksheet is moving instead of copying.

3. While still holding the left mouse button, drag to the left
until a black arrow marker is between the October and
November worksheets.

4. Release the mouse button.

5. Try moving the Practice worksheet back to the right of


the December worksheet.

Since the Practice worksheet is not needed, use the following proce-
dure to delete it.

1. Right-click on the Practice worksheet tab at the bottom


of the screen.

2. Click Delete. Figure 233 shows the warning message box


that will appear, though it may look slightly different
depending on the version of Excel being using.

3. Click Delete.

Figure 233: Warning Message Box

Important!

Deleting a Worksheet

Once a worksheet is deleted, Undo will not bring it


back, so be careful.
308 multiple sheets

6.1.4 Grouping and Ungrouping Worksheets

Look at the monthly worksheets again. Notice that there is a place in


each of these worksheets to calculate three pieces of Summary data:
Income, Expenses, and Balance; but there are no formulas in these cells.
There is also a place for the % of Income Spent, but a formula is needed
in I6 to calculate this. If these formulas were individually added in
each of the twelve monthly worksheets, it would take a long time and
since this task is very repetitive it would also be likely that mistakes
would be made along the way. By grouping all the month worksheets
together, the formulas are entered only once but appear in all the
worksheets.

1. Click the January worksheet tab to make it active.

2. Hold the Shift key down and click on the December


worksheet tab to group them.

All 12 worksheets are selected. This can be verified in two ways: the
worksheet tabs that have been selected are in bold font at the bottom
of the screen and the title bar at the top of the screen adds the word
Group to the end of the title. These are both visible in Figure 234.

Figure 234: Grouped Worksheets

It is important to remember that any changes made to the January work-


sheet will be made to all the grouped worksheets. This makes it easy to
make changes to all the worksheets at once, but they must be un-
grouped after making changes or data on linked worksheets can be
inadvertently destroyed.

1. Click cell F11 in the January worksheet and enter the


formula =SUM(F5:F8).
6.1 multiple worksheet basics 309

2. In cell F12, enter the formula =SUM(C5:C13).

3. In cell F13, subtract Expenses from Income. In the Jan-


uary worksheet, the balance should be $690. Hint: if the
answer is negative, then Income was subtracted from Ex-
penses and the formula needs to be corrected.

4. Click cell I6. (I6 and I7 are merged, but that does not
matter.)

5. Enter a formula that divides Expenses (F12) by Income


(F11). The answer will show as a percentage since this
cell has already been formatted to do this. Hint: If the
percentage is greater than 100% the numbers are re-
versed.

Notice that a data bar was set up in I5 to visually show the income
spent, which is a skill that is covered elsewhere in the course. The
January worksheet should now look like Figure 235.

Figure 235: January Worksheet with Formulas

1. Now that the monthly worksheets are done, they need to


be ungrouped. Right-click on one of the grouped work-
sheet tabs and choose Ungroup Sheets. Notice the work-
sheets tabs are no longer bold and the word Group is no
longer in the title bar.

2. Click on several of the month worksheets to see that all


the formulas have been added.

3. Click on the December worksheet. The worksheet


should look like Figure 236.
310 multiple sheets

Figure 236: December Worksheet with Formulas

Look at the Notes in the September worksheet. It says that the rent
was raised in September, so the Gym Membership needs to be cancelled
and $0 should be entered for that amount in October, November, and
December.

1. Group the October, November, and December work-


sheets. If this is done successfully these three worksheet
names should be bold and the word Group will appear
in the Title bar.

2. Click the October worksheet tab to activate it.

3. Click cell C13 (Gym Membership) and change the amount


to $0. Press Enter .

4. Ungroup the worksheets. The Balance should be October:


$605, November: $530, and December: $430.

5. Save the CH6-Personal Budget workbook.


6.2 formulas with 3-d references 311

Skill Refresher
To Group Worksheets

• Click on the leftmost worksheet group; then hold the


Shift key down and click on the rightmost worksheet
to group.

To Ungroup Worksheets

• Right-click on one of the grouped worksheets and


choose Ungroup Worksheets.

Key Take-Aways

Worksheets

• Worksheets can be easily moved, copied, deleted, and


renamed.
• When grouped, identically formatted worksheets can
be changed at the same time.

6.2 formulas with 3-d references

Learning Objectives

• Entering formulas that reference another worksheet,


which are called 3-D references.
• Using the SUM function to total values on multiple
worksheets.

The Summary worksheet in many multiple worksheet workbooks


is utilized to present totaled information from the other worksheets
in the file. This is done to give a quick synopsis of all the other
worksheets in one convenient location. For this reason, the Summary
worksheet is usually the first worksheet in multiple-sheet files. Sum-
mary worksheets “pull” data from the other worksheets using three-
dimensional (3-D ) cell references. To distinguish between A3 in the
Summary worksheet, A3 in the January worksheet, A3 in the Febru-
ary worksheet, etc.; a 3-D cell reference includes the worksheet name
along with the cell reference. The syntax to reference a cell in a differ-
ent worksheet is =SheetName!CellRange. So, the cell reference for A15
in the March worksheet would be =March!A15.
312 multiple sheets

Best Practice
Summary Worksheet

Even if there are no 3-D formulas to summarize on a


summary worksheet, it is considered a best practice to
include a summary worksheet with information about the
data contained in the workbook, the date the workbook
was last updated, and contact information for the person
who created the workbook.

6.2.1 Create the Expenses Summary Worksheet

1. Click the Expenses Summary worksheet tab to activate


it.

2. Click cell C5 and enter =January!C5. Press Enter . This


will get the amount $700 from cell C5 in the January
worksheet.

3. Delete the formula in C5 in the Expenses Summary


worksheet.

4. This time, click cell C5 and type =. Then click on the


January worksheet, click cell C5, and press Enter .

5. This will put the same formula, =January!C5, in cell C5


in the Expenses Summary worksheet and will return the
value $700. In general, it is more time-consuming to cre-
ate a 3-D formula by clicking on separate worksheets,
but it is less prone to error.

6. In cell C6 in the Expenses Summary worksheet, try en-


tering a formula for the Power amount in the April work-
sheet. That amount should be $135.

7. Delete the formulas in cells C5 and C6 in the Expenses


Summary worksheet.

For the Annual Amounts in C5:C13 in the Expenses Summary work-


sheet, the amount from a single month’s worksheet is not needed; in-
stead, the sum of all the entries in all the monthly worksheets should
be entered. So, a 3-D sum for all twelve monthly worksheets should
be entered. Here is a helpful hint on the steps that will sum cells on
multiple worksheets.
6.2 formulas with 3-d references 313

Skill Refresher
To SUM Across Worksheets

• Click on the cell where the 3-D SUM should appear.


• Type =SUM(
• Click on the leftmost worksheet in the group of work-
sheets to sum.
• Hold the Shift key down and click on the rightmost
worksheet in the group of worksheets to sum.
• Click on the cell in the worksheet that should be
summed.
• Press Enter .

Follow these steps to sum the monthly amounts in the Expenses


Summary worksheet.

1. Click cell C5 in the Expenses Summary worksheet.

2. Type =SUM(. (Make sure to type the open parentheses.)

3. Click on the January worksheet.

4. Hold the Shift key down and click on the December


worksheet.

5. Click cell C5 again (this will be on the January work-


sheet) and press Enter . Cell C5 should display the sum
of $8, 400.

6. Click on C5 in the Expenses Summary work-


sheet. The formula bar should show the following:
=SUM(January:December!C5). This means Excel will cal-
culate the sum of C5 on the January through December
worksheets.

7. For another 3-D sum, click cell C6.

8. Type =SUM(. (Make sure to type the open parentheses.)

9. Click on the January worksheet.

10. Hold the Shift key down and click on the December
worksheet.

11. Click cell C6 again and press Enter . Cell C6 on the


Expenses Summary worksheet should now display the
sum of $1, 610.
314 multiple sheets

12. Click cell C6 in the Expenses Summary work-


sheet. The formula bar should show the following:
=SUM(January:December!C6).

13. Copy C6 to C7:C13. The Expenses Summary worksheet


should match Figure 237.

14. Save the CH6-Personal Budget workbook.

Figure 237: Complete Expenses Summary Formulas

While the 3-D formulas are complete in the Expenses Summary work-
sheet, the summary feels like it is lacking something, so add a visual
representation of the summary numbers to the worksheet.

1. Select cells B5:C13 in the Expenses Summary work-


sheet.

2. Click Insert ⇒ Charts ⇒ Pie Chart ⇒ First 2-D Pie.

3. Resize the pie chart using the values below. For each side
of the chart, press the Alt key while dragging the resize
handle on the chart to make it “lock into” position.
6.2 formulas with 3-d references 315

Chart Side Locked To


Top Top of Row 3
Left Left of Column D
Bottom Bottom of Row 13
Right Right of Column J

4. Click Chart Design ⇒ Chart Layouts ⇒ Quick Layout


⇒ Layout 7. That layout places the legend on the right
side of the chart and removes the title (see Figure 238).

Figure 238: Quick Layout Options

5. Click Chart Design ⇒ Chart Layouts ⇒ Add Chart Ele-


ment ⇒ Data Labels ⇒ Outside End.

6. The complete Expenses Summary worksheet should


look like Figure 239 below.

7. Save the CH6-Personal Budget workbook.

8. Compare the workbook with the self-check answer key


(CH6-Personal Budget Solution) and then close and sub-
mit the CH6-Personal Budget workbook as directed by
the instructor.
316 multiple sheets

Figure 239: Completed Expenses Summary Worksheet

Skill Refresher
3-D References in Formulas

• To reference a cell in another worksheet, use the for-


mula syntax =SheetName!CellAddress.

• To enter a 3-D reference:


1. Click on the cell where the formula should ap-
pear and type =.
2. Click the worksheet with the cell to reference.
3. Click the cell and press Enter .

Key Take-Aways

3-D References

• 3-D references in formulas allow data from one or


more worksheets to be used on another worksheet.

6.3 templates

Learning Objectives

• Use an existing Microsoft Excel template to create a


new workbook.
• Create a custom template that can be used to create
new workbook.
6.3 templates 317

A template is a predefined pattern for a workbook. Hundreds of


templates created by Microsoft are available to use inside Excel and
these templates are extremely helpful to quickly start and complete a
new task in Excel. Templates include all the formulas, formatting, etc.
needed in a professional Excel workbook. All that is left to do is en-
ter the data. Predefined Microsoft templates include everything from
billing statements to blood pressure trackers to business cards. Cat-
egories include: Business, Personal, Industry, Financial Management,
Logs, Calculators, and Lists.
Sometimes a specific template is needed that has not already been
created by Microsoft. Taking the time to create a custom template
allows users to create new workbooks from it repeatedly. If a new
version of some workbook is needed on a regular basis, templates
will make this work much easier. This chapter explores both types of
templates: predefined and custom.

6.3.1 Predefined Templates

Microsoft has made many predefined templates available in Excel.


Follow these steps to explore this resource.

1. Click File ⇒ New.

2. Click in the Search box for Online template.

3. Type Travel and press Enter .

4. Click the Travel Expense Report and click Create. Note:


If this template is not available, ask the instructor which
template to use.

The screen should look like Figure 240 below. Notice the design,
layout, and formulas have already been set up.

Figure 240: Travel Expenses Report Template

Complete the following steps to investigate this template.


318 multiple sheets

1. Enter the student’s name in C3 (Name).

2. Enter CLL in C5 (Department).

3. Press Ctrl + ∼ (that is Ctrl+tilde) to see where the for-


mulas are in the worksheet. Working in the formula
view helps find formulas, so they will not be acciden-
tally deleted.

4. In formula view, carefully delete just the data in C10:I13.


Do not delete any formulas!

5. Press Ctrl + ∼ (that is Ctrl+tilde) again to return to Nor-


mal view.

6. Enter dates and expenses for an imaginary trip in Row


10, Row 11, and Row 12.

7. Save the completed workbook as CH6-Travel Expenses.

8. Compare the workbook with the self-check answer key


(CH6-Travel Expenses Solution) and then close and sub-
mit the CH6-Travel Expenses workbook as directed by
the instructor.

Skill Refresher
Predefined Template

• Click File ⇒ New.


• Type the desired template description in the Search
box, and press Enter .

6.3.2 Custom Templates

To create a custom template, either start with a blank workbook or


use an existing workbook . Either way, the template can be used to
create new workbooks that have a uniform appearance and set of
functions. For this exercise, the existing CH6-Personal Budget file will
be converted into a template but the assignments at the end of the
chapter build a template from scratch.

1. Open the CH6-Personal Budget file.

2. Group the month worksheets (January through Decem-


ber).
6.3 templates 319

3. Press Ctrl + ∼ (that is Ctrl+tilde) to switch to Formula


view.

4. Delete only the data from these worksheets, not labels


or formulas.
• Select C5:C13 (with all the worksheets still
grouped) and press Delete .
• Select F5:F8 (with all the worksheets still grouped)
and press Delete .
• Select H11:J13 (with all the worksheets still
grouped) and press Delete .

5. Press Ctrl + ∼ (that is Ctrl+tilde) to switch back to Nor-


mal view.

6. Ungroup the worksheets.

7. Look through the worksheets to check that only the data


has been deleted. Notice the error message #DIV/O ap-
pears in I6 since the data for this formula has been
deleted. The January worksheet should look like Figure
241.

Figure 241: January Template Worksheet

Note: There are only formulas and the pie chart in the Expenses Sum-
mary worksheet, so nothing needs to be deleted from this worksheet
to setup the template.
320 multiple sheets

1. Click File ⇒ Save As.

2. Choose the location to save the file.

3. In the Save as type pull-down list, select Excel Template


(*.xltx).

4. At the top of the screen, double-check that the location


selected to save the file has not changed. If it has, navi-
gate to the folder where the template will be saved. Be
Careful Here! By default, Excel will try to save this to a
default template file location on the local hard drive.

5. Type in the file name CH6-Personal Budget Template.


Carefully compare the screen with Figure 242. Keep in
mind that the template file may be getting saved to a
different place on the computer since Excel will nor-
mally save templates to a specific folder on the local hard
drive.

6. Click Save.

7. Compare the workbook with the self-check answer key


(CH6-Personal Budget Template Solution) and then
close and submit the CH6-Personal Budget Template
workbook as directed by the instructor.

Figure 242: Save As Template


6.3 templates 321

Skill Refresher
Save a Template

• Click File ⇒ Save As.


• Choose the location to save the file.
• In the Save as type pull-down list, select Excel Template
(*.xltx).
• At the top of the screen, double-check that the loca-
tion to save the file to has not changed. If it has, nav-
igate to the folder where the template will be saved.
Be Careful Here! By default, Excel will save templates
to a default file location on the local hard drive.
• Enter the file name.
• Click Save.

Use the new budget template to start a Personal Budget file for
2017.

1. Click File ⇒ Open.

2. Navigate to the folder containing the CH6-Personal Bud-


get Template and open that file.

3. Click File ⇒ Save As.

4. Choose the location to save the 2017 version of the file.

5. Change the Save as Type to Excel Workbook (*.xlsx).

6. Enter the File name CH6-2017 Personal Budget. Com-


pare the screen to Figure 243.
322 multiple sheets

Figure 243: Save As 2017 Budget File

7. Click Save.

8. Group all the worksheets together including the Ex-


penses Summary worksheet.

9. Click on H1. Type 2017 and press Enter .

10. Ungroup the worksheets.

11. Click the January worksheet tab to activate it.

12. Enter the data found in Figure 244.


6.3 templates 323

Figure 244: January 2017 Data

13. Click the Expenses Summary worksheet tab to activate


it. The data and the pie chart should show the January
data since that is the only data in the twelve monthly
worksheets. The worksheet should look like Figure 245.

14. Save the CH6-2017 Personal Budget workbook.

Figure 245: Expense Summary Worksheet


324 multiple sheets

Key Take-Aways

Templates

• Templates save time and effort when compared to de-


signing and creating workbook files from scratch.
• There are many predefined templates in Excel.
• Custom templates can be created for special purposes.

6.4 preparing to print

Learning Objectives

• Printing all the worksheets in a workbook at one time.


• Preparing multiple worksheets for printing using
grouping.

Just like consistency in formatting is important when working with


workbooks containing multiple worksheets with the same type of
data, so is consistency in page setup. Now that the 2017 Personal Bud-
get workbook is complete, prepare it for printing by changing the
page orientation and adding a header. All 13 worksheets will also be
printed at one time.

6.4.1 Applying Page Setup Options to Grouped Worksheets

As always, review the workbook in Print Preview before considering


it complete.

1. Click File ⇒ Print.

2. To view all the worksheets at one time, select Print En-


tire Workbook in the first box in the Settings section.
There should be 26 pages to scroll through in Print Pre-
view. At this point, clicking the Print button would print
all the worksheets rather than just the active sheet.

3. Exit Print Preview by clicking the arrow button in the top


left corner of the screen. The page orientation of all the
worksheets can be changed at one time, but not in Print
Preview.

4. Group all the worksheets together, including the Ex-


penses Summary worksheet through the December
worksheet.
6.4 preparing to print 325

5. Click Page Layout ⇒ Page Setup ⇒ Orientation ⇒


Landscape.

6. Click Page Layout ⇒ Page Setup Launcher ⇒ Head-


er/Footer Tab ⇒ Custom Footer.

7. In the center section of the custom footer, insert the


worksheet name using the Insert Sheet Name button
(that is the last button in the fourth group; it looks like a
tiny worksheet). The Footer dialog box should look like
Figure 246.

8. Click OK to close the Footer dialog box. Click OK again


to close the Page Setup dialog box.

9. Click File ⇒ Print to return to Print Preview. Check to see


if each worksheet is printing on one page, in landscape
orientation, with the correct worksheet name appearing
in the footer.

Figure 246: Insert Worksheet Name

Print Preview makes it clear that the Expenses Summary worksheet


is not set to print correctly since part of the chart is appearing on a
second page. This can be easily fixed by changing the Scaling, but to
change the scaling of only the Expenses Summary worksheet, not the
entire workbook, the worksheets need to be ungrouped.

1. Exit Print Preview by clicking the arrow button in the top


left corner.

2. Ungroup the worksheets.

3. If needed, click the Expenses Summary worksheet tab to


activate it.

4. Click Page Layout ⇒ Scale to Fit ⇒ Width Down-


Arrow. Select 1 page. This has the same result as select-
ing Fit All Columns on One Page in the Scaling setting
in Print Preview (see Figure 247).
326 multiple sheets

Figure 247: Scale to Fit

1. Click File ⇒ Print.

2. Confirm that the Expenses Summary worksheet is now


printing on one page only. There should only be 13
pages in the printout.

3. Exit Print Preview.

4. Save the CH6-2017 Personal Budget workbook.

5. Compare the workbook with the self-check answer key


(CH6-2017 Personal Budget Solution) and then close
and submit the CH6-2017 Personal Budget workbook
as directed by the instructor.

Key Take-Aways

Printing

• To print all the worksheets in a workbook at one time


select Print Entire Workbook in the Print Settings.
• Page setup options, such as scaling, orientation, and
headers/footers, can be applied to multiple work-
sheets at one time by grouping them.

6.5 chapter practice

6.5.1 A Multiple Worksheet Template for a Sports Team

The coaches of the Pacific Northwest Soccer Club want a consistent way
to keep track of their team statistics. To help with this, create a tem-
plate for season stats for each team. The High Flyers team coach will
use the template to enter that team’s statistics into a workbook.

1. Open the data file PR6-Data and save the file as PR6-
Pacific NW Sports Team.
6.5 chapter practice 327

2. On the Season Stats worksheet, copy A8:F19 to the


same range in the Player Stats worksheet.

3. Group the worksheets and add the following formulas


to both worksheets.
• In B19, enter =COUNTA(B9:B18) to count the num-
ber of X’s in those rows for children who played
that game.
• Copy B19 to C19 to count the number of X’s in
those rows for children who started the game.
• In D19, enter =SUM(D9:D18) to calculate the total
number of shots taken.
• Copy D19 to E19 to calculate the total number of
goals.
• In F9, calculate Goal Percentage by dividing the
number of Goals by the number of Shots. This will
display an error message because there are zeros in
Column D. An IF statement that tests the value of
Column D will keep error messages from appear-
ing. Change F9 to an IF formula using the follow-
ing three parameters.
– Test: is D9 greater than zero
– If the Test is True: number of Goals divided by
the number of Shots
– If the Test is False: zero
• Copy F9 to F10:F19.
• Format F9:F19 as percentages.
• Using Home ⇒ Font ⇒ Fill Color, set Row 10, Row
12, Row 14, Row 16, and Row 18 to No Fill.

4. Ungroup the worksheets.

5. Compare the workbook with the self-check answer key


(PR6-Pacific NW Sports Team Solution) and then save
the file as a template called PR6-Pacific NW Team Tem-
plate. Make sure to save the template to a USB drive and
not the default folder for templates on the local hard
drive.

6. Make a new file using the PR6 Pacific NW Team Tem-


plate and save it as a regular Excel workbook named
PR6-High Flyers.
328 multiple sheets

7. In the Season Stats worksheet, enter the following data:


• C2 – High Flyers
• C3 – Fall and the current year (i. e.Fall 2020)
• C4 – Pacific Northwest Soccer

8. Make up a coach’s name, phone number, and email ad-


dress for row 6.

9. Make four copies of the Player Statistics worksheet. Re-


name the player worksheets Player 1, Player 2, Player 3,
Player 4, and Player 5.

10. Group all five Player worksheets.

11. Click cell C2 and enter =’Season Stats’!C2.

12. Copy C2 to C3:C4.

13. Ungroup the worksheets.

14. Click the Player 1 worksheet tab to activate it.

15. In cell C5, enter the Player Name: Juan Ramirez.

16. Enter other data from Table 26:

Game Played Started Shots Goals


Game 1 x x 2 1
Game 2 x x 3 1
Game 3
Game 4 x
Game 5 x x 2 0
Game 6 x
Game 7
Game 8 x x 1 1
Game 9 x x 4 2
Game 10 x x 3 3

Table 26: Player 1 Worksheet

1. Save the PR6-High Flyers workbook.

2. Click the Player 2 worksheet tab to activate it.

3. In cell C5, enter the Player Name: Zach Johnson.


6.5 chapter practice 329

4. Enter other data from Table 27:

Game Played Started Shots Goals


Game 1 x x 1 1
Game 2 x x 2 1
Game 3 x x 1 1
Game 4 x x 1 1
Game 5 x x 2 0
Game 6 x x 5 2
Game 7 x x 4 2
Game 8 x x 1 1
Game 9 x x 4 1
Game 10 x x 3 2

Table 27: Player 2 Worksheet

1. Save the PR6-High Flyers workbook.

2. Click the Player 3 worksheet tab to activate it.

3. In cell C5, enter the Player Name: Vito Lawrenz.

4. Enter other data from Table 28:

Game Played Started Shots Goals


Game 1 x x 0 0
Game 2 x x 1 1
Game 3 x x 2 0
Game 4 x 1 1
Game 5 x x 2 0
Game 6 x x 3 1
Game 7 x x 2 1
Game 8 x x 1 1
Game 9 x x 1 1
Game 10 x x 1 1

Table 28: Player 3 Worksheet

1. Save the PR6-High Flyers workbook.


330 multiple sheets

2. Make up information for the names and data in the


Player 4 and Player 5 worksheets.

3. Click the Season Stats worksheet to activate it.

4. Click cell B9.

5. Enter a 3-D formula to COUNTA in B9 on worksheets


Player 1 through Player 5.

6. Copy B9 to B10:B18.

7. Copy B9 to C9:C18.

8. Change the formulas in B19 and C19 from COUNTA to


SUM.

9. Click cell D9.

10. Enter a 3-D formula to SUM cells D9 on worksheets


Player 1 through Player 5.

11. Copy D9 to D10:D18.

12. Copy D9 to E9:E18.

13. Using Home ⇒ Font ⇒ Fill Color, set Row 10, Row 12,
Row 14, Row 16, and Row 18 to No Fill.

14. Click File ⇒ Print to preview the worksheets in Print Pre-


view. Notice that only part of the data is printing for each
worksheet. This is because a Print Area was incorrectly
set when the file was first created. This print area needs
to be cleared for each worksheet individually (modify-
ing print areas cannot be done on grouped worksheets).

15. Exit Print Preview by clicking the arrow in the top left
corner of the screen.

16. Click the tab to activate each of the six worksheets one
at a time and then click Page Layout ⇒ Page Setup ⇒
Print Area ⇒ Clear Print Area for each worksheet.

17. Click File ⇒ Print to preview the worksheets in Print


Preview. Notice that now all six sheets print correctly.

18. Save the PR6-High Flyers workbook.

19. Compare the workbook with the self-check answer key


(PR6-High Flyers Solution) and then close and submit
the PR6-High Flyers workbook and PR6-Pacific NW
Team Template.
6.6 scored assessment 331

6.6 scored assessment

6.6.1 A Multiple Worksheet Template for National Parks Data

A template for National Parks usage data along with a Summary


of the parks visitation data will be developed. To do this, create a
template with summary and individual park worksheets and then
use that template to enter park data for five national parks.

1. Open a new blank workbook.

2. Change the name of Sheet1 to Park Data.

3. Design a professional quality worksheet to display in-


dividual park data. Include areas to enter the name of a
park and the park statistics as found in Tables 29, 30, and
31 below. (Note: do not copy the physical layout of the
data tables.) Figure 248 is one example of how this could
be set up, though students are encouraged to explore al-
ternate layouts. (Note: the camping graphic is available
in the student files as CH6-Camping.png.)

Figure 248: Sample setup

4. Make a copy of the Park Data worksheet and rename it


Summary Park Data. Make sure both worksheets are
laid out exactly the same. The Summary Park Data
worksheet tab should be first and the Park Data work-
sheet tab should be second.

5. Save the file as a template called SC6-National Parks


Template. Make sure this gets saved to a USB drive and
not the default template folder on the hard drive.

6. Close SC6-National Parks Template.

7. Make a new file using the template and save it as a reg-


ular Excel workbook with a name of SC6-Five National
Parks.
332 multiple sheets

8. Make four copies of the Park Data worksheet. Rename


the five Park Data worksheets after the five parks listed
in Table 29.a

9. Enter the park name in cell B3 on each of the Park Data


sheets.

10. To make the sheets a bit more readable, right-align cell


B3 on each of the Park Data worksheets.

11. Click cell A3 on the Summary Park Data worksheet. En-


ter Summary into that cell.

12. Enter the park data for each of the parks in the five work-
sheets.
a Note: The National Park 2015 Data is from: https://irma.nps.gov/Stats/S
SRSReports.

Non- Non-
Recreation Recreation
Name recreation recreation
Visitors Hours
Visitors Hours
Acadia NP 2, 811, 184 47, 100 14, 452, 151 47, 100
Blue Ridge PKWY 15, 054, 603 1, 942, 260 93, 977, 122 971, 136
Crater Lake NP 614, 712 49, 600 4, 033, 484 24, 800
Yellowstone NP 4, 097, 710 1, 156, 118 82, 016, 845 711, 795
Yosemite NP 4, 150, 217 155, 081 78, 505, 877 3, 993, 223

Table 29: National Park Data, Pt 1

Conces- Conces-
Tent RV
Name sioner sioner
Campers Campers
Lodging Camping
Acadia NP 0 0 135, 000 32, 094
Blue Ridge PKWY 53, 688 0 61, 481 33, 499
Crater Lake NP 34, 629 55, 596 7, 548 0
Yellowstone NP 552, 940 584, 979 104, 149 69, 830
Yosemite NP 938, 418 0 588, 701 284, 372

Table 30: National Park Data, Pt 2


6.6 scored assessment 333

Back- Misc
Name country Overnight
Campers Stays
Acadia NP 1, 233 8, 343
Blue Ridge PKWY 2, 101 1, 294
Crater Lake NP 3, 253 0
Yellowstone NP 44, 898 11, 715
Yosemite NP 211, 966 39, 214

Table 31: National Park Data, Pt 3

1. On each of the Park Data worksheets, apply comma for-


mat to B5:B14 and reduce the number of decimal places
to zero.

2. On the Summary Park Data worksheet, create formulas


for all the fields that sum the same fields in the five park
worksheets. So, cell B5 on Summary Park Data should
contain a sum of the Recreation Visitors for all five parks.

3. On the Summary Park Data worksheet, apply comma


format to B5:B14 and reduce the number of decimal
places to zero.

4. Click File ⇒ Print and check the entire workbook in


Print Preview to ensure that it is printing professionally.
Make any changes needed.

5. Save the SC6-Five National Parks workbook.

6. Close and submit both the SC6-Five National Parks and


SC6-National Parks Template files as directed by the
instructor.
Part III

A D VA N C E D E X C E L

This part covers importing and analyzing data using pivot


tables and what-if analysis. It then covers using Excel to
create forecasts based on the data available. Finally, it presents
various ways that Excel can be used for statistical analysis
of data. Students who complete this part will be prepared
to use Excel for any data analysis function required in
their work or studies.
W O R K I N G W I T H D ATA
7
Excel is designed to work with data, and this chapter demonstrates
how data is imported and analyzed with tools like pivot tables. The
chapter begins with information about validating data input and safe-
guarding workbooks.

7.1 safeguarding

Learning Objectives

• Validate data input to decrease typing errors.


• Lock worksheet cells, or entire worksheets, so users
do not accidentally change or delete formulas.

It is occasionally desirable to safeguard certain cells in a worksheet,


or the entire worksheet, to keep a user from accidentally changing
something important. For example, if several cells include complex
formulas then those should be secured so users will not acciden-
tally delete them. There are two methods generally used to safeguard
worksheets: data validation and worksheet protection.

7.1.1 Data Validation

Excel’s data validation rules can be used in a variety of ways.

• Restrict the data entered in a cell.

• Circle all cells that do not conform to specified validation rules.

• Limit the user to a list of possibilities.

One of the easiest ways to restrict data is to provide a drop-down


list of choices for the user.

1. Open CH7-Safeguard and save the workbook as CH7-


Protected.

2. There is only one worksheet, named Validation. Notice


there is a list of Zip codes in cells K2:K10. The goal is to
permit the user to only select from this list of Zip codes
while inputting data in Column E to help reduce data
entry errors.

337
338 working with data

3. The first step is to name the list of zip codes.


a) Select K2:K10.
b) Click Formulas ⇒ Defined Names ⇒ Define Name.

Figure 249: Selecting a Range of Cells to Name

c) By default, Excel will suggest the name found in


the cell at the top of the range, K1 in this case, and
that is often acceptable. Notice that Excel replaced
the space between “Zip” and “Codes” with an un-
derscore.
d) Click OK.

Figure 250: Naming a Range of Cells


7.1 safeguarding 339

4. Select E2, which is the first cell that needs data valida-
tion.

5. Click Data ⇒ Data Tools ⇒ Data Validation. (Note,


click the button, not the down arrow on the right side of
the button.)

Figure 251: The Data Validation Button

6. Select List in the Allow field.

Figure 252: Selecting A Validation List

7. Check Ignore blank. If this is left unchecked then it


would force the user to enter a zip code, but when this
is checked the user can leave the zip code field blank.

8. Check In-cell dropdown. This creates a drop-down list


so the user can select a zip code from a list rather than
enter it manually.

9. Enter =Zip Codes for the Source (notice the underscore


between the word “Zip” and “Codes”). This tells Excel
that the acceptable list of zip codes for cell E2 is found
in the Zip Codes list.

10. Click OK.


340 working with data

Figure 253: Setting the Data Validation List

After following the above steps, a drop-down selection box will


appear whenever the user clicks into cell E2, as illustrated in Figure
254.

Figure 254: Valid Selections

1. Copy E2 to E3:E11 so all those cells will also get the


drop-down Zip Codes validation list.

2. Select any of the Zip Codes to fill E2:E11.


7.1 safeguarding 341

Note
Validation List Location

For this exercise the list of valid zip codes was con-
tained on the same worksheet as the cells to be validated.
However, the validation list is normally found on a dif-
ferent worksheet so it can be protected and, optionally,
hidden from the user.

A second validation method is used when the user can enter data
that cannot be selected from a list. For example, if users are required
to enter their age then a drop-down list containing every possible age
is not reasonable. In this case, Excel can be set up to ensure that the
data entered is within certain specific bounds. For example, an “age”
entry could be between 20 and 65 for working adults (or maybe some
other range). Data validation can use a full set of Boolean compar-
isons (between, equal to, greater than, etc.). As part of the process,
various messages can be displayed when the cell is selected to help
guide the user. Finally, the action taken when invalid data is entered
(Stop, Warning, or Information) can be specified.

1. Notice that the Validation worksheet includes an entry


for Age. The expectation is that users will enter their age,
but it is important to restrict this data to numbers be-
tween 20 and 65 so they do not accidentally enter a num-
ber out of the range or even text.

2. Select F2, which is the first cell that needs data valida-
tion.

3. Click Data ⇒ Data Tools ⇒ Data Validation. (Note,


click the button, not the down arrow on the right side of
the button.)

4. Select Whole number in the Allow field.

5. Select Between in the Data field.

6. Enter 20 in the Minimum field.

7. Enter 65 in the Maximum field.


342 working with data

Figure 255: Settings for Validating Numeric Data

8. Click the Input Message tab and enter Age for the Title
and Input an age between 20 and 65. for the Input Mes-
sage.

9. Click the Error Alert tab and select the Stop style then
enter Age for the Title and Input an age between 20 and
65. for the Input Message.

10. Click OK.

11. Copy F2 to F3:F11.

12. Click in F2 to activate that cell. Notice that the help mes-
sage pops up. Enter some number in F2. If that number
is between 20 and 65 then the entry works without error,
but if anything else is entered, an error message pops up
and forces a correct number to be entered.

13. Enter 19 in F2 to force an error.

14. Click Cancel on the Age error message.

15. Delete the data in F2.

Figure 256: Stopping on Data Entry Error


7.1 safeguarding 343

16. Click F2 to activate that cell.

17. Click Data ⇒ Data Tools ⇒ Data Validation. (Note,


click the button, not the down arrow on the right side of
the button.)

18. Click the Error Alert tab on the Data Validation dialog
box.

19. This cell was initially set to Stop on an error. Perhaps,


though, it would be acceptable for the user to finish the
data entry even if it contained an error. Change the Style
drop-down to Warning.

20. Click OK.

21. Copy F2 to F3:F11.

22. Click in F2 to activate that cell. Notice that the help mes-
sage pops up. Enter some number in F2. If that number
is between 20 and 65 then the entry works without er-
ror, but if anything else is entered, a warning message
pops up and permits the user to continue with the bad
number or retry.

Figure 257: Warning on Data Entry Error

23. Enter these numbers into cells F2:F11: 19, 50, 67, 40, 53,
35, 60, 23, 65, 21. A warning should pop up for F2 and
F4 since those entries are out of the acceptable range,
but click Yes on the warning popup box so the data is
entered.

24. Click Data ⇒ Data Tools ⇒ ⇒ Data Validation Down


Arrow ⇒ Circle Invalid Data.
344 working with data

Figure 258: Data Validation Options

25. Notice that the cells containing bad data are now circled
so they can be corrected.

Figure 259: Circled Data Errors

26. Click Data ⇒ Data Tools ⇒ Data Validation Down


Arrow ⇒ Clear Validation Circles to clear the validation
circles.

Note
Data Validation

Data validation will not automatically update the er-


ror circles as new data is entered. Therefore, after data is
entered in a worksheet the Circle Invalid Data button must
be clicked to check that data.

7.1.2 Worksheet Protection

After entering the data validation rules, it may be desirable to lock


the Validation worksheet so users cannot accidentally delete the for-
mulas or change the Zip Codes validation list. Before adding protec-
tion to a worksheet, cells that need to remain open for editing must
be unlocked. That way, after the entire sheet is locked those selected
7.1 safeguarding 345

cells can still be edited. Follow these steps to unlock cells that should
remain editable.

1. Select A2:F11. These are the only cells that users should
be able to modify.

2. Click Home ⇒ Cells ⇒ Format ⇒ Lock Cell.

3. Click cell A2.

4. Click Home ⇒ Cells ⇒ Format ⇒ Protect Sheet.

5. On the Protect Sheet dialog box, check Protect worksheet


and contents of locked cells.

6. Uncheck all options except Select Unlocked Cells.

7. Click OK.

8. Notice that now the mouse cannot click in any cell ex-
cept A2:F11

9. Save the CH7-Protected workbook.

10. Compare the workbook with the self-check answer key


(CH7-Protected Solution) and then close and submit the
CH7-Protected workbook as directed by the instructor.

Important!

About Passwords

Worksheets can be password protected, but there is


no way to recover the worksheet if the password is forgot-
ten. Therefore, it is essential to use a password that is easy
to remember but difficult to guess.

Important!

Security

While it is easy to lock worksheets to keep users from acci-


dentally changing a formula, this should not be considered
any sort of security. Users can easily unlock the worksheet
and make whatever changes they want. This is just a way
to stop users from accidentally making changes.
346 working with data

Key Take-Aways

Safeguarding

• Data entry can be validated to decrease the chance of


bad data being entered due to simple typing errors.
• Worksheets can be protected so users cannot acciden-
tally change formulas or data.

7.2 importing data

Learning Objectives

• Import data from the web and local files.

To use Excel’s powerful tools for analysis, data must first be im-
ported into a spreadsheet. Data can be imported from many sources,
but two common ones are from the web and from a datafile located
on the local computer. Data is very often posted on the web for re-
searchers to use in their projects. The United States federal govern-
ment, for example, has more than 200, 000 datasets freely available in
fields like taxes, crime, trade, education, and dozens of other topics1 .
Sometimes, that data can be imported directly into Excel but more
often it must be downloaded to a local computer and then imported
into Excel from that file. This section demonstrates both of those pro-
cedures.

7.2.1 Import from the Web

Data contained in a table on a website can be imported directly into


an Excel workbook. Follow these steps to import data from a website.

1. Open a new blank workbook.

1 See https://www.data.gov/
7.2 importing data 347

Important Note

Downloading From the Web

Excel 2016 includes a feature to get data from the web


at Data ⇒ Get External Data ⇒ From Web. Unfortunately,
that feature relies on the computer’s browser and Excel’s
download function is blocked by modern browsers. There-
fore, the process described in this section is the only way
to reliably download data from the web into Excel.

For this exercise, the “Juggling World Records” page on Wikipedia


will be used since it includes several different tables.

1. Click Data ⇒ Get & Transform ⇒ New Query


Excel 2016
⇒ From Other Sources ⇒ From Web

2. Click Data ⇒ Get & Transform Data ⇒ Get


Excel 365
Data ⇒ From Other Sources ⇒ From Web

Figure 260: Import From Web Menu

3. Select the Basic option and enter https://bit.ly/AdExcelC


in the From Web popup, as shown in Figure 261.

Figure 261: From Web URL Window


348 working with data

4. Press OK

5. It may take a few seconds for Excel to make a connec-


tion.

6. Excel permits several options to be set before accessing


the Web content, but the defaults are acceptable. Click
Connect.

Figure 262: Access Web Content Options

7. A box will pop up with a list of all tables on the page.


In Figure 263, the first table has been selected and a pre-
view of that table can be seen.

Figure 263: Listing of Webpage Tables

8. Select the first table and click Load

9. After Excel retrieves the data, it is imported into a table


on a new worksheet, as shown in Figure 264.
7.2 importing data 349

Figure 264: Imported Data Table

The imported data contains records for number of balls juggled as


found on a Wikipedia page. Excel displays a Queries & Connections
box on the right side of the screen. That box lists the Web queries that
were used to import data tables. Since there has only been one query
then only one item appears in this box, but if more queries are run,
they will also be listed here.

1. Close the Queries & Connections box by clicking the X in


the top right corner of the box.

2. Delete the Sheet1 worksheet.

3. Rename the Sheet2 worksheet to Juggling.

The webpage data is imported into Excel as a table, so tools like


filtering, sorting, and slicing the data are readily available. As with
any Excel table, this data table can be recolored and formatted as
desired2 .

7.2.2 Transforming Data

Normally, raw data includes unnecessary rows and columns that will
need to be “cleaned up” a bit before it can be imported. This is a
process that is called Transforming and Excel makes that process easy
to complete.

1. Click Data ⇒ Get & Transform ⇒ New Query


Excel 2016
⇒ From Other Sources ⇒ From Web

2. Excel 365 Click Data ⇒ Get & Transform Data ⇒ Get


Data ⇒ From Other Sources ⇒ From Web

2 See Chapter 5, tables, page 261 for more information about tables.
350 working with data

3. Enter https://bit.ly/AdExcelB in the From Web popup, as


shown in Figure 261 and click OK.

4. For this exercise, an online table with FBI crime statistics


from 2017 is being used as a source. Select Table 0, as
shown in Figure 265.

5. Notice in the preview that this table includes crime


statistics for the years 2016 and 2017. It also includes
various non-state regions, like “Northeast.” For this ex-
ercise, only the state-level data for 2017 is needed and it
is much easier to filter that before the data is imported
than to remove it later.

6. Excel 2016 Click Edit under the preview area.

7. Excel 365 Click Transform Data under the preview area.

Figure 265: Selecting Table 0

8. The Microsoft Power Query Editor window pops up where


the data can be filtered and edited in many ways before
it is imported. For this exercise, only two simple filters
will be applied.
7.2 importing data 351

Figure 266: Power Query Editor

9. Click the down arrow beside the Year column heading


and select only 2017 data and then click OK.

Figure 267: Filtering on 2017 Records

10. In the same way, click the down arrow beside the Area
column heading and uncheck all rows that are not state
names, like “East North Central,” and then click OK.
(Note: leave District of Columbia and Puerto Rico in the
list.)

11. Click Home ⇒ Close ⇒ Close & Load

12. Excel loads the data in a table on a new sheet. Rename


the worksheet to Crime.
352 working with data

13. Save the workbook as CH7-WebData.

14. Compare the workbook with the self-check answer key


(CH7-WebData Solution) and then close and submit the
CH7-WebData workbook as directed by the instructor.

7.2.3 Import from Data File

It is common for web data to be downloaded via a data file. Those


data files are, typically, in a .CSV format (that stands for “Comma
Separated Values”). This is a simple text file and can be opened with
a program no more complicated than Notepad; but .CSV files are typ-
ically opened with Excel or some other data analysis tool. Figure 268
shows the first few lines of the sales data file used in this lesson
opened in Notepad.

Figure 268: CSV File

Complete the following steps to load a .CSV file into Excel.

1. Open a new blank workbook.

2. Excel 2016 Click Data ⇒ Get & Transform ⇒ New Query


⇒ From File ⇒ From CSV.

3. Excel 365 Click Data ⇒ Get & Transform Data ⇒ Get


Data ⇒ From File ⇒ From Text/CSV Figure 269 illus-
trates this button.
7.2 importing data 353

Figure 269: Import CSV File

4. Navigate to CH7-Data.csv.

5. Click the file name and then Import. Figure 270 shows
the Import Data dialog box.

Figure 270: Selecting the CSV file

6. Excel will begin to import the .CSV data. Excel makes


its “best guess” about the type of data in the file, as
illustrated in Figure 271.
354 working with data

Figure 271: CSV Import Wizard

7. The sample text contained in the box illustrated in Fig-


ure 271 looks correct, so Excel has correctly determined
that the CSV file contains “1252 Western European (Win-
dows)” text that uses a comma delimiter. Click Load.

8. Excel loads the .CSV data into a new worksheet.

9. Close the Queries & Connections panel by clicking the X


in the top right corner of the box.

Figure 272 shows the first few lines of the worksheet which has the
imported data in a table that can be manipulated like any other table.
7.3 pivot tables 355

Figure 272: The Worksheet With Imported Data

1. Rename Sheet2 to Sales Data.

2. Delete Sheet1.

3. Save the workbook as CH7-Sales Summary.

Key Take-Aways

Importing Data

• Data can be imported from tables found on websites


using Data ⇒ Get External Data ⇒ From Web.
• Data can be imported from CSV files downloaded
from websites using Data ⇒ Get & Transform ⇒ New
Query ⇒ From File ⇒ From CSV.

7.3 pivot tables

Learning Objectives

• Create a pivot table.


• Manipulate a pivot table to change the information
displayed.
356 working with data

Pivot tables dynamically summarize data and are a favorite tool for
analysts since they are highly customizable and enormously power-
ful. These tools are called pivot tables because the data displayed can
be easily pivoted from rows to columns and back. Pivot tables are
sometimes called contingency tables or crosstabs and are frequently
seen in reports where tabular data is presented. A common example
of a pivot table is found in newspapers and magazines during elec-
tions where the editor creates a table showing the number of voters
by party, gender, race, or other factors. For this exercise, sales data
from a small supplier will be analyzed.

7.3.1 Introduction to Pivot Tables

1. Open the CH7-Sales Summary workbook that was cre-


ated in section 7.2.3 if it is not already opened.

2. Click in cell A1 in the Sales Data worksheet.

3. Click Insert ⇒ Tables ⇒ PivotTable. In Figure 273, the


PivotTable button can be found at the left end of the
ribbon.

Figure 273: PivotTable Button On The Ribbon

4. In the Create PivotTable popup, as seen in Figure 274, en-


sure that Excel automatically selected either the name
of the data table, CH7 Data, or the range $A$1:$G$44,
which is all the data on the worksheet. Also, ensure New
Worksheet is selected as the location of the new pivot ta-
ble.

5. Click OK.
7.3 pivot tables 357

Figure 274: Create PivotTable Wizard

6. A pivot table is created on a new worksheet. Rename


that sheet Sales Pivot.

7. Move the Sales Pivot worksheet to the right of Sales


Data if it is not already placed there.

8. A blank pivot table has six areas of interest for this les-
son, as shown in Figure 275.
• A. The Pivot Table will appear in the large area on
the left (it is blank in the illustration).
• B. The Field List contains the names of all the fields
available in the data set. These are the column head-
ers in the data table.
• C. Filters is where complex filters can be created to
restrict the data displayed on the pivot table.
• D. Column Labels define the columns on the pivot
table.
• E. Row Labels define the rows on the pivot table.
• F. Values define the numeric data calculated and
displayed in the pivot table.
358 working with data

Figure 275: Pivot Table Areas

9. Drag and drop Region in the Field List to the Rows area.

10. Drag and drop Item in the Field List to the Rows area
under Region.

11. Drag and drop Units in the Field List to the Values area.
Excel automatically displays the number of units sold
for each item, the total sold by region, and a Grand Total.
With just a few clicks of the mouse, Excel has created a
useful decision-making chart for managers. Figure 276
illustrates the pivot table at this point.

Figure 276: Sales Units

12. Click and drag Item from the Row Labels area to the Col-
umn Labels area. (Note, this can also be done by clicking
the down-arrow for Item and selecting Move to Column
7.3 pivot tables 359

Labels.) The same data is still being displayed, but it has


been rearranged to make it easier to compare regions.
Also notice that Excel automatically created two Grand
Totals, one for the rows and one for the columns. Figure
277 illustrates the pivot table at this point.

Figure 277: Sales Units With Columns

13. Uncheck Units in the Field List. This removes it from the
pivot table and leaves only labels with no numbers.

14. Check Total in the Field List. This is the total value of
the items sold and Excel places Total in the Values area
since it contains numbers. The table now reports the to-
tal value of all sales by region and item.

15. Change the value displayed to average rather than sum.


a) Click the down arrow in Sum of Total in the Values
area, as illustrated in Figure 278.
360 working with data

Figure 278: Values popup

b) Select Value Field Settings.


c) Select Average in the popup, as illustrated in Figure
279.
d) Click OK.

Figure 279: Selecting Average Values

16. The PivotTable is instantly changed to display the aver-


age sales by region and item.
7.3 pivot tables 361

17. The average is displayed to seven decimal places. Since


this is money, it would be best to round the averages to
two decimal places.
a) Click the down arrow in Average of Total in the Val-
ues area.
b) Select Value Field Settings.
c) Click the Number Format button at the bottom left
corner of the Value Field Settings popup, as illus-
trated in Figure 280.

Figure 280: The Number Format Button

d) Choose Number and set 2 decimal places (the de-


fault setting).
362 working with data

Figure 281: Setting Two Decimal Places

e) Click OK.
f) Click OK.

18. The pivot table is instantly changed to display the aver-


ages rounded to two decimal places, so it is more like
money.

19. Click Analyze ⇒ PivotTable ⇒ PivotTable Name and


enter Sales, as illustrated in Figure 282.

Figure 282: Renaming the Pivot Table


7.3 pivot tables 363

7.3.2 Using Calendar Data in a Pivot Table

1. Create a new pivot table by clicking in cell A1 in the


Sales Data worksheet.

2. Click Insert ⇒ Tables ⇒ PivotTable.

3. In the Create PivotTable popup, ensure that Excel auto-


matically selected the data table name, CH7 Data, or the
data range $A$1:$G$44, which is all the data on the
worksheet. Also, ensure New Worksheet is selected as
the location of the new pivot table.

4. Click OK.

5. A pivot table is created on a new worksheet. Rename


that worksheet Annual Pivot and move it to the right of
Sales Pivot.

6. Click Analyze ⇒ PivotTable ⇒ PivotTable Name and


enter Annual for the Pivot Table Name.

7. Check OrderDate in the Field List. By default, Excel places


that item in the pivot table Row Labels area since it con-
tains dates. Notice that Excel automatically expands the
dates into years and quarters.

8. Drag Total from the Field List to Values. The pivot table
now shows the total sales by date. Clicking the plus sign
beside the years and quarters in the pivot table drills
down to specific quarters and months of interest.

9. Drag Region from the Field List to Columns. This creates


columns for each region in the pivot table so now man-
agement can find sales by month and region.

Figure 283: Sales Units With Columns


364 working with data

10. To filter the data, click the down arrow to the right of the
Column Labels or Row Labels headers on the pivot table
(see Figure 284). Check only those regions or dates that
should be included in the pivot table. For example, click
the down arrow to the right of the Column Labels and
uncheck everything except East then click OK. Notice
how the pivot table is updated to include only the East
region. Also notice that the dropdown includes options
to sort the data in the pivot table.

Figure 284: Filtering Regions

11. All regions should be included for the rest of this exer-
cise, so click the down arrow to the right of the Column
Labels and check Select All then click OK.

12. While managers normally like having dates grouped by


month/quarter/year, that can be easily modified. Click
cell A5 in the pivot table so only that one cell is selected.
Click Analyze ⇒ Group ⇒ Group Field.
7.3 pivot tables 365

Figure 285: The Group Field Button

13. In the Grouping popup box, the start/end dates for the
data can be specified to limit the data shown in the pivot
table. For this exercise, leave the dates at their default
(two entire years), but click months so it is no longer high-
lighted then click OK. Figure 286 illustrates the Group-
ing popup box after the Months item is inactivated. This
will remove the Months drill down capability and only
show years and quarters in the pivot table. By using this
option, details can be removed from the pivot table so
trends may become more visible.

Figure 286: Removing Months From The Group

14. Drag Rep from the Field List to the Filters area. Notice
that the pivot table now has a selector in cell B1 so a spe-
cific representative (or group of representatives) can be
used to filter data on the pivot table. Click the down ar-
row for the Rep filter, select Andrews, and click OK. No-
366 working with data

tice that the pivot table is instantly updated to include


only Andrews’ sales data.

Figure 287: Filtering For One Representative

15. This pivot table will be used to create a pivot chart in the
next section; however, the filter is not needed. Uncheck
Rep in the Field List to remove that from the filter area.

16. Save the CH7-Sales Summary workbook.

Key Take-Aways

Pivot Tables

• Pivot tables are a very powerful analysis tool that are


easy to create and use.

7.4 recommended pivot tables

Learning Objectives

• Evaluate and select a recommended pivot table.

1. Open the Sales Summary workbook that was created in


section 7.2.3 if it is not already opened.

2. Click cell A1 in the Sales Data worksheet.


7.4 recommended pivot tables 367

3. Click Insert ⇒ Tables ⇒ Recommended PivotTables.

4. Excel will analyze the data and create several recom-


mended pivot tables. These can be clicked and pre-
viewed in the Recommended PivotTables popup. Figure
288 illustrates the Recommended PivotTables popup.

Figure 288: Recommended PivotTables

5. Click on the first recommended pivot table, Sum of To-


tal by Region, and click OK.

6. Excel creates the pivot table in a new worksheet. Name


that worksheet Sales By Region. Move Sales By Region
to the right of Annual Pivot.

7. Click Analyze ⇒ PivotTable ⇒ PivotTable Name and


enter By Region.

8. The new pivot table includes all the same features as


those created manually so formatting and variable ma-
nipulation is available to modify this table.

9. Save the CH7-Sales Summary workbook.


368 working with data

Key Take-Aways

Recommended Pivot Tables

• Excel automatically analyzes data in a worksheet and


recommends appropriate pivot tables for the data.
• If a recommended pivot table is selected, it can be
easily manipulated to meet the goals of the research
project.

7.5 pivot charts

Learning Objectives

• Create and format a pivot chart.

One of the strengths of creating a pivot table is that the table can
be used to create a chart and as the table is modified the chart is also
automatically modified. Follow these directions to explore the power
of pivot charts.

1. Open the Sales Summary workbook that was created in


section 7.2.3 if it is not already opened.

2. Open the Sales Data worksheet.

3. Activate cell A1 by clicking in it.

4. Click Insert ⇒ Charts ⇒ Pivot Chart.

Figure 289: The Pivot Chart Button

5. In the Create PivotChart popup, ensure that Excel au-


tomatically selected either the data table by name,
CH7 Data, or the data range, $A$1:$G$44, which is all
7.5 pivot charts 369

the data on the worksheet. Also, ensure New Worksheet


is selected as the location of the new pivot chart.

6. Click OK.

7. Excel will open a new pivot chart worksheet. This work-


sheet is like a pivot table worksheet and creating a chart
is like creating a table.

8. Rename the pivot chart worksheet to Sales By Item.

9. Move Sales By Item to the right of Sales By Region.

10. In the Field List, click the checkboxes for Rep and Total.
Excel creates a bar chart that shows the total sales for
each Representative, as illustrated in Figure 290.

Figure 290: Sales By Representative

11. Uncheck Rep and check Item.

12. The bar chart automatically updates to display the total


sales for each item in the inventory. This chart, though,
would be better if it were a pie chart.

13. Click the down arrow for the Sum of Total item in the
Values area of the pivot table.

14. Select Value Field Settings in the popup options menu.

15. Click the Show Values As tab in the Value Field Settings
popup box.

16. Choose % of Grand Total in the drop-down menu near


the middle of the Value Field Settings box.
370 working with data

Figure 291: Values As a Percentage Of The Total

17. Click OK.

18. The values in the pivot table change to percentages


rather than numbers.

19. Click Design ⇒ Type ⇒ Change Chart Type.

20. Select Pie Chart and click OK.

Figure 292: Selecting a Pie Chart


7.5 pivot charts 371

21. Click the + sign at the top right of the pie chart and then
click Data Labels to display the percent of each slice.

Figure 293: Adding Data Labels

22. Click off the chart so it is no longer selected and then


right-click on the chart title. Select Edit Text from the
popup menu.

Figure 294: Editing The Title

23. Enter Sales by Item as the chart title and then click off
the chart so it is no longer selected.

24. The chart colors and other chart elements can be


changed using options found at Design ⇒ Group ⇒
Button.

25. Save the CH7-Sales Summary workbook.


372 working with data

Key Take-Aways

Pivot Charts

• Creating a pivot chart uses the same process as a pivot


table.
• Once a pivot chart has been created, it can be modi-
fied using all the chart tools.

7.6 preparing to print

Learning Objectives

• Review each worksheet in a workbook in Print Pre-


view.
• Modify worksheets as needed to professionally print
data and charts.

Just like consistency in formatting is important when working with


workbooks containing multiple worksheets with pivot tables and charts,
so is consistency in page setup. The CH7-Sales Summary workbook
should be prepared for printing by modifying some of the settings
and adding a header and footer.

1. Open the CH7-Sales Summary workbook that was cre-


ated in section 7.2.3.

2. Click File ⇒ Print to enter the print preview. To view


all the worksheets at one time, select Print Entire Work-
book in the first box in the Settings section. There are 6
pages to scroll through in Print Preview.
• Page one is just the raw data. There is no point in
printing that worksheet so it should be hidden.
• Page five has part of a pivot chart, but it continues
onto another page.
• A header and footer should be added.

3. Exit Print Preview by clicking the arrow in the top left


corner of the page.

4. Right-click on the Sales Data worksheet tab and select


Hide. This hides the worksheet so it is not printed, but
the worksheet and data are all still available in the work-
book so the pivot tables will still be functional.
7.6 preparing to print 373

5. Activate the Sales By Item worksheet by clicking that


tab. Notice that part of the chart is printing on a second
page as indicated by a dotted line running down the
edge of column J.

6. Resize the chart using the following values. For each


side of the chart, press the Alt key while dragging the
resize handle on the chart.

Chart Side Locked To


Top Top of Row 9
Left Left of Column B
Bottom Bottom of Row 23
Right Right of Column G

7. Right-click the Sales Pivot worksheet and click Select


All Sheets to group all four worksheets.

8. Click Page Layout ⇒ Page Setup ⇒ Launcher.

9. Click the Header/Footer tab.

10. Click Custom Header....

11. Click in the right section to activate it and then click the
Insert Date button.

12. Click OK.

13. Click Custom Footer....

14. Click in the center section to activate it and then click


the Insert Sheet Name button.

15. Click OK.

16. Click OK to close the Page Setup dialog box.

17. Right-click the Sales Pivot worksheet and select Un-


group Sheets.

18. Click File ⇒ Print to enter the print preview. To view


all the worksheets at one time, select Print Entire Work-
book in the first box in the Settings section. There are
4 pages to scroll through in Print Preview. Confirm that
each worksheet is printing on one page with the date in
the header and the worksheet name in the footer.

19. Save the CH7-Sales Summary workbook.


374 working with data

20. Compare the workbook with the self-check answer key


(CH7-Sales Summary Solution) and then close and sub-
mit the CH7-Sales Summary workbook as directed by
the instructor.

Key Take-Aways

Preparing to Print

• Formatting for print is an essential part of creating a


workbook.

7.7 chapter practice

7.7.1 Project Team Analysis

1. Load the data.


a) Start Excel and open a new blank workbook.
b) Save the workbook as PR7-Project.
c) Excel 2016 Click Data ⇒ Get & Transform ⇒ New
Query ⇒ From File ⇒ From CSV
d) Click Data ⇒ Get & Transform Data ⇒
Excel 365
Get Data ⇒ From File ⇒ From Text/CSV
e) Navigate to PR7-Data.csv.
f) Click the file name and then Import.
g) When the import wizard opens, click Load.
h) Rename Sheet2 to Project Data.
i) Delete Sheet1.
j) Close the Workbook Queries panel.

2. Question 1: What type of project is the most fiscally pro-


ductive?
a) Activate cell A1 by clicking in the cell.
b) Click Insert ⇒ Tables ⇒ Recommended PivotTa-
bles.
c) Select the pivot table named Sum of Amount Billed
by Project Type and click OK.
d) Rename the pivot table to Billed and then rename
the worksheet to Billed.
7.7 chapter practice 375

e) Move the Billed worksheet to the right of the


Project Data worksheet.
f) Click the down arrow to the right of Sum of Amount
Billed in the Values area and select Value Field Set-
tings.
g) Change the Custom Name of this field to Total
Billed.
h) Click OK.
i) Right-click in cell B2 to activate it.
j) In the popup menu, select Sort ⇒ Sort Largest to
Smallest. This sorts the total billed from the largest
to smallest amount.
k) Save the PR7-Project workbook.

3. Question 2: Which client spends the most?


a) Click in cell A1 in the Project Data worksheet to
activate it.
b) Click Insert ⇒ Tables ⇒ PivotTable.
c) Create a pivot table on a new worksheet.
d) Name the pivot table and worksheet Clients.
e) Move the Clients worksheet to the right of the
Billed worksheet.
f) Drag Client from the Field List to the Rows area.
g) Drag Amount Billed from the Field List to the Values
area.
h) Change the name of the values header from Sum of
Amount Billed to Total Billed.
i) Sort the Total Billed column so the largest number is
at the top.
j) Save the PR7-Project workbook.

4. Question 3: Which quarter was the most profitable?


a) Click in cell A1 in the Project Data worksheet to
activate it.
b) Click Insert ⇒ Tables ⇒ PivotTable.
c) Create a pivot table on a new worksheet.
d) Name the pivot table and worksheet Quarterly.
e) Move the Quarterly worksheet to the right of the
Clients worksheet.
376 working with data

f) Drag Date Completed from the Field List to the Rows


area.
g) Drag Amount Billed from the Field List to the Values
area.
h) Change the name of the values header from Sum of
Amount Billed to Total Billed.
i) Click the plus buttons beside 2016 and 2017 to view
the amount billed by quarter.
j) Save the PR7-Project workbook.

5. Question 4: Which team completed the largest propor-


tion of the projects?
a) Click in cell A1 in the Project Data worksheet to
activate it.
b) Click Insert ⇒ Charts ⇒ PivotChart.
c) Create a pivot chart on a new worksheet.
d) Name the pivot chart and worksheet Teams.
e) Move the Teams worksheet to the right of the Quar-
terly worksheet.
f) Drag Team Leader from the Field List to the Axis (Cat-
egories) area.
g) Drag Hours Spent from the Field List to the Values
area.
h) Change the name of the values header from Sum of
Hours Spent to Total Hours.
i) Sort the Total Hours column so the largest number
is at the top.
j) Change the title of the chart to Total Hours Spent.
k) Since there is only one data point, the legend is not
needed, so remove it. Click the + sign near the top
right corner of the chart and uncheck the Legend
item.

6. Save the PR7-Project workbook.

7. Compare the workbook with the self-check answer key


(PR7-Project Solution) and then close and submit the
PR7-Project workbook as directed by the instructor.
7.8 scored assessment 377

7.8 scored assessment

7.8.1 Employee Analysis

1. Load the data.


a) Start Excel and open a new blank workbook.
b) Save the workbook as SC7-Employees.
c) Excel 2016 Click Data ⇒ Get & Transform ⇒ New
Query ⇒ From File ⇒ From CSV
d) Click Data ⇒ Get & Transform Data ⇒
Excel 365
Get Data ⇒ From File ⇒ From Text/CSV
e) Navigate to SC7-Data.csv.
f) Click the file name and then Import.
g) When the import wizard opens, click Load.
h) Rename Sheet2 to Employee Data.
i) Delete the Sheet1 worksheet.
j) Close the Workbook Queries panel.

2. Question 1: What is the average salary for each role?


a) Create a pivot table that lists the roles in the busi-
ness (Accounting, Associate, etc.), the number of
people in each role, and the average salary for that
role. Hint: the Role field should be dragged to both
the Rows area and the Values area.
b) The pivot table and worksheet should be named
Avr Salary and that worksheet should be to the
right of the Employee Data worksheet.
c) The Salary field should be changed from sum to
average and renamed Avr Salary. It should also be
formatted as currency with two decimal places.
d) Count of role in the values field should be renamed
Count.
e) Sort the list so the highest salary is first.
f) Save the SC7-Employees workbook.
g) Figure 295 illustrates how the pivot table should
look.
378 working with data

Figure 295: Average Salary By Role

3. Question 2: What is the average age of the employees


when broken down by sex and marital status?
a) Create a pivot table that lists the average age by
marital status and sex for all employees.
b) The pivot table and worksheet should be named
Avr Age and that worksheet should be to the right
of the Avr Salary worksheet.
c) The average age should be formatted as a number
with zero decimal places.
d) Save the SC7-Employees workbook.
e) Figure 296 illustrates how the pivot table should
look.
7.8 scored assessment 379

Figure 296: Average Age

4. Question 3: How many employees have been hired each


year from 2007?
a) Create a pivot table that lists the employee count
by year. (Hint: count the username field since each
employee has a unique username.)
b) The pivot table and worksheet should be named
Year Hired and that worksheet should be to the
right of the Avr Age worksheet.
c) The username field should be labeled count.
d) The hired field should display only years, not quar-
ters or months.
e) The list should be sorted by year (which is the de-
fault).
f) Save the SC7-Employees workbook.
g) Figure 297 illustrates how the pivot table should
look.
380 working with data

Figure 297: Number Hired By Year

5. Question 4: How many employees work in each role?


a) Create a pivot chart (note, this is a chart, not a ta-
ble) that shows the count by role. (Hint: count the
username field since each employee has a unique
username.)
b) The pivot chart and worksheet should be named
Count By Role and that worksheet should be to
the right of the Year Hired worksheet.
c) The username field should be labeled Number.
d) The data should be sorted such that the role with
the most employees (“Associate”) should be first.
e) The chart’s title should be Count by Role
f) The chart should not have a legend.
g) Save the SC7-Employees workbook.
h) Figure 298 illustrates how the pivot chart should
look.
7.8 scored assessment 381

Figure 298: Count By Role

6. Prior to submitting this workbook, use the Print Preview


to make sure the worksheets are printing properly.
a) Hide the Employee Data worksheet.
b) On the Count by Role worksheet, the pivot chart
needs to be moved under the pivot table.
c) Add a footer to each sheet that displays the sheet
name in the center section of the footer.

7. Save and close the SC7-Employees workbook.

8. Submit the SC7-Employees workbook as directed by the


instructor.
FORECASTING
8
One of the most powerful features of Excel is the ability to analyze
data and create charts with trend lines that would help businesspeo-
ple forecast future conditions. Excel also contains several tools de-
signed for “what-if” analysis where businesspeople can project the re-
sults of changing market variables or corporate decisions. This chap-
ter introduces all these features.

8.1 advanced charts

Learning Objectives

• Sparklines graphically represent data trends in a sin-


gle cell.
• Trendlines simplify graphs to display a single trend
line.
• Forecast Worksheets create a trendline but include
confidence levels and forecast trends into the future.
• 3D Maps produce maps that join geography- and
time-based data.

8.1.1 Sparklines

Sparklines are tiny graphs that visually represent data in a single


worksheet cell. These are powerful ways to help managers quickly
“see” the data.

1. Open workbook CH8-Sparkline Data.

2. Save the workbook as CH8-Sparkline.

3. Open the Precipitation worksheet. This worksheet con-


tains the average monthly precipitation for ten United
States citiesa .

4. Click cell N4 to activate that location.

5. Click Insert ⇒ Sparklines ⇒ Line.

383
384 forecasting

Figure 299: The Sparklines Button

6. For the Data Range, enter B4:M4.

7. For the Location Range, enter $N$4.

8. Click OK.
a The climate data was found at https://www.usclimatedata.com/climate/un
ited-states/us

Figure 300: The Sparklines Diaglog Box

Excel creates a tiny line graph that shows the monthly precipitation
for the entire year.

Figure 301: One Sparkline


8.1 advanced charts 385

1. Copy/paste cell N4 to N5:N13. The fill handle will make


this easier.

Figure 302: All Sparklines In Place

Now Excel displays a sparkline for each of the cities. While it is not
possible to see the details for any specific month and city, it is easy
to spot trends. For example, Portland OR has less precipitation in the
late summer while Chicago IL seems to start out slow in January and
then grow through the spring and early summer. A business manager
could use a sparkline to easily detect trends in data.

1. Select N4:N13 and notice the Sparkline Design tab in-


cludes several options to modify the appearance of the
sparkline.

2. Click Sparkline Design ⇒ Type ⇒ Column.


386 forecasting

Figure 303: Column Sparklines

The sparklines change into column graphs. The information does


not change, but it may be easier to spot trends with one type of graph
or the other, so it is a best practice to try both.

1. Open the Temperature worksheet in the CH8-Sparkline


workbook. This worksheet contains the average low tem-
perature for five Alaskan citiesa .

2. Click cell N4 to activate that location.

3. Click Insert ⇒ Sparklines ⇒ Win/Loss.

4. For the Data Range, enter B4:M4.

5. For the Location Range, enter $N$4.

6. Click OK.

7. Copy N4 to N5:N8.
a The climate data is from https://www.usclimatedata.com/climate/united-
states/us
8.1 advanced charts 387

Figure 304: Win/Loss Sparkline

Excel creates a bar graph that shows positive values in blue and
negative values in red. This does not show the magnitude of each
value, but only whether it is positive or negative in nature. This type
of sparkline is useful for quickly determining things like if a stock
price is increasing or decreasing.

1. Save the CH8-Sparkline workbook.

2. Compare the workbook with the self-check answer key


(CH8-Sparkline Solution) and then close and submit the
CH8-Sparkline workbook as directed by the instructor.

8.1.2 Trend Lines

Excel can easily create trend lines on graphs to indicate data trends.
These lines can optionally be extended to forecast how the data may
soon move.

1. Open workbook CH8-Dow Data. This workbook con-


tains the closing Dow Jones average for each month from
1981–1990.

2. Save the workbook as CH8-Dow.

3. Click cell A1 to activate that location.

4. Click Insert ⇒ Charts ⇒ Recommended Charts.

5. Select the line chart (it is the second selection).

6. Click OK.

7. Click in the chart area to activate it.


388 forecasting

8. Click Chart Design ⇒ Chart Layouts ⇒ Add Chart Ele-


ment ⇒ Trendline ⇒ Exponential. Note: it is reasonable
to click on each of the types of trendlines to see which
seems to fit the data best.

Figure 305: Adding A Trendline

9. Excel draws a dotted trendline that shows the growth of


the Dow over the ten-year period.

Figure 306: Trendline Added to Graph

10. Double-click the dotted trendline to activate it and open


the Format Trendline properties panel.
8.1 advanced charts 389

11. Enter 10 for the Forward Forecast period to extend the


trendline out five years (ten six-month periods).

Figure 307: Extending The Trendline for 10 Periods

12. Excel forecasts a generally upward trend for the five-


year period.

Figure 308: Trendline With Forecast

8.1.3 Forecast Worksheet

The trend lines described above are easy to add to a chart, but Excel
includes a tool called Forecast Worksheet that creates a forecast along
with confidence levels.

1. Click cell A1 to activate that location.

2. Click Data ⇒ Forecasts ⇒ Forecast Sheet.


390 forecasting

Figure 309: The Forecast Sheet Button

3. The Create Forecast Worksheet wizard opens with a pre-


view of the worksheet (see Figure 311). There are numer-
ous options available, but the default options are appro-
priate for this exercise. Here are what the other options
do.
• Forecast End. Set an end date for the forecast,
which are the orange lines in the illustration.
• Forecast Start. Set the start date for the forecast.
• Confidence interval. This is a statistical value that
indicates a 95% certainty that as time progresses the
graph will fall between the upper and lower limits
shown. The confidence interval can be adjusted, but
95% is common.
• Seasonality. Excel will search for any sort of sea-
sonal cycles and adjust the forecast accordingly.
• Timeline and Values Range. This is the data that
was used to create the graph. If Excel got the wrong
data ranges, then they can be adjusted here.
• Fill Missing Points Using. This tells Excel how to
deal with data points that are missing. It will either
fill those missing values with zero or interpolate a
value between the two neighboring values. Interpo-
lation is usually the best option.
8.1 advanced charts 391

• Aggregate Duplicates Using. There are several op-


tions available for aggregating duplicates in the
data, but Average is usually the best option.

4. Click Create.

Figure 310: Dow Forecast

5. Excel creates a new worksheet containing the chart along


with a table listing all the values used to create the chart.

6. Rename Sheet1 to Forecast.

7. Scroll to the bottom of the table to see the values Excel


forecast to extend the graph. Those values can be used
to forecast the Dow Jones for a specific date; so, the Dow
was forecast to be at 2389.37 in January 1991.

8. Save the CH8-Dow workbook.

9. Compare the workbook with the self-check answer key


(CH8-Dow Solution) and then close and submit the CH8-
Dow workbook as directed by the instructor.
392 forecasting

Following is a second example of a forecast worksheet that uses


beer production data because it shows a clear seasonal trend over
time.

1. Open workbook CH8-Beer Data. This workbook con-


tains the total monthly United States beer production, in
barrels, for January 1980, until December 1991.

2. Save the workbook as CH8-Beer.

3. Click in A1 to select that location.

4. Click Data ⇒ Forecast ⇒ Forecast Sheet.

5. Accept the default options and click Create.

6. The graph clearly shows the cyclic nature of beer pro-


duction and forecasts a similar cycle out to December
1994.

7. Rename Sheet1 to Forecast.

8. Save the CH8-Beer workbook.

9. Compare the workbook with the self-check answer key


(CH8-Beer Solution) and then close and submit the
CH8-Beer workbook as directed by the instructor.

Figure 311: Beer Production Forecast

A forecast sheet is a simple method business owners use to predict


business cycles like customer demand so owners can manage inven-
tory, hire help, or take other actions.
8.1 advanced charts 393

8.1.4 3D Maps

Excel includes a feature called 3D Maps that merge geographically


oriented maps with a timeline so business owners can look for trends
over time in various geographical areas they service. As an example,
if a company markets to an entire state then the owner can create a
3D Map that shows sales by county over the preceding five years, and
that may make important trends obvious.
3D Maps combines map and timeline data in a feature called Tours.
The process can be somewhat intimidating at first but becomes easier
with practice.

8.1.4.1 Arizona Population Growth

1. Open workbook CH8-Map Data. This workbook con-


tains two worksheets.
• AZ Population. This worksheet lists the popula-
tion for all Arizona counties from 1969 until 2018,
by year.a Note: La Paz County was separated from
Yuma County on January 1, 1983 so the Yuma data
contains counts of people who lived in what be-
came La Paz County through 1982 and excludes it
beginning with 1983.
• GDP. This worksheet contains the real Gross Domes-
tic Product (in millions of dollars) for each of the
fifty states, and Washington D.C., from 2010 until
2015, by economic sector.b The table also includes
a Quantity Index for each year which indicates the
percent change in each value when compared to the
base year, 2009.

2. Save the workbook as CH8-Maps.

3. In the AZ Population worksheet, click cell A1 to activate


that location.

4. Click Insert ⇒ Tours ⇒ 3D Map.


a This data was found at the United States Bureau of Economic Analy-
sis, https://apps.bea.gov/iTable/iTable.cfm?reqid=70&step=1&isuri=1&
acrdn=7#reqid=70&step=1&isuri=1&acrdn=7
b The GDP information was found at http://proximityone.com/gdpbyindust
ry.htm.
394 forecasting

Information
Enable 3D Maps

The first time 3D Maps is started, Excel pops up the


warning illustrated in Figure 312. The module only needs
to be enabled one time, so click Enable.

Figure 312: Enable 3D Maps

1. The 3D Maps editor box, Figure 313, looks complex. Here


is an explanation of each of the four main areas.

Figure 313: 3D Map Editor

• Ribbon. The 3D Map ribbon (Figure 314) serves


the same function as in any Microsoft program. It
contains buttons to activate the most used map-
ping functions. The various buttons will be used
throughout this lesson and their functions will be-
come clear through use.
8.1 advanced charts 395

Figure 314: 3D Map Ribbon

• Tour Editor. Each 3D Map is divided into scenes


that are contained in a Tour. The Tour Editor, on the
left side of the screen, (Figure 315) is where settings
like the length of time for each scene is defined.

Figure 315: 3D Map Tour Editor

• Field List. The various fields (columns) in the orig-


inal dataset are listed here (Figure 316) so they can
be used on the map. This is a pop-up dialog box
and can be moved as desired.

Figure 316: 3D Map Field List

• Layer Pane. 3D Maps are composed of multiple lay-


ers and this pane is where settings for each of the
layers are specified.
396 forecasting

Figure 317: 3D Map Layer Pane

2. The Layers Pane is where most of the work is done for a


3D Map. It is divided into three main sections.
• Data. This section is where the data used in the
map is manipulated. Figure 318 illustrates the set-
tings found in the data section.
– Type of Visualization. At the top of the pane
are five buttons that change the map display
setting to a stacked column, clustered column,
bubble, heat map, and region. Changing the vi-
sualization is as easy as clicking one of the but-
tons, so they should all be applied to see which
gives the best representation of the data.
– Location. This setting divides the map into ge-
ographical locations. Maps can use data for
country, state, county, city, and many other re-
gional types. For example, a sales map may
show sales by state or sales by city.
– Height. This setting determines the height of
the data column on a graph. The data needs to
be numeric so it can be converted into a column
height.
– Category. This setting contains categories for
the values graphed by height. For example, a
8.1 advanced charts 397

sales map may include categories for electron-


ics, clothing, or other merchandise.
– Time. This setting contains the time value be-
ing graphed. 3D Maps can be created to display
a period, like the value of monthly or weekly
sales, but maps can also be created that do not
have a time component.
• Filters. This section permits the creation and appli-
cation of complex filters for the data being charted.
• Layer Options. This section is where various op-
tions, like color, are set for the displayed data.

Figure 318: Layers Pane

3. By default, Excel detects the data field that contains geo-


graphical information and automatically adds that field
to the Location setting. For AZ Population, county names
are the geographical information and that field is added
to the Location setting. As soon as the county names are
added, a stacked column is placed in each county on the
map. Since there is no Height data available yet, those
columns are only flat squares on the map.
398 forecasting

4. Click and drag Population in the Field List to the Height


setting. Excel immediately applies the sum of the pop-
ulation values to the counties and the columns react ac-
cordingly (see Figure 319). Notice the middle column,
for Maricopa county, is quite long while the other coun-
ties are shorter. Also, Excel creates a legend box to show
that the blue columns are the population.

Figure 319: Population Added to Height

5. By default, Population will display the sum of population


over time. For example, if Cochise County had 40, 000
people one year and 50, 000 the next, Excel will display
90, 000 as the county population. Instead of summing
the population over the years, it is more appropriate to
display only the current year. Click the drop-down ar-
row for Population, select No Aggregation. After chang-
ing the aggregation, the columns change to an orange
color.

6. Click the triangle beside Layer Options to open that set-


ting.

7. Set the Thickness for the column to 200%.

8. Click the color drop-down for Population (No Aggrega-


tion) and choose blue.
8.1 advanced charts 399

9. Click and drag Year in the Field List to the Time setting.
Not much changes, but a timeline bar is added to the
bottom of the map. The small triangle marker under the
timeline can be moved left and right to display the pop-
ulation for any desired point of time.
10. Click the down arrow to the right of Year in the Time
setting and select Year in the drop-down list.
11. Click Play Tour at the left edge of the ribbon. Excel will
“play” the entire timeline in ten seconds (that timing can
be changed). When the video is finished playing, click
the left-arrow button in the lower left corner of the video
screen to return to the map editor.
12. Click the Pencil icon to edit Layer 1 in the Layers Pane
and change the name of the layer to Population.
13. Click Add Layer at the top of the Layer Pane. Excel adds
a new layer under the Population layer.
14. Rename Layer 2 to Counties.
15. By default, Excel places the County data field in Location.
Leave this in place.
16. Click and drag County from the Field List to Category.
The County data field is now in two settings, Location
and Category. Excel now treats each county as a separate
category and colors the columns different colors for each
county.
17. Click Region on the visualization bar (it is the last op-
tion). The Region button is outlined in red in Figure 320.
The counties are now colored so they are easy to see.

Figure 320: County Areas Colored

18. The county colors are a bit bright, so click the triangle
beside Layer Options to open that setting.
400 forecasting

19. Move the Opacity slider to about 50%. That will dim the
county colors while leaving the population columns the
same.

20. Notice that each county’s color can be set using the color
dropdown, so it would be easy to highlight a county in
some bright color like red while using duller colors for
the other counties.

21. Click the Play Tour button to see what the tour looks
like with the county colors.

22. Click the Population layer to activate it again.

23. Click through each of the five types of visualizations and


play the tour using each visualization to see which type
works best for this data. For this tutorial, leave the visu-
alization on Heat Map.

At this point, this tour is nearly done. However, there are just a few
settings that can be tweaked a bit.

1. Click Tour 1 at the top of the Tour Editor and enter Popu-
lation.

2. Excel’s 3D Map is drawn on a globe so data for countries


around the world can be displayed. It is better for this
map to be displayed flat rather than on a globe. Click
Flat Map in the ribbon to convert the map from a globe
to a flat map. The map can always be reverted to a globe
if desired.

3. Having the time displayed on the tour is distracting, so


format the displayed date to only show the year. Right-
click the date displayed on the screen and select Edit. In
the edit box, choose the Time Format that only shows the
year without the month and day, then click Accept.

4. The legend is not needed for this map, so click that box
and delete it. Note: both layers create a legend, and both
should be deleted. Either legend can be turned back on
if desired by clicking the Legend button on the ribbon.

5. Click and drag the map to center Arizona in the display.


Also, experiment with the four arrow and plus/minus
buttons to adjust the display.
8.1 advanced charts 401

6. Click the Scene Options button on the ribbon. Change


the name of the scene to Population. The defaults for
the other options are appropriate for this tour but could
be adjusted for other tours.

7. Close the Scene Options dialog box.

8. Click Themes to explore the themes available for tours.


The first theme, which is default, is appropriate for this
tour, but it is easy to apply other themes.

9. Click Map Labels to turn on the labels. While only


the largest cities are named, the labels help to identify
Phoenix and Tucson.

10. Click Tour Editor, Layer Pane, and Field List to turn off
those dialog boxes. These can always be turned back on
if desired.

11. Figure 321 illustrates the final Population Map.

Figure 321: Final Population Map

There are only two other buttons on the ribbon that have not been
described.

1. Create Video. This will create a video of the tour that


would be suitable to play online (YouTube) or on a desk-
top.
402 forecasting

2. Capture Screen. This button copies the screen to the clip-


board so it can later be pasted in a PowerPoint slide or
other report.

3. To save the map, click File ⇒ Close. The map is saved as


part of the workbook and will be available the next time
the workbook is opened.

Excel also adds a text box to the active worksheet to let users know
that there are 3D Map tours available in the workbook (see Figure
322).

Figure 322: 3D Maps Are Available

8.1.4.2 Gross Domestic Product

As a second example of a 3D Map, the states’ Gross Domestic Product


(GDP) for several different sectors will be mapped.

1. Open the GDP worksheet in CH8-Maps.

2. Click in A1 to activate that cell.

3. Click Insert ⇒ Tours ⇒ 3D Map.

4. The Population tour is listed and could be edited but click


New Tour to map the GDP data.

5. If necessary, activate the Tour Editor, Layer Pane, and Field


List by clicking those buttons in the ribbon.

6. If Excel did not automatically place the State data field


in the Location setting, then click and drag State in the
GDP Field List to the Location setting.

7. Click the down arrow to the right of State in the Location


setting and select State/Province in the drop-down list.

8. Click and drag GDP2015 in the GDP Field List to the


Height setting.

9. Click the down-arrow to the right of GDP2015 (Sum) and


select Maximum.
8.1 advanced charts 403

10. Click and drag Sector in the GDP Field List to the Cate-
gory setting.

11. Click the pencil icon beside Layer 1 and change the name
of this layer to GDP 2015.

12. Change the visualization type to Clustered Column (the


second selection).

13. Excel displays all 15 sectors for each state, but that is too
many to be useful. Click the triangle arrow beside Filters
to open that setting then click Add Filter.

14. Select Sector from the filters list.

15. In the Sector filter, check Agriculture, forestry, fishing,


and hunting; Construction; Manufacturing; and Mining.

16. Click Flat Map and then adjust the map to fit on the
screen. Remember that Alaska and Hawaii need to be
visible on the map. Also, experiment with the four arrow
and plus/minus buttons to adjust the display to get the
best view of the columns.

17. Move and resize the legend so it displays all four sec-
tors without a lot of wasted space and it does not cover
Hawaii.

18. The colors used for the four sectors are difficult to differ-
entiate. Click the triangle arrow beside Layer Options to
open that setting. In the Color section, select each of the
sectors and choose a color that makes it easy to differen-
tiate from other sectors.

19. Also, in the Layer Options, adjust the thickness of the


columns to about 200%.

20. Click Tour 1 at the top of the Tour Editor. Enter GDP as
the name of the tour.

21. Click the Scene Options button on the ribbon. Change


the name of the scene to Industry. In the Effects section,
select a transition of 3 seconds, Fly Over as the effect, and
adjust the Effect Distance slider to about 75% to the right.

22. Close the Scene Options dialog box.


404 forecasting

23. Click Text Box to add a text box to the tour. For Title,
enter Industry. For Description, enter GDP for four in-
dustrial sectors: Agriculture, Construction, Manufactur-
ing, and Mining. Select white as the background color
for the text box.

24. Click Create to create the text box and close the dialog.

25. Position and resize the text box over Canada so it does
not cover data displayed for the United States.

26. Click Map Labels to turn on the labels.

27. Figure 323 illustrates the final Industry Map.

Figure 323: Industry 3D Map

28. Play the tour to see what it looks like. The map size and
orientation (using the arrow buttons on the map), along
with the locations for the legend and text box can be
adjusted for the best possible display.

29. Add a second scene for this tour. Click the New Scene
drop-down arrow and select Copy Industry. Excel will
create a copy of the Industry scene so only a few changes
need to be made to continue the tour.
8.1 advanced charts 405

30. Click the Scene Options button on the ribbon. Change


the name of the scene to Service and the Effect to Circle.
Close the Scene Options dialog.

31. While the Service scene is active, open the Filters setting
and uncheck everything, then check Education services,
health care, and social assistance; Finance, insurance,
real estate, rental, and leasing; Information; and Other
services, except government.

32. Click the triangle arrow beside Layer Options to open


that setting. In the Color section, select each of the sectors
and choose a color that makes it easy to differentiate
from other sectors.

33. Double-click the text box and change the title to Service
and the description to GDP for four service sectors: Ed-
ucation, Finance, Information, and Other.

34. Click OK.

35. Add a final scene for this tour. Click the New Scene
drop-down arrow and select Copy Service. Excel will
create a copy of the Service scene so only a few changes
need to be made to continue the tour.

36. Click the Scene Options button on the ribbon. Change


the name of the scene to Retail and the Effect to Push In.
Close the Scene Options dialog box.

37. While the Retail scene is active, open the Filters setting
and uncheck everything, then check Professional and
business services; Retail trade; and Transportation and
warehousing.

38. Click the triangle arrow beside Layer Options to open


that setting. In the Color section, select each of the sectors
and choose a color that makes it easy to differentiate
from other sectors.

39. Double-click the text box and change the title to Retail
and the description to GDP for three retail sectors: Pro-
fessional Services, Retail Trade, and Transportation and
Warehousing.

40. Click OK.

41. Click Tour Editor, Layer Pane, and Field List to turn off
those dialog boxes. These can always be turned back on
if desired.
406 forecasting

42. Play the tour to see the completed 3D Maps Tour.

43. To save the map, click File ⇒ Close. The map is saved as
part of the workbook and will be available the next time
the workbook is opened.

44. Save the CH8-Maps workbook.

45. Compare the workbook with the self-check answer key


(CH8-Maps Solution) and then close and submit the
CH8-Maps workbook as directed by the instructor.

The two maps created in this lesson are simple but demonstrate the
two most powerful 3D Maps concepts: 1) Using a timeline to focus
on a change in data over a defined term, and 2) building a tour by
combining two or more scenes. Excel’s 3D Map is a powerful decision-
support tool and any time spent mastering it is worthwhile.

Key Take-Aways

Advanced Charts

• Sparklines graphically represent data trends in a sin-


gle cell. These are quick and easy to add to a work-
sheet and provide managers readily available impor-
tant information.
• Trend lines simplify graphs by displaying a single
trend line to summarize the general direction of the
data. There are several different trend lines available
in Excel and those lines can be modified to enhance
their appearance.
• Forecast Worksheets create a trend line that includes
confidence levels. These worksheets are also more ro-
bust than simple trend lines and can analyze cyclic or
seasonal data.
• 3D Maps are powerful visual representations of both
geographic and time dimensions to enhance decision-
making.
8.2 what-if analysis 407

8.2 what-if analysis

Learning Objectives

• Data tables permit numeric analysis of the result of


changing inputs.
• Scenarios create various sets of inputs to compare the
resulting output.
• Goal seeking finds an optimum input to achieve a spe-
cific goal.
• The Solver performs complex analysis of a scenario
and adjusts various parameters for an optimum out-
come.

8.2.1 Data Tables

Data tables display a range of results for a formula or function as one


or two input variables are automatically cycled through a list. Man-
agers can quickly compare potential options to determine a course of
action.

8.2.1.1 One-Variable Data Table

As an example of a one-variable data table, imagine that the owner of


a small theater wants to predict revenue for the upcoming season. If
the revenue from a single ticket sale can be calculated, then that can
be put into a formula so revenue projections can be derived.

1. Open a new blank workbook.

2. Save the workbook as CH8-Data Table.

3. Rename Sheet1 to Revenue.

4. Enter the following labels (see Figure 324).


• In cell A1 enter Ticket Sales Last Season.
• In cell A2 enter Revenue Per Ticket.
• In cell A3 enter Revenue Last Season.
• In cell A4 enter Projected Growth.
• In cell A5 enter Revenue This Season.

5. Adjust the width of Column A so the labels fit in the


column.
408 forecasting

6. Name cells B1:B5. Do this by clicking each cell then click


Formulas ⇒ Defined Names ⇒ Define Name. Use the
default names Excel suggests.
• Cell B1: Ticket Sales Last Season
• Cell B2: Revenue Per Ticket
• Cell B3: Revenue Last Season
• Cell B4: Growth
• Cell B5: Revenue This Season

7. Enter the following values in Column B.


• In cell B1 enter 20000. This is the number of tickets
sold last season and will serve as a start point for
this season’s projection.
• In cell B2 enter 8. This is the average revenue, $8.00,
that a single ticket generates.
• In cell B3 enter =Ticket Sales Last Season * Rev-
enue Per Ticket . This is the total revenue from last
season.
• In cell B4, enter 0. For this analysis, the first as-
sumption is that there is zero growth in ticket sales
over last season. This provides a baseline for the
other analysis.
• In cell B5, enter =Ticket Sales Last Season
* Revenue Per Ticket + (Projected Growth *
Ticket Sales Last Season)

8. Format the following cells.


• Cell B1: Comma
• Cell B2: Accounting
• Cell B3: Comma
• Cell B4: Percent
• Cell B5: Comma

Figure 324: The Data Table Parameters


8.2 what-if analysis 409

9. Next, set up the data table area.


• In cell D2, enter Projection. Bold that cell.
• In cell D3, enter Growth.
• In cell E3, enter Revenue.
• Leave cell D4 blank.
• In cells D5:D14, enter 0.005, 0.01, 0.015, 0.02, 0.025,
0.03, 0.035, 0.04, 0.045 and 0.05. Note: autofill will
help with this task.
• Format Column D as percent’s and increase the dec-
imal places to two. When done, cell D5 should read
0.50%.
• In cell E4, enter =Revenue This Season. This will
“seed” the revenue formula used in cell B5 into the
data table.

10. Select D4:E14 to contain the data table.

11. Click Data ⇒ Forecast ⇒ What-If Analysis ⇒ Data


Table.

12. Leave the Row input cell box empty since this data table
only calculates data in a column. In the Column input cell
box, enter Projected Growth, which is the name for cell
B4, the projected growth rate. Figure 325 illustrates the
completed Data Table dialog box.

Figure 325: Setting Up the Data Table

13. Click OK.

14. Format Column E as Comma format.


410 forecasting

15. Save the CH8-Data Table workbook.

Figure 326: One-Variable Data Table

The data table displays the projected revenue for each of the growth
rates in Column D. This analysis assumes that the number of tickets
sold will increase. However, it is possible that ticket sales will de-
crease. Change the values in cells D5:D14 so some are negative and
notice that the projected revenue automatically updates to display
losses.

Figure 327: One-Variable Data Table With Negative Values


8.2 what-if analysis 411

8.2.1.2 Two-Variable Data Table

A mortgage is one of the most common loans. A mortgage for a home


is a huge investment and borrowers must think carefully about the
size of the monthly payment compared to their disposable income. A
two-variable data table is helpful in this type of decision.1
Mortgages are commonly written for 10- to 30-year terms and the
interest rate can vary widely, depending on many factors. For this
example, assume the interest rate is between 5% and 8.5%.

1. Open a new worksheet in the CH8-Data Table work-


book.

2. Name the worksheet Mortgage.

3. Enter the following labels.


• In cell A1 enter Loan Amount.
• In cell A2 enter Term in Years.
• In cell A3 enter Interest Rate.
• In cell A4 enter Payment.

4. Adjust the width of Column A so the labels fit in the


column.

5. Name cells B1:B4. Do this by clicking each cell then click


Formulas ⇒ Defined Names ⇒ Define Name. Use the
default names Excel suggests.
• Cell B1: Loan Amount
• Cell B2: Term In Years
• Cell B3: Interest Rate
• Cell B4: Payment

6. To start the data table, enter these values in Column B.


• In cell B1 enter 100000. This is the amount being
borrowed.
• In cell B2 enter 10. This is the number of years to
pay off the loan.
• In cell B3 enter 0.05. This is the interest rate being
charged for the loan. Note: the data table may be
easier to read if cell B3 is formatted as percent rather
than general. If the format is changed, be certain
that it reads 5%.

1 See Chapter 2, mathematical computations, page 75 for more information


about computing loans like mortgages.
412 forecasting

• In cell B4, enter =PMT(Interest Rate/12,Term in Years*12,Loan Amount).


Given the information in B1:B3, Excel calculates a
payment of $1, 060.66 per month. This is a negative
amount since the payment is going out of the
borrower’s savings.

7. Next, set up the data table area.

8. In cell D4, enter =Payment. This will “seed” the PMT


formula into the data table.

9. In cells D5:D12, enter 0.05, 0.055, 0.06, 0.065, 0.07, 0.075,


0.08, and 0.085.

10. Format D5:D12 as percent with two decimal places.

11. In cells E4:I4, enter 10, 15, 20, 25, and 30.

12. Select D4:I12 to contain the data table.

13. Click Data ⇒ Forecast ⇒ What-If Analysis ⇒ Data


Table.

14. In the Row input cell box, enter the reference for the data
found in Row 4. In the example, Row 4 contains the loan
term, and that is found in cell $B$2. Note: this must be
an absolute reference (with the dollar signs) or the data
table function will fail.

15. In the Column input cell box, enter the reference for the
data found in Column D. In the example, Column D con-
tains the interest rate, and that is found in cell $B$3.
Note: this must be an absolute reference (with the dollar
signs) or the data table function will fail.

Figure 328: Setting Up The Two-Variable Data Table

16. Click OK.


8.2 what-if analysis 413

The data table displays the payment due for each combination of
interest rate and loan term. Borrowers could then use this information
to negotiate a rate and term that fits their budget. Note: the payments
are negative since they represent money leaving the borrower’s bank
account.

Figure 329: Completed Two-Variable Data Table

1. Save the CH8-Data Table workbook.

2. Compare the workbook with the self-check answer key


(CH8-Data Table Solution) and then close and submit
the CH8-Data Table workbook as directed by the in-
structor.

8.2.2 Scenarios

Users may have data in a worksheet and want to change some of the
variables to see the effect. For example, a business owner may want
to consider “best case” and “worst case” values and then compare
the results. This type of analysis is called a scenario in Excel.

1. Open workbook CH8-Scenario.

2. Save the workbook as CH8-Williams Budget.

This workbook is a simple household budget for the Williams fam-


ily. There are two working adults, Morgan and Phoenix. They are
planning for several potential changes in their budget, including tak-
ing a “once-in-a-lifetime” vacation, starting college classes, and pur-
chasing a new home. To help them decide on their best course of
action, they are going to develop scenarios.
414 forecasting

1. Click Data ⇒ Forecast ⇒ What-If Analysis ⇒ Scenario


Manager.

2. Click Add in the Scenario Manager box.

Figure 330: The Scenario Manager Dialog

3. Enter these values in the Add Scenario box.


• Scenario name: Current. The first scenario will be
the current budget and will work as a baseline for
the other scenarios.
• Changing Cells: $B$4,$B$5,$B$9:$B$20. These are
the cells that the user can change for each scenario.
• Comment: Baseline Budget. This is a brief descrip-
tion of the purpose for this scenario.
• Prevent Changes: Checked. This prevents the user
from making changes to the Changing Cells other
than with the scenario manager.
• Hide: Unchecked. This hides all the changing cells.
8.2 what-if analysis 415

Figure 331: Adding A New Scenario

4. Click OK.

5. The Scenario Values box will pop up. This is where the
user can insert various values for the changeable cells.
For this first scenario, none of the values will be changed,
so click OK.

Figure 332: Changing Scenario Values

6. The Scenario Manager will pop up. It now indicates that


there is one scenario named Current. This scenario can
be deleted or edited if desired but click Add to create a
new scenario.
416 forecasting

Figure 333: Scenario Manager With One Scenario

7. Enter Vacation for the scenario name, accept the de-


fault changing cells, and enter Budget for our vacation
as a comment. Leave Prevent Changes checked and Hide
unchecked.

8. Click OK.

Figure 334: The Vacation Scenario

9. Morgan and Phoenix believe that they need to increase


their monthly savings significantly for their vacation.
They decide to cut their food budget to 250, clothes to
50, entertainment to 50, and miscellaneous to 50. Enter
those amounts in the Scenario Values box.
8.2 what-if analysis 417

Figure 335: Vacation Scenario Values

10. Click OK.


11. To see the result of the Vacation budget, select Vacation
and click Show on the Scenario Manager box.

Figure 336: Vacation Scenario Results

12. Morgan and Phoenix can now jump between the Current
and Vacation budgets by selecting them in the Scenario
Manager box and clicking the Show button.
13. To reset the budget back to its baseline, select Current
and click Show in the Scenario Manager box.
14. Next, they want to consider a budget for if one of them
starts college. For that, they believe that they will have to
find a smaller apartment near the campus and cut their
other expenses significantly.
418 forecasting

15. Click Add in the Scenario Manager.

16. Name the new scenario College and enter Starting col-
lege classes as a comment. Accept all other default val-
ues for this scenario and click OK.

17. In the Scenario Values box, enter 700 for rent, 100 for elec-
tricity, 200 for insurance, 175 for food, 50 for clothes, 50
for entertainment, and 50 for miscellaneous, then click
OK.

18. To reset the budget back to its baseline, select Current


and click Show in the Scenario Manager box.

19. Finally, Morgan and Phoenix want to consider purchas-


ing a new house. Click Add in the Scenario Manager box
to create a new scenario.

20. Name the new scenario House and enter Possible new
house as a comment. Accept all other default values for
this scenario.

21. Even though they will not have rent, they will have a
mortgage payment. For this worksheet, enter 1250 as
rent to cover the cost of a mortgage payment. Enter 150
for electricity, 75 for water, 350 for insurance, 250 for
food, 75 for clothes, 50 for entertainment, and 100 for
miscellaneous.

22. At this point, there are four scenarios, and each can be
viewed by clicking its name and Show in the Scenario
Manager box.
8.2 what-if analysis 419

Figure 337: The Completed Scenario Manager

23. It is possible to see a summary of all four scenarios in


a single report. Click Summary in the Scenario Manager
box.

24. Excel offers to create a summary worksheet or a pivot ta-


ble. For this exercise, select the Scenario summary radio
button, which will create a report.

Figure 338: Scenario Summary Options

25. The result cell, B23, is the Savings cell and this is the best
option for reporting the results of each scenario.

26. Click OK.


420 forecasting

27. Excel produces a nice report that shows the values that
were changed for each scenario and the result on their
savings.

Figure 339: Scenario Summary Report

28. Save the CH8-Williams Budget workbook.

29. Compare the workbook with the self-check answer key


(CH8-Williams Budget Solution) and then close and sub-
mit the CH8-Williams Budget workbook as directed by
the instructor.

8.2.3 Goal Seeking

Sometimes it is desirable to calculate a specific output for a formula


by changing one of the input variables and this process is called “Goal
Seeking” in Excel. As a demonstration of Goal Seeking, imagine that a
mortgage of $100000 is being negotiated and the buyer wants to keep
payments under $900 per month. If the mortgage will run 180 months
(15 years), what interest rate will lead to the maximum monthly pay-
ment possible under $900?

1. Open a new blank workbook.

2. Rename Sheet1 to Optimum Rate.

3. Save the workbook as CH8-Goal Seek.

4. Enter these labels in the first column.


8.2 what-if analysis 421

• In cell A1 enter Loan Amount.


• In cell A2 enter Term in Months.
• In cell A3 enter Interest Rate.
• In cell A4 enter Payment.

5. Adjust the width of Column A so the labels fit in the


column.

6. Enter the following known values.


• In cell B1 enter 100000. This is the amount being
borrowed.
• In cell B2 enter 180. This is the number of months
to pay off the loan.
• In cell B4 enter =PMT(B3/12,B2,B1) to calculate the
payment.

7. Because there is no value in cell B3, Excel assumes a


0% interest rate and returns a payment of $555.56. That
value can be ignored for now.

Use Goal Seek to determine the optimum interest rate for the pay-
ment desired.

1. Click Data ⇒ Forecast ⇒ What-If Analysis ⇒ Goal


Seek.

2. In the Set cell box, enter the reference for the cell that
contains the formula to be resolved. In the example, this
formula is in cell B4.

3. In the To value box, enter the desired result -900. Note this
number is negative because it represents money being
paid out of a checking account.

4. In the By changing cell box, enter the reference for the cell
that contains the value to adjust, or B3 in this example.
Note: The cell that Goal Seek changes must be referenced
by the formula in the cell specified in the Set cell box.
422 forecasting

Figure 340: Setting Up Goal Seeking

5. Click OK.

Excel calculates an interest rate of 0.07021 (7%) to yield a monthly


payment of $900.

1. To save the calculated amounts in the worksheet, click


OK but to cancel this process and return to the origi-
nal worksheet values, click Cancel. For this exercise, click
OK.

2. Save the CH8-Goal Seek workbook.

3. Compare the workbook with the self-check answer key


(CH8-Goal Seek Solution) and then close and submit the
CH8-Goal Seek workbook as directed by the instructor.

Figure 341: Results of Goal Seeking


8.2 what-if analysis 423

8.2.4 Solver

The Excel Solver is used to find an optimum solution for complex


business problems. As an example, Solver would evaluate multiple
parameters to find the best mix of products for a company to man-
ufacture. For this exercise, the PeopleMover Transportation company
wants to create a spreadsheet that will help their planners determine
the best mix of motor coaches for a contract.

1. Open workbook CH8-Solver.

2. Save the workbook as CH8-PeopleMover.

This workbook has only one worksheet, Planner. The worksheet has
some information already filled in. The company has four different
coaches: Deluxe, Large, Mid-Size, and Mini. For each type of coach, the
passenger capacity is listed. Also, the cost of operating the coach per
mile is specified. Finally, the number that the company has on hand is
listed. For example, a Deluxe coach can carry 56 passengers at a cost
of $2.80 per mile to operate. The company has two Deluxe coaches on
hand.
Cells A14:B15 on the worksheet is where information about a trip
is entered. For example, the worksheet is set up for a trip of 300 miles
that a group of 350 people want to take.
The goal is to have Excel calculate the optimum mix of coaches to
get a total capacity (cell B11) greater than the number of riders (B15)
at a minimum cost (cell B12). This is a perfect job for Solver.
Solver is part of Excel, but it is considered an Add-in and must be
activated before it can be used. Note: this process only needs to be
done one time, so if Solver is already activated, this part of the exercise
can be skipped.

1. Click File to open the backstage view.


2. In the backstage view, click Options at the bottom of the
left-hand menu.

Figure 342: The Options Button in the Backstage View


424 forecasting

3. Click Add-ins in the left-hand menu of the Excel Options


pop-up box.

4. Select Excel Add-ins in the drop-down menu at the bot-


tom of the Add-ins tab.

5. Click Go.

Figure 343: The Add-ins Manager

6. Click the checkbox beside Solver Add-in in the Add-ins


pop-up box.
8.2 what-if analysis 425

Figure 344: Activating The Solver Add-In

7. Click OK.

8. Notice that there is a new Solver button at Data ⇒ Ana-


lyze.

9. To set up the solver, click Data ⇒ Analyze ⇒ Solver.

10. In the Set Objective box, click the selector button and then
click cell B12 to select it. This sets the Solver to solve for
the total cost of the coaches. (Note: since cell B12 has a
name, the Solver may display the name Ttl Cost instead
of B12.)

11. For To, Select the Min radio button. This sets the Solver
to look for the minimum cost for the mix of coaches it
recommends.

12. For By Changing Variable Cells enter $E$6:$E$9. This tells


Excel to change the number of coaches allotted to mini-
mize the cost for the number of passengers to carry.

13. Click Add beside the Subject to the Constraints box to add
the constraints for the Solver.
426 forecasting

14. Specify that cell E6 must be <= cell D6. That means that
the number of Deluxe coaches allotted for the trip must
be less than or equal to the number on hand.

15. Click Add to add another constraint.

16. Specify that cell E6 must be an int since it is not possible


to allot a partial coach.

17. Click OK to return to the Solver Parameters dialog box.

18. There are now two constraints, but the cell names are
used rather than the location identifiers. The first con-
straint requires the number of coaches allotted be less
than the number on hand and the second requires only
complete coaches be allotted.

19. Add constraints for Large, Mid-Size, and Mini coaches


that are like those for the Deluxe coach.

20. Add a constraint that B11 must be >= B15 since all
riders need to have a seat on a coach.

21. Check the box for “Make Unconstrained Variables Non-


Negative” since it is not possible to have a negative num-
ber of coaches or riders.

22. For Select a Solving Method, the default is GRG Nonlinear.


This is normally a good option to use.
8.2 what-if analysis 427

Figure 345: The Solver Parameters

23. Click Solve.

After a few seconds, the Solver will calculate the mix of coaches
that yields the least cost. Notice that the Solver changed the Allotted
values for each of the coaches along with the Total Capacity and Total
Cost to match the optimal solution. Also, notice that the total coach ca-
pacity is 354 for the solution while there are only 350 riders, so there
will be four empty seats on the coaches. This solution will cost Peo-
pleMover Transportation $4, 575.00 so they would have to price tickets
appropriately.
428 forecasting

Figure 346: Solver Results

1. Click Keep Solver Solution and OK to save this solution.


(To return to the original values without saving, click
Restore Original Values and OK. Finally, this solution can
be saved as a scenario so it can be compared with other
solutions.)

2. Save CH8-PeopleMover.

3. Compare the workbook with the self-check answer key


(CH8-PeopleMover Solution) and then close and submit
the CH8-PeopleMover workbook as directed by the in-
structor.

Key Take-Aways

What-If Analysis

• Data tables are built by processing numeric inputs us-


ing Excel functions and formulas.
• Scenarios create various sets of inputs to compare the
resulting output.
• Goal seeking finds an optimum input to achieve a spe-
cific goal.
• The Solver finds optimal solutions to complex busi-
ness problems.

8.3 chapter practice

8.3.1 Electoral College Votes

The United States Electoral College is a unique institution that is re-


sponsible for electing the President. In theory, people vote for electors
8.3 chapter practice 429

in November who then later meet to vote for the President. This exer-
cise draws a 3D Map of the Electoral College presidential votes since
1912.

1. Open PR8-Data. This workbook contains the results of


the electoral college votea for all US Presidential elec-
tions from 1912 until 2016. Notes: In the 1912 election,
Theodore Roosevelt ran under the “Progressive” party,
but his votes are listed as “Republican” in this docu-
ment since there was no Republican candidate that year.
Alaska and Hawaii first sent delegates to the electoral
college in 1960 and Washington DC in 1964.

2. Save the workbook as PR8-Elections.

3. Click in A1 to activate that cell.

4. Click Insert ⇒ Tours ⇒ 3D Map.

5. If Excel did not automatically place the State data field


in the Location setting, then click and drag State in the
Electoral College Field List to the Location setting.

6. Click the down arrow to the right of State in the Location


setting and select State/Province in the drop-down list.

7. Click the pencil icon beside Layer 1 and change the name
of this layer to Votes.

8. Click and drag Votes in the Electoral College Field List to


the Height setting.

9. Click and drag Year in the Electoral College Field List to


the Time setting.

10. Click the down arrow to the right of Year in the Time
setting and select Year in the drop-down list.

11. Click and drag Party in the Electoral College Field List to
the Category setting.

12. Change the visualization type to Bubble.

13. Click the down arrow to the right of Votes in the Size
setting and select No Aggregation in the drop-down list.

14. Click Flat Map and then adjust the map to fit on the
screen. Remember that Alaska and Hawaii need to be
visible on the map. Also, experiment with the four arrow
and plus/minus buttons to adjust the display.
430 forecasting

15. Under Layer Options, change the color for Republican to


red and Other to green.

16. Play the tour to see what it looks like.

17. Click Tour 1 at the top of the Tour Editor. Enter Election
as the name of the tour.

18. The displayed date shows the day, month, and year, but
election results only change every four years. To make
the date display more appropriate, right-click it and se-
lect Edit. In the edit box, choose the Time Format that
only shows the year without the month and day. Change
the background color of the date display to white. Click
Accept to lock in these changes.

19. Once the date is adjusted, resize and position it so it


does not cover any of the states.

20. Add a text box with the title of Elections and this de-
scription: Results of the Electoral College votes for 1912-
2016. Set the background color of the text box to white.
Once the box is created, resize and position it so it does
not cover any of the states.

21. Resize and position the legend box so it does not cover
any of the states.

22. Click the Scene Options button on the ribbon and


change the name of the scene to Elections.

23. Click Map Labels to turn on the labels.

24. Click Tour Editor, Layer Pane, and Field List to turn off
those dialog boxes. These can always be turned back on
if desired.

25. Play the tour to view the final version.


8.4 scored assessment 431

Figure 347: Electoral College Map

26. Click Create Video to create a video version of the tour.

27. In the Create Video dialog box, select Quick Export & Mo-
bile, then click Create. Save the video in the same folder
as PR8-Elections. Note: The video is being created at the
lowest possible resolution so the file is small to make it
easier to submit it to the instructor; to create a video de-
signed to be presented to clients, it should be created at
a higher resolution.

28. To save the map, click File ⇒ Close. The map is saved as
part of the workbook and will be available the next time
the workbook is opened.

29. Save the PR8-Elections workbook.

30. Compare the workbook with the self-check answer key


(PR8-Elections Solution) and then close and submit the
PR8-Elections workbook and PR8-Election video as di-
rected by the instructor.
a The electoral college data was found at the United States National Archives,
https://www.archives.gov/electoral-college

8.4 scored assessment

8.4.1 Product Mix

The Giant Electronics company is a local small business that sells dis-
counted electronic devices, like televisions and computers. The own-
432 forecasting

ers, Addison and Kelsey, are planning for their annual spring promo-
tion and want to create a good mix of sale items.

1. Open workbook SC8-Data.

2. Save the workbook as SC8-Product Mix.

This workbook has only one worksheet, Planner. The worksheet


already has some information filled in. Addison and Kelsey are plan-
ning to promote four items, a television, a computer, various game
cartridges, and a camera. The worksheet shows the cost for each item;
for example, each television set costs them $899. The price they intend
to sell each item is also noted. For example, televisions will sell for
$1049. The profit for each item is calculated by subtracting the cost
from the price. Finally, the To Order column lists how many of each
item they should order for their sale.
In cell B11, under the Planner table, Addison and Kelsey indicate
how much they want to invest in the sale. The worksheet initially
indicates a $50, 000 investment.
Cell B13 has a formula that calculates the total cost of whatever
they decide to order and B14 has a formula that calculates the total
profit for those items.

1. Click Data ⇒ Analyze ⇒ Solver.

2. In the Set Objective box, click the selector button and then
click cell B14 to select it. This sets the Solver to solve for
the total profit of the sale items. (Note: since cell B14
has a name, the Solver may display the name Total Profit
instead of $B$14.)

3. For To, Select the Max radio button. This sets the Solver
to look for the maximum profit for the mix of products
it recommends.

4. The constraints are already defined. These will be


changed later, but the initial configuration requires the
total cost to be less than the investment. The configura-
tion also requires all orders to be integers (it is not possi-
ble to order a fraction of a television) and there are some
constraints on the number of items that can be ordered.

5. Make sure the GRG Nonlinear is the solving method.


8.4 scored assessment 433

Figure 348: Solver Initial Setup

6. Click Solve.

Figure 349: Solver Initial Solution

Solver determined that the optimum mix of products was 38 televi-


sions, 13 computers, 100 Game cartridges, and 10 cameras. This will
cost Addison and Kelsey $49, 989, just under their $50, 000 limit and
will net them a profit of $9, 500.

1. Click Save Scenario.

2. Name the scenario Initial Attempt and click OK.


434 forecasting

3. Click Restore Original Values in the Results dialog box to


return the Planner table to its original state.

4. Click Answer in the Reports dialog box. This makes Excel


generate a report named Answer Report 1.

5. Click OK.

6. Excel creates a report on a new worksheet named An-


swer Report 1. This makes it easy to come back to this
solution later.

7. Click Data ⇒ Forecast ⇒ What-If ⇒ Scenario Man-


ager. Notice that Excel placed that first scenario, Initial
Attempt, in the scenario manager for later reference.

8. Click Close to close the scenario manager.

Addison and Kelsey decide that they want to sell more than 10
cameras and they think that 100 game cartridges are too many.

1. Click Data ⇒ Analyze ⇒ Solver.

2. Click Cam Order >= 10 to select it and then click


Change.

3. Change the constraint to 20 and click OK.

4. Click Game Order <= 100 to select it and then click


Change.

5. Change the constraint to 50 and click OK.

6. Click Solve.

7. Notice that Excel has now adjusted the order column so


only 50 game cartridges and 20 cameras will be ordered.
Also notice that the profit has dropped to $8, 500.

8. Click Save Scenario, name it 20 Cameras, and click OK.

9. Click Answer in the Reports dialog box. This makes Excel


generate a report named Answer Report 2.

10. Select Restore Original Values and click OK.

Addison and Kelsey would like to boost their profit a bit so they de-
cide to adjust the selling price for two items. They think the television
could sell for $1199 and the computer for $999.
8.4 scored assessment 435

1. Click C6 to activate that cell and enter 1199 for the new
television selling price.

2. Click C7 to activate that cell and enter 999 for the new
computer selling price.

3. Click Data ⇒ Analyze ⇒ Solver.

4. Click Solve on the Solver Parameters dialog box.

5. Click Save Scenario, name it Expensive Televisions, and


click OK.

6. Click Answer in the Reports dialog box. This makes Excel


generate a report named Answer Report 3.

7. Select Restore Original Values and click OK.

Addison and Kelsey could continue adjusting the sale prices and
the maximum number of each item to order to come to what they
believe is the optimum mix of products for their spring sale.
Take a look at Answer Report 1, Answer Report 2, and Answer Report
3 to compare the results of each scenario. It would be easier to see all
three scenarios in a single report.

1. Click Data ⇒ Forecast ⇒ What-If Analysis ⇒ Scenario


Manager.

2. Notice that all three scenarios are listed. To create a sin-


gle report containing all scenarios, click Summary.

3. In the Scenario Summary diaglog box, make sure


Scenario Summary is selected and the result cells are
B13,B14.

4. Click OK. The report illustrated in Figure 350 is created.

Figure 350: Solver Scenario Summary


436 forecasting

5. Save and close the SC8-Product Mix workbook.

6. Submit the SC8-Product Mix workbook to the instruc-


tor.

8.5 addendum: filled map

Information
Filled Maps

This section concerns creating a 2-D Filled Map in an


Excel workbook. These maps are very useful and easy to
create, but are only available for Excel 2016 installations
that include a subscription to Excel 365.

After Excel 2016 was released, Microsoft added a new feature, Filled
Maps. This feature was added to Excel installations that included an
Office 365 subscription, but not to stand-alone installations. As a re-
sult, some Excel 2016 installations will have Filled Maps available but
others will not. This addendum was included with this chapter for
students who have access to Filled Maps, but it is not considered part
of the formal Excel training course.

1. Open workbook CH8-Cancer Rate. This workbook con-


tains the rate of cigarette smoking along with cancer
rates for various types of cancer that seem to be related
to smoking. The data was captured in a study completed
in 1960.

2. Save the workbook as CH8-Cancer Map.

3. Click cell A3:B43 to activate that range of cells.

4. Click Insert ⇒ Charts ⇒ Maps ⇒ Filled Map.


8.5 addendum: filled map 437

Figure 351: Creating a Filled Map

5. Excel creates a map of the United States with the


cigarette use rate indicated by color. Nebraska has the
highest rate of cigarette use and states that are gray, like
Oregon, did not have data in the input table.

6. Click the chart title two times to enable editing. Change


that title to Cigarette Use.

7. Click the paint brush tool at the top right corner of the
map to change the style and colors for the map. Click
Color in the popup menu.

8. Select Monochromatic Palette 6, a green palette.


438 forecasting

Figure 352: Completed Map

9. Save the CH8-Cancer Map workbook.

10. Compare the workbook with the self-check answer key


(CH8-Cancer Map Solution) and then close the CH8-
Cancer Map workbook. Note: this is an addendum to
the chapter so the workbook is not submitted.

In the same way that the cigarette use rate was mapped, any of
the types of cancer can be mapped. The limitation is that only one
variable, plus the state names, can be mapped at one time. However,
if managers had sales data available, this would be a great way to
determine, for example, where their best customers live so they can
plan some sort of promotion.
A D VA N C E D T O P I C S
9
Excel includes many advanced features not covered elsewhere in this
book and they were gathered in this final chapter. Most of these fea-
tures are only occasionally used but when needed, they provide an
essential resource.

9.1 database functions

Learning Objectives

• Learn to use Excel’s functions that make a spread-


sheet behave more like a database.

A database is a collection of data that is used by business leader-


ship to support decisions. A database is commonly used to contain
personnel, supply, manufacturing, sales, and many other types of in-
formation. A database is normally created with a program like Mi-
crosoft Access, but that program is complex with a steep learning
curve. Simple data tables with a few database properties can be cre-
ated and manipulated in Excel, as shown in this section.

9.1.1 Create a Data Table

1. Open workbook CH9-Database

2. Save the workbook as CH9-Sales.

3. This workbook has only one worksheet, Sales.

This worksheet contains the May 2020, sales report for MongoSales
Corp. The report includes the sales representative name, the district,
name, and Zip Code for the company that purchased items, the date
of the purchase, the item purchased, the number of units purchased,
price per unit, and total sale value. (Note: this is dummy data.) The
worksheet needs to be converted to a table to use it as a database.

1. Click cell A1 to activate that cell.

2. Click Insert ⇒ Tables ⇒ Table.

439
440 advanced topics

3. Excel automatically selects cells $A$1:$I$69, which is


the entire dataset. Be certain My table has headers is
checked (Figure 353).

Figure 353: Creating a Data Table

4. Click OK.

Excel creates a data table (Figure 354), which has many of the prop-
erties expected of a database.

Figure 354: Top Of the Data Table

1. At Table Tools ⇒ Properties ⇒ Table Name enter Sales


as the new table name in a text box near the left edge of
the ribbon.

In a database, columns are referred to as “Fields” and rows as


“Records.” Notice that each of the fields in the data table includes
a drop-down arrow. That opens a menu with filtering functions that
can be applied to the database. Figure 355 illustrates the filter for the
Item field.
9.1 database functions 441

Figure 355: Item Filter

The database can be sorted on the item field by clicking either of


the top two buttons in the filter drop-down (named “Sort A to Z” and
“Sort Z to A”). Clicking the Text Filters button opens a submenu where
powerful filters can be created. (Note, the Filters button for fields with
other types of data, like numbers or dates, will match the data type.)
Also, the checkboxes at the bottom of the popup can be used to hide
or view records that match the selected item. Thus, to only see the
“Alpha Fresh” records, uncheck all boxes except that one.

9.1.2 The Database Functions

Along with simple sorting and filtering, Excel provides the following
functions that are designed to be used with a database.

• DAVERAGE. Calculates the average of values in a field that


meet specified conditions.

• DCOUNT. Returns the number of cells containing numbers in


a field that meet specified conditions.

• DCOUNTA. Returns the number of non-blank cells in a field


that meet specified conditions.
442 advanced topics

• DGET. Returns a single value from a field that meet specified


conditions.

• DMAX. Returns the maximum value from a field that meet


specified conditions.

• DMIN. Returns the minimum value from a field that meet spec-
ified conditions.

• DPRODUCT. Calculates the product of values in a field that


meet specified conditions.

• DSTDEV. Calculates the standard deviation (based on a sample


of a population) of values in a field that meet specified condi-
tions.

• DSTDEVP. Calculates the standard deviation (based on an en-


tire population) of values in a field that meet specified condi-
tions.

• DSUM. Calculates the sum of values in a field that meet speci-


fied conditions.

• DVAR. Calculates the variance (based on a sample of a popula-


tion) of values in a field that meet specified conditions.

• DVARP. Calculates the variance (based on an entire population)


of values in a field that meet specified conditions.

These functions all use similar syntax: =FuncName(Database, Field,


Criteria). In the function, the FuncName is the name of the function,
like DSUM. The Database name will be Sales in this exercise since that
is the name of the table. The Field is one of the field names, like Rep
or District. Finally, the Criteria is a range that contains the factors that
limit the output of the function. This is best explained with some
examples.

1. Set up an area where the sum of all orders sent to Zip


85260 will be calculated (see Figure 356).
• In cell K2, enter Zip
• In cell K3, enter 85260
• In cell L2, enter Sum .
• In cell L3, enter =DSUM(Sales[#All], ”Total”,
K2:K3).

2. Here is what the various parts of the formula in L3


mean.
9.1 database functions 443

• DSUM. This is the Data Sum function that totals all


the specified data.
• Sales[#All]. This instructs Excel to use the entire
Sales data table. By using this nomenclature rather
than specific cell locations (like A1:I69), the for-
mula will continue to work even if records are later
added to or removed from the table.
• Total. This is the field that contains the numbers
to be summed. Notice that the field name is put in
quote marks.
• K2:K3. This is the location of the criteria Excel will
use to sum the sales amounts. In this case, the Zip
Code must be equal to 85260.

Figure 356: Setting Up the Data File Calculation

3. Once the formula and criteria are entered, Excel calcu-


lates the total value of sales to that Zip Code and displays
14747.55.

4. Change the Zip Code in K3 to 85251. The value in cell


L3 will be automatically updated to 748.50, which is the
total value in sales to that Zip Code.

5. Copy/paste cells K2:L3 to K5:L6. When pasted, Excel


will automatically update the criteria range in the for-
mula to K5:K6.

6. Change the value of K5 to District and K6 to east. L6


now displays 22546.95, which is the total value of sales
to the east district.

7. Copy/paste K5:L6 to K8:L9.

8. Change the formula in L9 to calculate the average


value of the total sales by changing DSUM to DAV-
ERAGE. The formula in L9 should now be: =DAVER-
AGE(Sales[#All], ”Total”, K8:K9)

9. Change K8 to Rep and K9 to Pratton. L9 should now


display 736.7236842, which is the average sale value for
444 advanced topics

Pratton. The average sale for other sellers can be easily


checked by entering their names in K9, one at a time.

10. Save the CH9-Sales workbook.

One important feature for any database lookup is the ability to


specify “Boolean” matches; that is, a match that includes an AND
term or an OR term. For example, that would answer a question like,
“What is the total value of the sales of TrueTrax made by Findlay?”
Follow these steps to create Boolean expressions.

1. Copy/paste K8:K9 to K11:K12 and paste K8:K9 to


L11:L12. Be sure K11 is Rep, then change K12 to Find-
lay, L11 to Item and L12 to TrueTrax.

2. Copy/paste L8:L9 to M11:M12. Change the formula in


M12 to =DSUM(Sales[#All], ”Total”, K11:L12).

Figure 357: Calculating an AND Expression

3. Cell M12 is now 1739.7, which is the total value of Find-


lay’s TrueTrax sales. Note, if the value in M12 is not right,
check for typos in the Rep and Item names.

4. Data criteria items that appear in the same row are com-
bined with an AND, so the range K11:L12 would be
read “Calculate the sum of all lines that include a rep-
resentative named Findlay AND an item named True-
Trax.”

5. Note: The order of the ANDed terms is important. They


must be in the same order in the criteria section as they
are in the data table. Therefore, if Item were in K11 and
Rep in L11 the formula would fail since these two vari-
ables are in the opposite order as the data fields in the
table.
9.1 database functions 445

6. Other sales representative names can be entered in cell


K12 or other items in L12 to check on those sales.

7. To combine two or more terms with an OR, place those


terms on separate lines, as demonstrated next.

8. Copy/paste K11:M12 to K14:M15.

9. Rather than calculate the total value of Findlay’s sales,


count the number of items sold. Change M14 to Units
Sold.

10. Change the formula in M15 to: =DSUM(Sales[#All],


”Units”, K14:L15). Notice that the only change to the for-
mula is that it will sum the Units field instead of the
Total field.

11. To include PlusAir, in cell K16, enter Findlay and in cell


L16, enter PlusAir.

12. Change the formula in M15 to =DSUM(Sales[#All],


”Units”, K14:L16). Notice that the only change is to in-
crease the criteria range to K14:L16. Now, Excel will
count the total number of lines that include both Find-
lay and TrueTrax OR Findley and PlusAir. Excel reports
that Findlay sold 50 TrueTrax OR PlusAir units.

Figure 358: Calculating an OR Expression


446 advanced topics

Finally, it is often desirable to set up a range for a data calculation.


For example, it is possible to count the total number of Tonity sales
made between May 5 and May 20.

1. In both cells K18 and L18, enter Date (the Date will be
entered two times in the criteria); in cell M18, enter Item;
and in cell N18, enter Count.

2. In cell K19, enter >=5/10/2020; in cell L19, enter


<=5/20/2020; and in cell M19, enter Tonity.

3. In cell N19, enter =DCOUNT(Sales[#All], ”Total”,


K18:M19). Notice that this is a DCOUNT formula, so the
number of lines that contain a Tonity item sold between
5/10/2020 and 5/20/2020 (inclusive) will be counted.

Figure 359: Specifying a Date Range

4. Excel reports seven Tonity sales were made between the


two specified dates.

5. Save the CH9-Sales workbook.

6. Compare the workbook with the self-check answer key


(CH9-Sales Solution) and then close and submit the
CH9-Sales workbook as directed by the instructor.

Creating a data table is easy in Excel, then the Data formulas make
it easy to create complex calculations by simply specifying the desired
criteria in a range of cells.

Key Take-Aways

Database Functions

• Set up the database functions by creating a data table.


• Use any of the “D...” functions to easily count, sum,
or statistically analyze a data table using complex
Boolean operations.
9.2 useful functions 447

9.2 useful functions

Learning Objectives

• Practice with 8 of Excel’s most useful text functions.


• Practice with 12 of Excel’s most useful numeric func-
tions.

Excel includes more than 300 functions that are designed to process
both text and numbers. Most of those functions are only useful in
specific situations and most users will never know that they exist;
however, many functions are so commonly used that they show up
in many spreadsheet projects. This section provides information and
practice with 20 of the most useful Excel functions.
A contact roster will be used for the exercises in this section. This
file contains information that would be used by sales representatives
as they work with a company’s clients. The roster needs to be cleaned
up a bit for more efficient use. (Note: this roster contains fake data.)

1. Open workbook CH9-Contact Data

2. Save the workbook as CH9-Contact.

3. This workbook has only one worksheet, Contacts.

9.2.1 Text Functions

Excel includes scores of functions designed to be used with cells that


contain text rather than numbers and this section explores the most
used text functions.

9.2.1.1 To Columns

Often, a field in a data file contains two or more separate pieces of


information. This makes it impossible to complete tasks like sorting
on the individual pieces of information. The Name data field (Column
B) in the Contacts worksheet includes both first and last names, but
those should be placed in different fields. This is such a common
operation; Excel has a function that splits data separated by a comma
into two different fields.

1. Insert a new column to the left of Column C. This col-


umn will eventually contain the first name and Column
B will contain the last name.
448 advanced topics

2. Click B2 and then shift-click B101 to select all the data


in Column B. (Note: a useful keyboard shortcut is to
click B2 then Ctrl + Shift + Down Arrow to select all data
in the column.)

3. Click Data ⇒ Data Tools ⇒ Text to Columns.

4. Excel starts a data wizard to help split the data. The first
screen is used to adjust from delimited to fixed width
data type, but the default, delimited, is correct, so click
Next.

Figure 360: Convert Text to Columns Wizard Screen 1

5. The second wizard box determines what sort of delim-


iter is used with the data. For this field, the first and last
names are separated by a comma, so check the Comma
delimiter and uncheck the Tab delimiter. The sample
data at the bottom of the Wizard screen should show
the first and last names divided. Click Next.
9.2 useful functions 449

Figure 361: Convert Text to Columns Wizard Screen 2

6. The third wizard box determines the type of data each


column contains. Since the default, General, is appropri-
ate, click Finish.

Figure 362: Convert Text to Columns Wizard Screen 3

7. Excel splits the names into two columns.

8. In cell B1 enter Last Name (with an underscore).

9. In cell C1 enter First Name (with an underscore).

10. Adjust Column B and Column C so they are the opti-


mum width.
450 advanced topics

Figure 363: Names Divided Into Two Columns

9.2.1.2 Trim

= T RIM(text)
The TRIM function is used to trim unwanted spaces from the start
or end of text in a cell.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. When the name was separated into Last Name and


First Name columns, Excel automatically added a space
at the start of the First Name field. That space, though,
will be a problem in later exercises.

3. Insert a new column to the left of Column D. The newly


inserted column becomes Column D.

4. In cell D2, enter =TRIM(C2).

5. Copy D2 to D3:D101. This removes the leading space


from the first names.

6. Select and copy D2:D101.

7. Click C2 then Home ⇒ Clipboard ⇒ Paste ⇒ Values.


Note: it is important to paste the values, not just a simple
paste. Otherwise, C2:C101 will be filled with the TRIM
formula rather than the value generated by that formula.
9.2 useful functions 451

Figure 364: Paste Values Button

8. Delete Column D.

9. Though it is not visible, the data in Column F (the Role


column) has a random number of spaces trailing many
of the entries, which is a common problem caused by
sloppy data entry.

10. Insert a new column to the left of Column G. The newly


inserted column becomes Column G.

11. In cell G2, enter =TRIM(F2).

12. Copy G2 to G3:G101. This removes the trailing space


from all entries in the role data.

13. Select and copy G2:G101.

14. Click F2 then Home ⇒ Clipboard ⇒ Paste ⇒ Values.


Note: it is important to paste the values, not just a simple
paste. Otherwise, F2:F101 will be filled with the TRIM
formula rather than the value generated by that formula.

15. Delete Column G.


452 advanced topics

9.2.1.3 Upper/Lower/Proper

= UPPER(text)
= LOWER(text)
= PROPER(text)
Often, the text case needs to be changed. The UPPER function
changes text to upper case, the LOWER function changes text to lower
case, and the PROPER function changes to title case (the first letter of
each word is capitalized).

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. For some reason, the last names in Column B are upper-


case. Uppercase text is commonly found, but that type
of text is difficult to read.

3. Insert a new column to the left of Column C. The newly


inserted column becomes Column C.

4. Enter this formula in C2: =PROPER(B2).

5. Copy C2 to C3:C101. This changes the last names to


proper case.

6. Select and copy C2:C101.

7. Click B2 then Home ⇒ Clipboard ⇒ Paste ⇒ Values.


Note: it is important to paste the values, not just a sim-
ple paste. Otherwise, B2:B101 will be filled with the
PROPER formula rather than the value generated by that
formula.

8. Delete Column C.

9.2.1.4 Left/Right/Mid

= LEFT (text, [num chars])


= RIGHT (text, [num chars])
= MID(text, start num, [num chars])
The LEFT, RIGHT, and MID functions are used to extract letters
from a text field. For example, cell B2 contains Rothschild. The func-
tion =LEFT(B2,4) would extract “Roth,” the left four letters in that
field. The function =RIGHT(B2,5) would extract “child,” the right five
letters in that field. The function =MID(B2,5,3) would extract “sch,”
the three letters starting in position five in that field. These functions,
9.2 useful functions 453

along with CONCATENATE in the next section, are used to change


the format of the phone number (Column E) from ten digits to (xxx)
xxx-xxxx.

9.2.1.5 Concatenate

= CONCAT ENAT E(text1, text2, [text3], ...)


Frequently, text stored in various workbook cells needs to be com-
bined to create new information. The CONCATENATE function makes
this possible. The various text phrases to combine are entered one
after another, separated by commas. This exercise uses CONCATE-
NATE along with LEFT, RIGHT, and MID to change the format of
the phone number in Column E from ten digits to (xxx) xxx-xxxx.
Excel 365 Note: this function was renamed CONCAT in Excel 365.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column F. The newly


inserted column becomes Column F.

3. Enter this in F2: =CONCATENATE(”(”, LEFT(E2,3),”) ”,


MID(E2,4,3), ”-”, RIGHT(E2,4))

4. The formula concatenates (or joins) an open parenthe-


sis, the left three digits of the phone number, a closing
parenthesis with a space, the three middle digits of the
phone number, a dash, and the right four digits of the
phone number. The formula looks complex but is easy
to understand if it is built up one small piece at a time.

5. Copy F2 to F3:F101. This changes the format of the


phone number to (xxx) xxx-xxxx.

6. Select and copy F2:F101.

7. Click E2 then Home ⇒ Clipboard ⇒ Paste ⇒ Values.


Note: it is important to paste the values, not just a simple
paste. Otherwise, E2:E101 will be filled with the CON-
CATENATE formula rather than the value generated by
that formula.

8. Delete Column F.

9. Adjust the width of Column E to properly display the


formatted phone number.

10. Save the CH9-Contact workbook.


454 advanced topics

9.2.1.6 Search

= SEARCH(find text, within text, [start num])


The SEARCH function is used to find a phrase in a cell that con-
tains text. This is like the LEFT/RIGHT/MID functions except with
SEARCH the exact starting position of the target data is not known in
advance. Therefore, SEARCH could be used to find the phrase “good”
in strings like “good morning” and “the greater good” where the tar-
get phrase starts in different locations in each string. Optionally, a
start point for the search can be specified. SEARCH returns the po-
sition where the target phrase starts, so SEARCH would report that
“good” in “good morning” starts at position one but in “the greater
good” it starts at position 13. For this exercise, the year needs to be
extracted from the Contract Num field (Column J). The starting posi-
tion for the year varies but is always after the first dash (see Figure
365), so SEARCH is needed instead of a simple LEFT/RIGHT/MID
function. Note: SEARCH is not case sensitive, but the related Excel
function FIND is case sensitive. Other than that, the two functions are
identical. Thus, to locate the word “College” in a cell, use SEARCH
if the capital letter should be ignored but FIND if the capital letter is
important.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column K. The newly


inserted column becomes Column K.

3. In cell K1, enter Year. This column will contain the ex-
tracted year.

4. In cell K2, enter =VALUE(MID(J2, SEARCH(”-”,


J2)+1,4)). If the formula is entered without error, cell K2
will display 2013, the year in the contract number in cell
J2. This is a complex formula, but it can be broken down,
starting in the middle of the formula:
• SEARCH(“-”,J2). Search for a hyphen in data field
J2.
• MID(J2, SEARCH(”-”, J2)+1,4). Using the MID
function, extract from data field J2, starting one let-
ter past the position of the hyphen, for four charac-
ters.
• =VALUE(MID(J2, SEARCH(”-”, J2)+1,4)). Convert
the extracted text to a number rather than store it as
text. Note: Excel would store an extracted phrase as
text, but since these are years it is sensible to store
9.2 useful functions 455

them as numbers so various statistical functions can


later be used.

5. Copy K2 to K3:K101. This finds the year from each of


the contract numbers.

6. Select and copy K2:K101.

7. Click K2 then Home ⇒ Clipboard ⇒ Paste ⇒ Values.


Note: This looks odd since the cells are being pasted
back into the same locations from which they were
copied, but this is a good way to remove a formula from
a cell without creating an additional data column. It is
important to paste the values, not just a simple paste.
Otherwise, K2:K101 will be filled with the SEARCH for-
mula rather than the value generated by that formula.

8. Adjust the width of Column K to optimally fit the year


data.

Figure 365: Extracting the Year from the Contract Number

9.2.1.7 VLookup

= VLOOKUP(value, table, col index, [approx])


VLOOKUP is a useful, but complex, Excel function. It is used to
look up and return a value from a table. VLOOKUP will look up
some target value in column one of a data range and return the value
from an indexed column number. This concept is much easier to un-
derstand with an example. Consider Table 33.
456 advanced topics

ID Name Phone Section


0134 Jones (520) 123-4567 Sales
0293 Marks (520) 398-2219 HR
0342 Nash (520) 721-9043 Orders

Table 33: VLookup Example Table

The formula =VLOOKUP(0293,A2:D5,4) would lookup 0293 in the


first column of the data table in A2:D5 and then return the value in
the fourth column of that table, HR.
The last parameter in the VLOOKUP function, “approx,” deter-
mines if the match in column can be approximate or if an exact match
is required. If the value for this item is TRUE then an approximate
match is acceptable (this is the default), but if it is FALSE then the
match must be exact.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P3 enter Company.

3. In cell P4 enter Last Name.

4. In cell P5 enter Phone.

5. In cell P6 enter Role.

6. Adjust the width of Column P to optimally fit the data.

7. In cell Q3 enter Agimba. This is the name of the first


company, found in cell A2.

8. In cell Q4 enter =VLOOKUP($Q$3,$A$1:$F$101,2,FALSE).


This formula will lookup the company found in cell
Q3, “Agimba,” in column one of the table found in
A1:F101 and then return the value found in column
two of that table (see Figure 366). When completed,
cell Q4 should contain Rothschild, which is the name
of the representative at Agimba. If the cell contains an
error message check the formula for typing errors and
check the spelling of Agimba in cell Q3. Notice that the
formula uses absolute references so if it is copied to
other cells it will still refer to the correct table. Also
notice that the last item in the formula is “FALSE”
which makes Excel look for an exact match rather than
an approximate match.
9.2 useful functions 457

9. In cell Q5 enter =VLOOKUP($Q$3,$A$1:$F$101,5,FALSE).


This is the same formula entered in Q4, but the column
returned is 5 instead of 2. This formula will lookup the
company found in cell Q3, “Agimba,” in column one of
the table found in A2:F101 and then return the value
found in column five of that table. When completed, cell
Q5 should contain “(520) 555-1082,” which is Agimba’s
phone number. Notice that the formula uses absolute
references so if it is copied to other cells it will still
refer to the correct table. Also notice that the last item
is “FALSE” which makes Excel look for an exact match
rather than an approximate match.

10. In cell Q6 enter =VLOOKUP($Q$3, $A$1:$F$101, 6,


FALSE). This is the same formula entered in Q5, but
the column returned is 6 instead of 5. This formula will
lookup the company found in cell Q3, “Agimba,” in col-
umn one of the table found in A2:F101 and then re-
turn the value found in column six of that table. When
completed, cell Q6 should contain “Business Analyst,”
which is the role of the contact at Agimba. Notice that
the formula uses absolute references so if it is copied
to other cells it will still refer to the correct table. Also
notice that the last item is “FALSE” which makes Ex-
cel look for an exact match rather than an approximate
match.

Figure 366: VLookup Formula for Q4

11. Adjust the width of Column Q to optimally fit the data.

12. If the company in cell Q3 is changed then the data dis-


played in Q4:Q6 will be updated to match the new name.
458 advanced topics

Try entering Blogtag and Eidel in Q3 to check the up-


date feature.

9.2.1.8 Index Match

= INDEX(data, MAT CH(value, lookup column, FALSE), column)


This is the most complex formula in this book and is a combination
of two simpler functions: INDEX and MATCH. On the surface, it
does almost exactly what VLOOKUP does, so many people do not
bother to learn the INDEX MATCH formula. However, VLOOKUP
requires the lookup field to be in column one of the data table while
INDEX MATCH can look up data in any column. Also, if the data
table is changed in some way (a new column added, for example),
VLOOKUP will no longer work but INDEX MATCH will adapt to the
new table structure. So, the time taken to learn this lookup formula
will result in a more robust lookup function.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P8 enter Contract Num.

3. In cell P9 enter Company.

4. In cell P10 enter Phone.

5. In cell P11 enter Last Name.

6. Adjust the width of Column P to optimally fit the data.

7. In cell Q8 enter Agim(BusDev)-2013-21. This is the con-


tract number for the first data row, found in cell J2.

8. In cell Q9 enter =INDEX($A$2:$F$101, MATCH($Q$8,


$J$2:$J$101, FALSE), 1) (see Figure 367). (Note: if Q9 dis-
plays an error then check the formula in Q9 and the
value in Q8 for typing errors.) This is a complex formula
and it will help to break it down into smaller chunks,
starting in the middle:
• MATCH($Q$8,$J$2:$J$101,FALSE). In the center of
the complex formula is a MATCH function. That
will look for the value in cell Q8 (the contract num-
ber) in J2:J101 (the contract data field). An exact
match is required since the last parameter is FALSE.
If the contract number is found, then MATCH will
return the row number for that contract.
9.2 useful functions 459

• =INDEX($A$2:$F$101,RowNum,1). INDEX will


use the row number (RowNum) returned by the
MATCH function and return the data in column
one (Company name) of the data table in A2:F101.

9. When completed, cell Q9 should contain “Agimba,”


which is the name of the company for the contract num-
ber in cell Q8. Notice that the formula uses absolute ref-
erences so if it is copied to other cells it will still refer to
the correct table.

10. In cell Q10 enter =INDEX($A$2:$F$101, MATCH($Q$8,


$J$2:$J$101,FALSE),5). This is the same formula entered
in Q9, but the last number is changed from 1 to 5 to
return the phone number field. This formula will match
the contract number found in cell Q8 and then return the
value found in column five of the data table. When com-
pleted, cell Q10 should contain “(520) 555-1082,” which
is the phone number for the company. Notice that the
formula uses absolute references so if it is copied to
other cells it will still refer to the correct table.

11. In cell Q11 enter =INDEX($A$2:$F$101, MATCH($Q$8,


$J$2:$J$101,FALSE),2). This is the same formula entered
in Q10, but the last number is changed from 5 to 2 to
return the last name field. This formula will look up the
contract number found in cell Q8 and then return the
value found in column two of the data table. When com-
pleted, cell Q11 should contain “Rothschild,” which is
the last name of the contact for this contract. Notice that
the formula uses absolute references so if it is copied to
other cells it will still refer to the correct table.

Figure 367: Index-Match Formula for Q9

12. If the contract number in Q8 is changed then the data


displayed in Q9:Q11 will be updated to match the
460 advanced topics

new number. Try entering Buzz(Sales)-2014-117 and


Link(RD)-2013-21 in Q8 to check the update feature.

13. Save the CH9-Contact workbook.

9.2.2 Number Functions

Excel has hundreds of functions designed to be used with cells that


contain numbers and this section explores the most used number
functions.

9.2.2.1 Sum

= SUM(number1, [number2], [number3], ...)


This function adds all the values in a specified range.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P13, enter Total Value.

3. In cell Q13, enter =SUM(L2:L101). This formula will to-


tal all the contract values found in Column L.

4. When completed, cell Q13 should contain 4374391. This


number could be formatted with Excel’s formatting
tools to be easier to read.

Figure 368: Sum Formula for Q13

9.2.2.2 Average

= AVERAGE(number1, [number2], [number3], ...)


This function calculates the average for the values in a specified
range.
9.2 useful functions 461

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P14, enter Average Value.

3. In cell Q14, enter =AVERAGE(L2:L101). This formula


will calculate the average of the contract values found
in Column L.

4. When completed, cell Q14 should contain 43743.91. This


number could be formatted with Excel’s formatting
tools to be easier to read.

Figure 369: Average Formula for Q14

9.2.2.3 Min/Max

= MIN(number1, [number2], [number3], ...)


= MAX(number1, [number2], [number3], ...)
These functions find the minimum or maximum value in a speci-
fied range.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P15, enter Max Value.

3. In cell Q15, enter =MAX(L2:L101). This formula will


find the maximum contract value in Column L.

4. When completed, cell Q15 should contain 88050.

5. In cell P16, enter Min Value.

6. In cell Q16, enter =MIN(L2:L101). This formula will find


the minimum contract value in Column L.
462 advanced topics

7. When completed, cell Q16 should contain 5140.

Figure 370: Max Formula for Q15

9.2.2.4 Round

= ROUND(number, num digits)


This function rounds a number to a specified number of digits. If
the number of digits is a positive number, then it will be rounded to
a decimal value but if the number of digits is negative then it will be
rounded to the nearest multiple of ten. Table 34 will help to clarify
this concept.

Number Num Digits Result Notes


5678.1234 3 5678.123 3 decimal places
5678.1234 2 5678.12 2 decimal places
5678.1234 1 5678.1 1 decimal place
5678.1234 0 5678 Nearest whole number
5678.1234 -1 568 Nearest 10
5678.1234 -2 57 Nearest 100
5678.1234 -3 6 Nearest 1,000

Table 34: Rounding Places

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell P18, enter Rounded Value.


9.2 useful functions 463

3. In cell Q18, enter =ROUND(Q13,-4). This formula will


round the Total Value in cell Q13 to the nearest 10, 000.

4. When completed, cell Q18 should contain 4370000. This


number could be formatted with Excel’s formatting
tools to be easier to read.

5. Save the CH9-Contact workbook.

9.2.2.5 If

= IF(logical test, [value if true], [value if false])


The IF function fills a cell with some value based on the result of an
“if” decision. As an example of the IF function, a cell on the Contacts
worksheet will be used to indicate if the value of a contract is greater
than a specified threshold.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column M. The newly


inserted column becomes Column M.

3. In cell M1, enter Priority.

4. Adjust the width of Column M to properly display cell


M1.

5. In cell M2, enter =IF(L2>50000, ”High”, ”Low”). This


formula will check the value in cell L2 and if it is greater
than 50000 it will enter the word High in M2 otherwise
it will enter the word Low.

6. When completed, cell M2 should contain Low.

7. Copy cell M2 to M3:M10. Notice that if the value in Col-


umn L is greater than 50000 then Column M will display
High, otherwise it will display the word Low.

8. Commonly, IF functions are nested to get a more granu-


lar output. For this worksheet, to get a Priority (Column
M) of High, Med, or Low, the formula will need to be
adjusted.

9. In cell M2, enter =IF(L2>60000, ”High”, IF(L2>30000,


”Med”, ”Low”)). Here is an explanation of the formula:
• If the value in L2 is greater than 60, 000 then Excel
will print High and be done.
464 advanced topics

• If the value in L2 is less than or equal to 60, 000 then


Excel will check to see if it is greater than 30, 000. If
so, Excel will print Med.
• If the value in L2 is less than or equal to 30, 000,
Excel will print Low.

10. Copy the formula in M2 to M3:M101. Notice that some


values are flagged as High priority, some as Med priority,
and some as Low priority.

Figure 371: IF Formula for M2

9.2.2.6 SumIf/SumIfS

= SUMIF(range, criteria, [sum range])


= SUMIFS(sum range, range1, criteria1, [range2], [criteria2], ...)
These two functions will calculate a sum but only if certain speci-
fied criteria are true. The difference between the two functions is that
SUMIF can only have one criterion while SUMIFS can have two or
more criteria. Both functions are used in the following exercise.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell Q19, enter Low Pri Ttl.

3. In cell Q20, enter Low Pri 2018.

4. In cell Q21, enter High Pri Ttl.

5. In cell Q22, enter High Pri 2018.

6. In cell R19, enter =SUMIF($M$2:$M$101,


”Low”, $L$2:$L$101). This formula will find the total
value (Column L) for contracts that have Low priority
(Column M).
9.2 useful functions 465

7. In cell R20, enter =SUMIFS($L$2:$L$101,


$M$2:$M$101, ”Low”, $K$2:$K$101, 2018). This formula
will find the total value (Column L) for contracts that
have Low priority (Column M) and were signed in 2018
(Column K).

8. In cell R21, enter =SUMIF($M$2:$M$101,


”High”, $L$2:$L$101). This formula will find the total
value (Column L) for contracts that have High priority
(Column M).

9. In cell R22, enter =SUMIFS($L$2:$L$101,


$M$2:$M$101, ”High”, $K$2:$K$101, 2018). This formula
will find the total value (Column L) for contracts that
have High priority (Column M) and were signed in 2018
(Column K).

10. When completed, cell R19 should contain 616037.

11. When completed, cell R20 should contain 56504.

12. When completed, cell R21 should contain 2364510.

13. When completed, cell R22 should contain 149989.

Figure 372: SUMIF Formula for R23

14. Save the CH9-Contact workbook.

9.2.2.7 CountIf/CountIfS

= COUNT IF(range, criteria)


= COUNT IFS(range1, criteria1, [range2], [criteria2], ...)
These two functions will count the number of cells that meet speci-
fied criteria. The difference between the two functions is that COUN-
TIF can only have one criterion while COUNTIFS can have two or
more criteria. Both functions are used in the following exercise.
466 advanced topics

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell Q24, enter Low Pri Count.

3. In cell Q25, enter Low Pri 2018.

4. In cell Q26, enter High Pri Count.

5. In cell Q27, enter High Pri 2018.

6. In cell R24, enter =COUNTIF($M$2:$M$101, ”Low”).


This formula counts the number of contracts with a Low
priority (Column M).

7. In cell R25, enter =COUNTIFS($M$2:$M$101,


”Low”, $K$2:$K$101, 2018). This formula counts the
number of contracts with a Low priority (Column M) and
were signed in 2018 (Column K).

8. In cell R26, enter =COUNTIF(M2:M101, ”High”). This


formula counts the number of contracts with a High pri-
ority (Column M).

9. In cell R27, enter =COUNTIFS(M2:M101,


”High”, K2:K101, 2018). This formula will count the num-
ber of contracts with a High priority (Column M) and
were signed in 2018 (Column K).

10. When completed, cell R24 should contain 39.

11. When completed, cell R25 should contain 3.

12. When completed, cell R26 should contain 30.

13. When completed, cell R27 should contain 2.

Figure 373: COUNTIF Formula for R28


9.2 useful functions 467

9.2.2.8 Randbetween

= RANDBET WEEN(bottom, top)


It is common to need to generate a random number between two
other numbers, like a random number between 1 and 10, and the
RANDBETWEEN function makes that easy. For this exercise, assume
that each of the companies in the data set need to be randomly as-
signed to one of three groups for an advertising campaign. The eas-
iest way to do that is to assign a random number between one and
three to each of the companies.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. In cell O1, enter Campaign.

3. Adjust the width of Column O to properly display cell


O1.

4. In cell O2, enter =RANDBETWEEN(1,3). This formula


will enter a random number between one and three, in-
clusive, into cell O2.

5. Copy cell O2 to O2:O101. This will fill Column O with


random numbers between one and three.

6. Note, in Figure 374, the numbers in cells O2, O3, and


O4 were randomly assigned so the student’s work may
display different values in those cells.

Figure 374: RANDBETWEEN Formula for O2

One problem with the RANDBETWEEN function is that new ran-


dom numbers will be generated whenever any cell on the worksheet
is changed. This makes it impossible to come back to the column of
random numbers later and expect to find the same values. Follow
these steps to correct that shortcoming.
468 advanced topics

1. Select and copy O2:O101.

2. Paste Values to O2:O101. Note: it is important to paste


the values, not just a simple paste. Otherwise, O2:O101
will be filled with the RANDBETWEEN formula rather
than the value generated by that formula. Note: the val-
ues are being saved into the same cells that were used to
generate the values. This is a common way used to strip
a formula from a cell.

3. Save the CH9-Contact workbook.

9.2.2.9 Today/Now

= T ODAY()
= NOW()
These two functions insert the current date into a worksheet cell.
These functions must include the final parenthesis, even if they are
empty. The only difference between the two functions is that TODAY
inserts only the date while NOW inserts the date and time. Note:
the format for the date and time is determined by settings on the
computer. These functions are mostly used in the header or footer in
print settings.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column P. The newly


inserted column becomes Column P.

3. In cell P1, enter Contact Days (notice the underscore in


the entry).

4. Adjust the width of Column P to properly display cell


P1.

5. In cell P2, enter =VALUE(TODAY()-N2). This will sub-


tract the last contact date from today’s date to determine
how many days have passed since the last contact. Note:
Excel will automatically format cell P2 as a date since
TODAY() is in the formula, but VALUE makes Excel dis-
play the number of days instead of a date.

6. Copy P2 to P3:P101. Note, Figure 375 shows the num-


ber of days as of the date the image was captured, so the
student’s work will have a different number of days.
9.2 useful functions 469

Figure 375: Using the Today() Function

9.2.2.10 Date/DateDif

= DAT E(year, month, day)


= DAT EDIF(startd ate, endd ate, unit)
Excel stores dates as exceptionally large numbers and then calcu-
lates the displayed date as the number of days since January 1, 1900.
For example, January 1, 2020 is stored in Excel as 43831.
The DATE function converts a date in human-readable form to the
number that Excel uses. Thus, DATE(2020,01,01) will be converted to
43831.
The DATEDIF function calculates the difference in two dates. Ac-
cording to the Microsoft website, “Excel provides the DATEDIF func-
tion to support older workbooks from Lotus 1-2-3.” For some reason,
since Excel 2000, there has been no help in the Excel system for DATE-
DIF, but the function still works without any problems.
The Unit parameter in the DATEDIF function determines if the
difference in two dates is calculated in years (Y), months (M), or days
(D).

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column J. The newly


inserted column becomes Column J.

3. By default, Excel formats cells in an inserted column like


the cells in the column to the left of the new column.
Therefore, cell J2 is formatted as a date since I2 is a
date. This is normally appropriate, but for this exercise,
every cell in Column J needs to be formatted as General
rather than dates. Select Column J and then click Home
⇒ Number ⇒ Drop-Down Arrow ⇒ General to force
all cells in the entire column to display using the General
format.
470 advanced topics

4. In cell J1, enter Age.

5. In cell J2, enter =DATEDIF(I2,TODAY(),”Y”). This will


calculate the number of years between the birthday and
today’s date.

6. Copy J2 to J3:J101. Note, Figure 376 shows the age as


of the date the image was captured, but student work
may have a different age.

Figure 376: Using the Datediff() Function

7. It is appropriate to leave the formula in this column in-


stead of removing it as was done for other columns in
this exercise. That way, when the workbook is opened in
the future, the values in the Age column will be automat-
ically updated.

8. Adjust the width of Column J so all data is properly


displayed.

9.2.2.11 AND/OR

= AND(logical1, [logical2], ...)


= OR(logical1, [logical2], ...)
These two related functions test different logical conditions and
return either TRUE or FALSE depending on the outcome of the test.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column K. The newly


inserted column becomes Column K.

3. In cell K1, enter Sales.


9.2 useful functions 471

4. In cell K2, enter =AND(G2 = ”Sales”, J2 <40). This will


output TRUE if G2 contains Sales and J2 is less than 40.

5. Adjust the width of Column K to properly display the


value in K2.

6. Copy K2 to K3:K101.

Figure 377: Using the AND Function

7. Normally, AND and OR functions are combined with an


IF function to make the result more readable.

8. Change the formula in K2 to this: =IF(AND(G2 =


”Sales”, J2 <40),”Yes”,””). This will print Yes for lines
where the Role (Column F)is Sales and Age (Column J)
is less than 40 but print nothing otherwise.

9. Copy K2 to K3:K101. Now most cells in Column K will


be blank but a few will contain Yes where the contact is
in the sales department and the age is less than 40.

9.2.2.12 NOT

= NOT (logical)
This function will test different a logical condition and return either
TRUE or FALSE depending on the outcome of the test.

1. This exercise uses the Contacts worksheet in the Con-


tact workbook.

2. Insert a new column to the left of Column E. The newly


inserted column becomes Column E.

3. In cell E1, enter Common.


472 advanced topics

4. In cell E2, enter =NOT(D2=”Dr”). This will output


TRUE if E2 contains anything other than Dr.

5. Copy E2 to E3:E101.

Figure 378: Using the NOT Function

6. Change E2 to: =AND(NOT(D2=”Dr”),


NOT(D2=”Rev”)). This formula uses AND to look
for Salutations (Column D) that are not Dr AND not
Rev.

7. As one final improvement in the formula, change E2 to


=IF(AND(NOT(D2=”Dr”), NOT(D2=”Rev”)), ”Yes”, ””).
This will print Yes for lines where the Salutation (Col-
umn D) is anything other than “Dr” and “Rev” but print
nothing otherwise.

8. Copy E2 to E3:E101.

9. Adjust the width of Column E so all data is properly


displayed.

10. Save the CH9-Contact workbook.

11. Compare the workbook with the self-check answer key


(CH9-Contact Solution) and then close and submit the
CH9-Contact workbook as directed by the instructor.
9.3 statistics 473

Key Take-Aways

Useful Functions

• Excel includes hundreds of functions for both text and


numbers, but some are more generally useful than
others.
• Excel’s most useful text functions include To
Columns, Trim, Concatenate, Upper/Lower/Proper,
Left/Right/Mid, VLookup, and Index Match.
• Excel’s most useful number functions include Sum,
Average, Min/Max, Round, If, SumIf, CountIf, Rand-
Between, Today/Now, Date/DateDif, AND/OR, and
NOT.

9.3 statistics

Learning Objectives

• Use Correlation, Descriptives, and Histogram from


the Data Analysis pack.

9.3.1 Activating the Analysis Toolpak

Excel includes an Analysis Toolpak that contains 19 advanced statistics


and engineering functions, but it is considered an Add-in and must
be activated before it can be used. Most Excel users will never need
these types of statistics analysis tools, but they are available if needed.

1. Click File ⇒ Options.

Figure 379: The Options Button in the Backstage View

2. Click Add-ins in the left-hand menu of the Excel Options


pop-up box (see Figure 380).
474 advanced topics

3. Select Excel Add-ins in the drop-down menu at the bot-


tom of the Add-ins tab.

4. Click Go.

Figure 380: The Add-ins Manager

5. Click the checkbox beside Analysis Toolpak Add-in in the


Add-ins pop-up box.
9.3 statistics 475

Figure 381: Activating The Analysis Toolpak Add-In

6. Click OK.

Excel adds a new button at Data ⇒ Analysis ⇒ Data Analysis.

Figure 382: The Data Analysis Button

9.3.2 Working With Simple Statistics

1. Open workbook CH9-Stats.

2. Save the workbook as CH9-Cafe.

3. This workbook has only one worksheet, Cafe.


476 advanced topics

The Cafe worksheet contains 100 results of a survey of customers


in a small cafe. Note: this is dummy data created for this book.

9.3.2.1 Correlation

A fundamental statistical calculation is the correlation between two


variables. A correlation is a number between −1.0 and +1.0, where
0.0 means there is no correlation between the two variables and ei-
ther +1.0 or −1.0 means there is a perfect correlation. A positive cor-
relation means that as one variable increases the other also increases.
For example, as people age, they tend to weigh more so a positive
correlation would be expected between age and weight. A negative
correlation, on the other hand, means that as one variable increases
the other decreases. For example, as people age, they tend to run
slower so a negative correlation would be expected between age and
running speed. For the Cafe data, it would be reasonable to wonder if
there is some sort of relationship between the length of the meal and
the bill. Longer meals should correlate to higher bills, so a positive
correlation would be important for a researcher to know.

1. Excel 2016 Click Data ⇒ Analysis ⇒ Data Analysis.


(Note: the statistics functions are identical in Excel 2016
and Excel 365, but their group on the ribbon has a
slightly different name.)

2. Excel 365 Click Data ⇒ Analyze ⇒ Data Analysis. (Note:


the statistics functions are identical in Excel 2016 and
Excel 365, but their group on the ribbon has a slightly
different name.)

3. In the Data Analysis dialog box, select Correlation and


click OK.

Figure 383: Data Analysis Selection Box

4. The Correlation dialog box pops up.


9.3 statistics 477

Figure 384: Correlation Parameters

5. Input Range: $D$1:$I$100

6. Grouped By: Columns

7. Labels in First Row: Checked

8. Output: New Worksheet Ply: Corr

9. Click OK.

10. Excel creates a new worksheet named Corr that contains


a correlation table that displays the correlations between
the six variables contained in the selected range. Notice
that the correlation between Length and Bill is 0.611327,
which is strong. However, also note that the correlation
between PtySize (the number in the group) and Bill is
0.866466, which is much stronger. It would stand to
reason that a larger group of diners would generate a
higher bill.

Figure 385: Correlation Table


478 advanced topics

9.3.2.2 Descriptives

Descriptive statistics summarize a variable with multiple useful cal-


culations. Follow these steps to generate descriptives for Age.

1. Click the Cafe worksheet to open it.

2. Click Data ⇒ Analysis ⇒ Data Analysis.

3. In the Data Analysis dialog box, select Descriptive Statis-


tics and click OK.

4. The Descriptive Statistics dialog box pops up.

Figure 386: Descriptive Statistics Parameters

5. Input Range: $F$1:$F$100

6. Grouped By: Columns

7. Labels in First Row: Checked

8. Output: New Worksheet Ply: Descriptives

9. Summary Statistics: Checked

10. Click OK.

11. Excel creates a new worksheet named Descriptives that


contains a table that displays various descriptive statis-
tics for Age. For example, the mean age is 41.47475.
9.3 statistics 479

Figure 387: Descriptive Statitics

9.3.2.3 Histogram

A histogram is a graphic representation of a numeric variable. For a


histogram, the values are placed in “bins” and the number in each
bin is counted and graphed.

1. Click the Cafe worksheet to open it.

2. Click Data ⇒ Analysis ⇒ Data Analysis.

3. In the Data Analysis dialog box, select Histogram and


click OK.

4. The Histogram dialog box pops up.

Figure 388: Histogram Parameters

5. Input Range: $F$1:$F$100


480 advanced topics

6. Bin Range: leave blank

7. Labels: Checked

8. Output: New Worksheet Ply: Histogram

9. Chart Output: Checked

10. Click OK.

11. Excel creates a new worksheet named Histogram that


contains a table that displays the counts for each age
“bin.” For example, 15 people were between the ages
of 36 and 40 (inclusive). Also, the histogram graph is
displayed for a quick view of how the age data is dis-
tributed.

12. Save the CH9-Cafe workbook.

13. Compare the workbook with the self-check answer key


(CH9-Cafe Solution) and then close and submit the CH9-
Cafe workbook as directed by the instructor.

Figure 389: Histogram of Age

Key Take-Aways

Statistics

• A correlation numerically describes the relationship


between two variables.
• Descriptives create numerous statistics for a variable.
• A histogram graphically represents the distribution
for a numeric variable.
9.4 macros 481

9.4 macros

Learning Objectives

• Automate simple tasks with a macro.

View ⇒ Macros ⇒ Macros allows users to automate repetitive tasks.


The top part of the button will open the View Macros dialog box and
the bottom half reveals options for macros.

1. Open a new blank workbook. (Note: the macro is placed


in a new workbook, so it does not accidentally interfere
with the exercises in any other workbook.)

2. Click A1 to select that cell.

3. Click View ⇒ Macros ⇒ Macros (be sure to click the


small arrow at the bottom of the Macros button).

4. Select Use Relative References.

5. In the same popup, select Record Macro.

6. Name the macro MyName (note, macro names cannot


contain spaces).

7. Click in the Shortcut Key box and type Q (this is a capital


Q).

8. Store the macro in this workbook.

9. Enter this description: Inserts my name.

Figure 390: The Record Macro Settings Box


482 advanced topics

10. Click OK.

11. Type your first and last name and press Enter .

12. Click View ⇒ Macros ⇒ Macros (be sure to click the


small arrow at the bottom of the Macros button).

13. Click Stop Recording.

Select another cell on the worksheet and press Ctrl + Shift + Q .


Remember that relative references were activated for the macro, other-
wise the name would have always been created in cell A1 (the original
cell) instead of the current cell.

1. Click View ⇒ Macros ⇒ Macros (be sure to click the


top of the Macros button).

2. This opens the Macro Manager dialog box where macros


can be edited, deleted, or have various options set.

Figure 391: The Macro Manager Box

3. Click Cancel to close the Macro manager.

Remember that all workbooks containing macros must be saved us-


ing the “macro-enabled” option (that creates a file extension of .xlsm).
9.5 excel preferences 483

Figure 392 shows a drop-down menu at the bottom right corner of the
Save-As screen where Excel Macro-Enabled Workbook must be selected.

Figure 392: Saving a Workbook With a Macro

Since this macro will not be reused in the future, close the work-
book without saving.

Key Take-Aways

Using Excel Macros

• Macros automate simple tasks to save time in data


entry.
• Workbooks containing macros must be saved with the
“Macro-Enabled” setting.

9.5 excel preferences

Learning Objectives

• Explore and optionally change Excel preferences.

Like all Microsoft Office products, Excel has scores of preferences


and this section lists those that are most adjusted by users.
To find the preferences, click File ⇒ Options.
484 advanced topics

Figure 393: The Backstage Options Button

The Options area is divided into 11 different tabs and each tab
includes settings for many preferences. Here is a brief overview of
the different option tabs.

Category Settings
These are the commonly modified settings, such
General
as the interface, user name, and Start screen.
Settings to control calculations, error-checking,
Formulas
and formulas.
Proofing Options for spell-check and auto-correct.
Settings that govern saving, autorecovery, and
Save
web server options.
Chose the primary and other languages used for
Language
editing, tooltips, and help.
Settings that concern accessibility, including an
Ease of Access accessibility checker and various settings for
sounds and font.
Numerous settings that are not often changed,
Advanced
divided into five areas.
Customize Add and remove items from the ribbon, also
Ribbon rearrange or rename the ribbon tabs and groups.
Add and remove items from the Quick Access
Quick Access
Toolbar, rearrange the toolbar, and specify its
Toolbar
location.
Add-ins Activate or remove various add-ins.
Manage certificates and other Excel security
Trust Center
features.

Table 35: Summary of Excel Options

It is not the intent of this book to describe every possible preference


but following is a list of those that users commonly modify.
9.5 excel preferences 485

9.5.1 General

enable live preview When changing visual items, like fonts or


colors, this previews the change live in the current sheet. This
can get annoying, so some users turn it off.

screen tip style Screen tips are the pop-up boxes with brief help
for the various buttons on the ribbon. Some users find these
distracting and the can be turned off with this setting.

use this as the default font Use this to change the default font
used in new workbooks. Also, the default font size can be set if
a larger size is needed.

include this many sheets New workbooks include three blank


worksheets by default, but that number can be changed here.
Often, one worksheet is enough for new workbooks and then
other worksheets can added as needed.

user name This is the author’s name that is saved with the work-
book.

show the start screen when this application starts Uncheck


this box to turn off the start screen.

collapse the ribbon automatically Checking this box will au-


tomatically collapse the ribbon into a menu to save space on the
screen. The ribbon will drop down when any of the menu items
are clicked. It is also easy to pin the ribbon open while working.

9.5.2 Formulas

reset ignored errors Sometimes users have Excel ignore errors


as they are developing a worksheet. This button will reset the
ignored errors, so all errors are again displayed.

9.5.3 Proofing

This tab includes the various settings for spell-check, like ignore up-
percase words. It also includes the Autocorrect options. Normally, the
default settings for these items is adequate but that can be changed
at this tab.

9.5.4 Save

save autorecover information every Set how often Excel au-


tosaves a workbook. The default is 10 minutes, but that can be
decreased if desired.
486 advanced topics

default local file location This is the default location for files
on initial save or a “Save As” operation.

9.5.5 Language

Excel uses the Windows system language and that is normally accept-
able. However, this tab makes it possible to change the default Office
language for both viewing and editing.

9.5.6 Ease of Access

This tab makes several accessibility options available.

9.5.7 Advanced

after pressing enter, move selection By default, Excel moves


the selector (active cell) down when the enter key is pressed, but
some users prefer the selector to move right and that can be set
here.

show this number of recent workbooks When Excel opens,


it displays the file names for recently opened workbooks. Use
this preference to set the number of recent workbooks to display.
The default (and maximum number) is 50.

ruler units Most Americans are comfortable using inches on the


ruler, but Excel can also use metric units. The unit used is set
with this preference.

at startup, open all files in Specify a folder on the hard drive


and any Excel files in that folder will be automatically opened
when Excel starts. This is a great timesaver while working on a
project for several weeks where the same Excel files need to be
opened.

9.5.8 Customize Ribbon

The ribbon is highly customizable from this tab. Users can add/re-
move items from the ribbon, change the order of the items on the rib-
bon, create new groups, rename items, and generally whatever they
want to do to make the ribbon work best for themselves. Customiza-
tions can even be exported in a file that can be imported on another
computer so users can make Excel on all the computers they use look
the same.
In addition to the customizations on this tab, the General Tab in-
cludes an option to collapse the ribbon automatically.
9.5 excel preferences 487

9.5.9 Quick Access Toolbar

The Quick Access Toolbar is one of the most useful Excel feature.
Users can add links to their most often used Excel functions, so they
are easily available without clicking on any ribbon links. The Quick
Access Toolbar is set up with the links the user wants. Optionally, the
Quick Access Toolbar can be moved to under the ribbon.
The Quick Access Toolbar is found at the upper left side of the Ex-
cel screen above the Ribbon, as shown in Figure 394. This area pro-
vides access to the most frequently used commands, such as Save and
Undo. The Quick Access Toolbar can be customized by activating com-
mands that are extensively used or inactivating commands that are
not needed. By placing these commands in the Quick Access Toolbar,
it is not necessary to navigate through the Ribbon to find them. To
customize the Quick Access Toolbar, click the down arrow as shown
in Figure 394. This will open a menu of commonly used commands
that can be added to the Quick Access Toolbar by checking them. If
the desired command is not on the list, select the More Commands op-
tion, which opens a screen containing every command on the ribbon.
As an additional modification, the Quick Access Toolbar and be placed
below the ribbon by clicking Show Below the Ribbon and many users
prefer it in that location.

Figure 394: Modifying the Quick Access Toolbar

9.5.10 Add-ins

Any add-ins present in Excel can be activated/deactivated from this


tab.
488 advanced topics

9.5.11 Trust Center

Users can check security certificates or other security settings on this


tab.

Key Take-Aways

Preferences

• Excel includes scores of options that users can change


according to their individual preferences.

9.6 just for fun

Excel has had a long and expansive lifetime. It should not be surpris-
ing that along the way people who use Excel would find interesting
things to do with Excel that are not exactly in the users’ manual. This
final section of the book lists a few of the fun facts about Excel along
with the things people have done with this versatile application.

9.6.1 Interesting Bug

Excel started as a competitive product for Lotus 123. Unfortunately,


Lotus 123 counted the year 1900 as a leap year, though it was not.
When Excel was first created, Microsoft decided to use the same serial
numbering convention for storing dates so the two programs were
compatible; but that meant the year 1900 was also listed as a leap year
in Excel. While this would have been a very easy bug to correct, that
would mean that every date after Feb 29, 1900 would have been one
day off. For this reason, Microsoft decided to leave that leap day in the
program. Consequently, to this day, Feb 29, 1900 exists in Excel even
though there was never a Feb 29, 1900 on the calendar. (Reference:
https://www.datarails.com/6-cool-facts-excel/)

9.6.2 Renaming Genes

Some genes had to be renamed since Excel automatically formatted


the original names as dates. For example, there is a gene that was orig-
inally named MARCH1 (for Membrane Associated Ring-CH-Type
Finger 1), but whenever MARCH1 is entered in Excel it is format-
ted as a date. As a result, the HUGO Gene Nomenclature Committee
changed the name of this gene to MARCHF1. 27 other genes with the
same problem were renamed. (Reference: https://www.engadget.com
/scientists-rename-genes-due-to-excel-151748790.html)
9.7 chapter practice 489

9.6.3 Art with Excel

Tatsuo Horiuchi, a 73-year-old Japanese artist, creates some of the


most impressive still life art using only Excel as his canvas. Examples
of his work, along with a brief explanation of how he creates them,
can be found at https://www.demilked.com/73-year-old-excel-painti
ngs-tatsuo-horiuchi/.

Figure 395: Mr. Horiuchi’s Art

9.6.4 Excel and Sudoku

For fans of Sudoku, Peter Mladek created an Excel workbook with


macros that can create endless Sudoku puzzles. While loading Excel
workbooks containing macros found on the web can be risky, this
workbook has been around since 2004 and been used by countless
thousands of people; so it would be reasonable to trust it. The free
version builds a puzzle and optionally fills the cells with possible so-
lutions. Registering the workbook for $ 9.99 opens advanced features
that include a solution aid and puzzle creator. Sudoku fans should
check out http://www.sudoku-xls.com/ for more information.

9.7 chapter practice

9.7.1 Cars Analysis

This exercise uses data on 392 car models that was collected by David
Donoho and Ernesto Ramos for the 1982 Exposition of Statistical Graph-
ics Technology hosted by the Committee on Statistical Graphics of the
American Statistical Association (ASA). The dataset is commonly used
in statistics classes and can be found at several online locations, in-
cluding https://github.com/sandialabs/slycat-data.

1. Start Excel and open a new blank workbook.


490 advanced topics

2. Save the workbook as PR9-Cars.

3. Excel 2016 Load the data.


a) Click Data ⇒ Get External Data ⇒ From Text.
b) Navigate to PR9-Data.csv.
c) Click the file name and then Import.
d) Work through the import wizard.
i. The data in the CSV file has headers.
ii. The data uses a comma delimiter.
iii. Import the data into a new worksheet.
e) Click cell A1 then click Insert ⇒ Tables ⇒ Table.
f) The Create Table dialog box has the correct defaults,
so click OK.
g) Click Yes on the dialog box with the warning about
overlapping “external data ranges” to complete the
data import.

4. Excel 365 Load the data.


a) Click Data ⇒ Get & Transform Data ⇒ From Tex-
t/CSV.
b) Navigate to PR9-Data.csv.
c) Click the file name and then Import.
d) Excel correctly identifies the data fields in the file,
so click Load to import the data into a table in a
new worksheet.

5. Delete Sheet1.

6. Rename Sheet2 to Cars.

7. Click A1 to activate the table.

8. In Table Design ⇒ Properties ⇒ Table Name, enter


Cars.

9. Even though the data loads properly, there are a few


adjustments that need to be made. First, the Origin col-
umn only lists three different locations by number, but
these should be changed to their text equivalent for eas-
ier analysis.
a) Click the down-arrow on the right side of the Origin
column header for Column I.
9.7 chapter practice 491

b) Uncheck all items except 1 and then click OK.

Figure 396: Filtering for Location 1

c) All rows that do not contain a 1 for Origin are hid-


den.
d) Enter American in I3 (the cell at the top of the col-
umn after rows have been hidden).
e) Copy/paste I3 to all other visible cells in Column
I. Note: using the autofill handle makes this task
easier.
f) Click the filter symbol on the right side of the Ori-
gin column header for Column I.
g) Uncheck all items except 2 and then click OK.
h) All rows that do not contain a 2 for Origin are hid-
den.
i) Enter European in I2 (the cell at the top of the col-
umn after rows have been hidden).
j) Copy/paste I2 to all other visible cells in Column
I. Note: using the autofill handle makes this task
easier.
k) Click the filter symbol on the right side of the Ori-
gin column header for Column I.
492 advanced topics

l) Uncheck all items except 3 and then click OK.


m) All rows that do not contain a 3 for Origin are hid-
den.
n) Enter Japanese in I4 (the cell at the top of the col-
umn after rows have been hidden).
o) Copy/paste I4 to all other visible cells in Column
I. Note: using the autofill handle makes this task
easier.
p) Click the filter symbol on the right side of the Ori-
gin column header for Column I.
q) Check (Select All) then OK to reveal all rows in the
data set.
r) Adjust the width of Column I to fit the data.
s) Save the PR9-Cars workbook.

10. Next, data in the Model column needs to be split out so


the automobile make and model are separated.
a) Insert a column to the left of Column B. The new
column becomes Column B with a header of Col-
umn1.
b) Enter this formula in B2:
=PROPER(LEFT(A2,FIND(” ”,A2)-1)). If Excel
does not paste that formula to the bottom of the
table, then copy/paste it to B3:B393. Excel extracts
the make of the car, which is the first word in
Column A.
c) Adjust the width of Column B to fit the data.
d) Insert a column to the left of Column C. The new
column becomes Column C with a header of Col-
umn2.
e) Copy B2:B393.
f) Paste Values to C2. Note: it is important to paste the
values, not just a simple paste. Otherwise, Column
C will be filled with the formula rather than the
value generated by that formula.
g) Delete Column B.
h) Insert a column to the left of Column C. The new
column becomes Column C with a header of Col-
umn3.
9.7 chapter practice 493

i) Enter this formula in C2:


=PROPER(RIGHT(A2,LEN(A2)-FIND(” ”,A2))). If
Excel does not paste that formula to the bottom
of the table, then copy/paste it to C3:C393. Excel
extracts the model of the car, which is everything
except the first word in Column A.
j) Insert a column to the left of Column D. The new
column becomes Column D with a header of Col-
umn4.
k) Copy C2:C393.
l) Paste Values to D1. Note: it is important to paste
the values, not just a simple paste. Otherwise, Col-
umn D will be filled with the formula rather than
the value generated by that formula.
m) Delete Column C.
n) At this point, the data in Column A should be split
between Column B and Column C.
o) Delete Column A.
p) Enter Make in A1.
q) Enter Model in B1.

11. Click the filter symbol on the right side of the Make col-
umn header for Column A.

12. Select Sort A to Z.

13. Adjust the width of Column A and Column B to fit the


data.

14. The data preparation is complete so save the PR9-Cars


workbook.

Once a data table is prepared it can be used for analysis. For this
exercise, several different analysis techniques are used.

1. Create a new worksheet and name it Summary.


2. Move Summary to the left of Cars so it is the first work-
sheet in the workbook.
3. Click the Summary tab to activate that sheet.
4. Select A1:G1 and click Home ⇒ Alignment ⇒ Merge &
Center.
5. In cell A1, enter Automobile Statistics.
494 advanced topics

6. Format cell A1.


• Calibri font, 18 pt
• Bold style
• Font color: Orange, Accent 2, Darker 25%

7. In cell E3, enter Cylinders.

8. In cell E4, enter 4.

9. In cell F3, enter Year.

10. In cell F4, enter 71.

11. In cell B3, enter Max MPG, Cyl 4, Yr 71.

12. Adjust the width of Column B to fit the text in B3.

13. In cell C3, enter =DMAX(Cars[#All], ”MPG”,


$E$3:$F$4).

14. Excel reports 35 as the maximum MPG for 1971 cars


with 4 cylinders.

Figure 397: Calculating the Max MPG

15. In cell B4, enter Avr MPG, Cyl 4, Yr 71.

16. In cell C4, enter =DAVERAGE(Cars[#All], ”MPG”,


$E$3:$F$4).

17. Excel reports 25.66667 as the average MPG for 1970 cars
with 4 cylinders.

18. In cell F4, enter 72. Notice that Excel automatically up-
dates C3 and C4 to reflect the values for 1972 cars.

19. In cell F4, enter 71 to change back to that year and match
the labels in B3 and B4.

20. In cell B5, enter Avr MPG, Cyl 4-6, Yr 71.

21. In cell E5, enter 6


9.7 chapter practice 495

22. In cell F5, enter 71.

23. In cell C5, enter =DAVERAGE(Cars[#All], ”MPG”,


$E$3:$F$5).

24. Excel reports 23.8 as the average MPG for 1971 cars with
4 or 6 cylinders.

Excel reads the criteria range such that items in a single row are
joined with an “AND” and multiple rows are joined with an “OR.”
Thus, the criteria in E3:F5 reads (Cars with 4 cylinders AND year 71)
OR (Cars with 6 cylinders AND year 71). Complex Boolean conditions
can be specified using multiple rows and columns.
If a cell in a criteria range is empty, then Excel matches it to all
entries in the data table.

1. Delete the data in F5. Notice that the value in C5


changes to 20.94526. The criteria in this case reads (Cars
with 4 cylinders AND year 70) OR (Cars with 6 cylinders
AND all model years.

2. In cell F5, enter 71.

3. In cell G3, enter Origin.

4. In cell G4, enter American.

5. In cell B6, enter Avr MPG, Cyl 6, Yr 71, American.

6. Adjust the width of Column B to fit the text in B6.

7. In cell C6, enter =DAVERAGE(Cars[#All], ”MPG”,


$E$3:$G$4).

8. Excel reports 24.75 as the average MPG for 1971 cars


with 4 cylinders made in America.

9. Complete the summary worksheet using the following


information. Adjust the width of Column B as necessary
to display the text entered there.
496 advanced topics

Cell Content
B7 Max MPG, American
C7 =DMAX(Cars[#All],”MPG”,$G$3:$G$4)
F8 Year
G8 Origin
F9 < 76
G9 American
B8 Min MPG, Yr<76, American
C8 =DMIN(Cars[#All],”MPG”,$F$8:$G$9)
F10 < 76
G10 European
B9 Avr MPG, Yr<76, American or European
C9 =DAVERAGE(Cars[#All],”MPG”,$F$8:$G$10)

The Figure 398 shows the Summary Table at this point, but it could
easily be extended with various combinations of criteria to extract
whatever information is desired from the cars data.

Figure 398: Summary Table

1. Save the PR9-Cars workbook.

2. Click in B12 to activate that cell.

3. Click Data ⇒ Analyze ⇒ Data Analysis.

4. Select Correlation in the Data Analysis dialog box, then


click OK.
9.7 chapter practice 497

Figure 399: Data Analysis Popup

5. Enter the following in the Correlation dialog box.


• Input Range: ’Cars’!$C$1:$H$393
• Grouped By: Columns
• Labels in first row: Checked
• Output Range: $B$12

Figure 400: Correlation Parameters

6. Click OK.

7. Adjust the column widths so all information in Row 12


is visible.

8. Excel calculates the various correlations and displays


them in B12:H18. There are several rather extreme cor-
relations in the table, but all would be expected. For
example, the correlation between weight and MPG is
−0.83224, so heavier cars get fewer miles per gallon.
498 advanced topics

Figure 401: Correlation Results

9. Click in B21 to activate that cell.

10. Click Data ⇒ Analyze ⇒ Data Analysis.

11. Select Histogram in the Data Analysis dialog box, then


click OK.

12. Enter the following in the Histogram dialog box.


• Input Range: ’Cars’!$C$1:$C$393
• Labels: Checked
• Output Range: $B$21
• Chart Output: Checked

Figure 402: Histogram Parameters

13. Click OK.

14. Excel displays the histogram data and chart.

15. Adjust the chart so the top left corner is in D22 and the
bottom right corner is in K38.

16. Using the Chart Elements selector, remove the legend


from the histogram.

17. Change the title of the histogram to Automobile MPG.


9.8 scored assessment 499

18. Change the X-Axis title to MPG.

Figure 403: Histogram Results

19. Save the PR9-Cars workbook.

20. Compare the workbook with the self-check answer key


(PR9-Cars Solution) and then close and submit the PR9-
Cars workbook as directed by the instructor.

9.8 scored assessment

9.8.1 Weather Analysis

The National Oceanic and Atmospheric Administration (NOAA) makes


all their weather data available for researchers to investigate.1

1. Open workbook SC9-Data.

2. Save the workbook as SC9-Climate.

This workbook has two worksheets. The Data sheet contains the
raw data that will be analyzed for this exercise and the Notes sheet
contains definitions for the abbreviations used on the Data sheet.

1. Calculate the number of hours of daylight for each day.


a) Insert a new column to the left of Column N.

1 The data for this exercise was downloaded and adapted from https://www.ncdc.n
oaa.gov/cdo-web/.
500 advanced topics

b) In cell N1, enter Daylight.


c) In cell N2, enter =M2-L2.
d) Copy/paste N2 to N3:N363.
e) Click Home ⇒ Number ⇒ Down Arrow ⇒ More
Number Formats.
f) In the Format Cells dialog box, select Time in the
Category list and then select 37:30:55 in the Type
list. This will format the data in Column N to the
number of hours/minutes elapsed between sunrise
and sunset.

Figure 404: Formatting The Daylight Column

2. Use the following steps to convert the data to a table.


a) Click in A1 to activate that cell.
b) Click Insert ⇒ Tables ⇒ Table.
c) Excel will automatically select the entire data set,
$A$1:$O$363. Be sure My table has headers is
checked.
d) Click OK.
e) Name the table Climate.
9.8 scored assessment 501

Figure 405: Climate Table Name

3. Create a new worksheet and name it Summary.

4. Move Summary to the left of Data so it is the first work-


sheet in the workbook.

5. Click the Summary tab to activate that sheet.

6. Select A1:G1 and click Merge & Center.

7. In cell A1, enter 2019 Ft Huachuca Climate Information.

8. Format cell A1.


• Calibri font, 18 pt
• Bold style
• Font color: Blue, Accent 1

9. In cell B3, enter Date. (Note: this will be the starting


date for formulas on this sheet, but the title in B3 must
match the field name on the Climate table.)

10. In cell C3, enter Date. (Note: this will be the ending date
for formulas on this sheet, but the title in C3 must match
the field name on the Climate table.)

11. In cell B4, enter >= 1/1/2019 (Note: do not leave spaces
in this formula).

12. In cell C4, enter <= 1/31/2019 (Note: do not leave


spaces in this formula).

13. In cell B5, enter Max Temp.


502 advanced topics

14. Adjust the width of Column B and Column C so every-


thing is visible.

15. In cell C5, enter this formula: =DMAX(Climate[#All],


”TMAX”, $B$3:$C$4).

16. Cell C5 will display 72, which is the greatest TMAX for
January, 2019.

Figure 406: Maximum January Temperature

17. Change the dates to >= 3/1/2019 and <= 3/31/2019 to


find that the maximum March temperature is 82.

18. Change the dates back to >= 1/1/2019 and <=


1/31/2019 to complete the other activities on the sum-
mary sheet.

19. In cell B6, enter Min Temp.

20. In cell C6, enter this formula: =DMIN(Climate[#All],


”TMIN”, $B$3:$C$4).

21. Cell C6 will display 21, which is the least TMIN for Jan-
uary, 2019.

22. In cell B7, enter Precipitation. (The width of Column B


may need to be changed to see the word Precipitation.)

23. In cell C7, enter this formula: =DSUM(Climate[#All],


”PRCP”, $B$3:$C$4).

24. Cell C7 will display 0.9, which is the total precipitation


for January, 2019.

25. In cell B8, enter Wind Speed.

26. In cell C8, enter this formula: =DAVER-


AGE(Climate[#All], ”AWND”, $B$3:$C$4).

27. Cell C8 will display 8.002258065, which is the average


wind speed for January, 2019.
9.8 scored assessment 503

28. To make C8 easier to read, click Home ⇒ Number ⇒


Decrease Decimal to reduce C8 to two decimal places,
8.00.

29. In cell B9, enter Max Wind.

30. In cell C9, enter this formula: =DMAX(Climate[#All],


”WSF5”, $B$3:$C$4).

31. Cell C9 will display 42.90, which is the greatest wind


gust for January, 2019.

32. Copy/paste B3:C4 to B11:C12.

33. In cell D11, enter Moon.

34. In cell D12, enter New.

35. In cell C12, enter <= 12/31/2019.

36. In cell B13, enter Coldest New Moon. (The width of Col-
umn B may need to be changed to see the words Coldest
New Moon.)

37. In cell C13, enter this formula: =DMIN(Climate[#All],


”TMIN”, $B$11:$D$12).

38. Cell C13 will display 32, which was the coldest temper-
ature recorded on a night with a new moon in 2019.

39. Copy/paste B11:D12 to B15:D16.

40. In cell D15, enter DailyWeather (Note: there is no space


between the two words).

41. In cell D16, enter *TS*. Note: the asterisks are “wild-
card” characters and will create a match on any cell that
contains TS somewhere in the cell.

42. In cell B17, enter Largest Storm.

43. In cell C17, enter this formula: =DMAX(Climate[#All],


”PRCP”, $B$15:$D$16).

44. Cell C17 will display 2.32, which was the most rainfall
on a day that recorded thunder in 2019.
504 advanced topics

Figure 407: Various Summary Statistics

45. Save the SC9-Climate workbook.

Next, create a chart that shows the amount of daylight throughout


the year. (Note: the process for creating charts is covered in more
detail in Chapter 4, page 187.)

1. Click the Data worksheet to activate it.

2. Click the top of Column N to activate that column.

3. Click Insert ⇒ Charts ⇒ Insert Line or Area Chart.

4. In the Line Chart dialog box, select the first option, 2-D
Line.

5. Excel will create a line chart that shows the amount of


daylight throughout the year.
9.8 scored assessment 505

Figure 408: Daylight Chart: Start

6. Right-click the chart and select Move Chart. Move it as


an object in the Summary worksheet.

Figure 409: Daylight Chart: Moving to Summary Worksheet

7. Drag/drop the chart so the top-left corner is about at the


center of cell B20.

8. By default, the horizontal axis simply counts the number


of entries from 1 to 363, but it should display the dates
found in Column A.

9. Click the chart area to display the three buttons on the


right side of the chart. Click the Chart Filters button,
which looks like a funnel.
506 advanced topics

Figure 410: Daylight Chart: Chart Filters

10. Notice that the Categories filter is just a list of numbers,


starting at one. Click the Select Data button at the bot-
tom right corner of the Values dialog box. The Select Data
Source dialog box appears.

Figure 411: Daylight Chart: Select Data Source

11. Click Edit for the Horizontal (Category) Axis Labels. That
button is marked in Figure 411.

12. Enter =Data!$A$2:$A$363 for the Axis label range.


9.8 scored assessment 507

Figure 412: Daylight Chart: Axis Labels

13. Excel changes the labels for the X-Axis to the dates found
in Column A of the Data worksheet. Click OK on the
Select Data Source dialog box to finish this selection.

14. To adjust the scale for the Y-Axis (the hours of daylight),
right-click on the vertical axis values and select Format
Axis.

15. In the Format Axis dialog box, enter 0.35 for the Minimum
Bounds (the Maximum Bounds will automatically adjust).

Figure 413: Daylight Chart: Adjusting Y-Axis Scale

16. Save the SC-Climate workbook.

17. Close and submit the SC9-Climate workbook as di-


rected by the instructor.
Part IV

APPENDIX

This part contains additional information about Excel that


is outside the scope of the Center for Lifelong Learning
class.
FUNCTION QUICK REFERENCE
a
According to Microsoft’s specification sheet for Excel, there are 341
worksheet functions. No user needs to be familiar with all of these
functions, but this appendix lists those found in this book, which are
the most commonly used.

a.1 and

Returns TRUE if all of its arguments evaluate to TRUE and FALSE if


one or more arguments evaluate to FALSE.
Syntax:
AND(logical1, [logical2], ...)

logical1 Required. The first condition to be tested that can


evaluate to either TRUE or FALSE.

logical2, ... Optional. Additional conditions to be tested that


can evaluate to either TRUE or FALSE, up to a maximum
of 255 conditions.

Example:
Consider the worksheet illustrated in Figure 414.

Figure 414: AND Example Worksheet

If the following function were entered in cell E2:


=AND(B2>1,B2<10)
it would return TRUE.

a.2 average

Returns the average (arithmetic mean) of the arguments.

511
512 function quick reference

Syntax:
AVERAGE(number1, [number2], ...)

number1 Required. The first number, cell reference, or range


for which you want the average.

number2, ... Optional. Additional numbers, cell references or


ranges for which you want the average, up to a maximum
of 255.

Example:
Consider the worksheet illustrated in Figure 415.

Figure 415: AVERAGE Example Worksheet

If the following function were entered in cell E2:


=AVERAGE(B2:B5)
it would return 5.75.

a.3 concatenate

Joins two or more text strings into one string. IMPORTANT: This
function was replaced with CONCAT in Excel 365, but the syntax is
the same for both functions.
Syntax:
CONCATENATE(text1, [text2], ...)

text1 Required. The first item to join. The item can be a text
value, number, or cell reference.

text2, ... Optional. Additional text items to join. You can have
up to 255 items, up to a total of 8,192 characters.

Example:
Consider the worksheet illustrated in Figure 416.
a.4 count 513

Figure 416: CONCATENATE Example Worksheet

If the following function were entered in cell E2:


=CONCATENATE(A2,A4)
it would return NorthEast.

a.4 count

Counts the number of cells that contain numerical values. Cells with
non-numeric content are ignored.
Syntax:
COUNT(value1, [value2], ...)

value1 Required. The first item, cell reference, or range within


which the cells containing numbers must be counted.

value2, ... Optional. Up to 255 additional items, cell references,


or ranges within which the cells containing numbers must
be counted.

Example:
Consider the worksheet illustrated in Figure 417.

Figure 417: COUNT Example Worksheet

If the following function were entered in cell E2:


=COUNT(B2:B5)
it would return 4.
514 function quick reference

a.5 countif

Counts the number of cells that meet a criterion.


Syntax:
COUNTIF(range, criteria)

range Required. The group of cells to count. Range can con-


tain numbers, arrays, a named range, or references that
contain numbers. Blank and text values are ignored.

criteria Required. A number, expression, cell reference, or


text string that determines which cells will be counted.

Example:
Consider the worksheet illustrated in Figure 418.

Figure 418: COUNTIF Example Worksheet

If the following function were entered in cell E2:


=COUNTIF(B2:B5,”>5”)
it would return 2.

a.6 countifs

Applies criteria to cells across multiple ranges and counts the number
of times all criteria are met.
Syntax:
COUNTIFS(range1, criteria1, [range2, criteria2], ...)

range1 Required. The first range in which to evaluate the as-


sociated criteria.

criteria1 Required. The criteria in the form of a number, ex-


pression, cell reference, or text string that determines which
cells will be counted.

range2, criteria2, ... Optional. Additional ranges and cri-


teria. Up to 127 range/criteria pairs are allowed.
a.7 date 515

Example:
Consider the worksheet illustrated in Figure 419.

Figure 419: COUNTIFS Example Worksheet

If the following function were entered in cell E2:


=COUNTIFS(B2:B5,”>3”,B2:B5,”<8”)
it would return 2.

a.7 date

Combines three separate values to form a date.


Syntax:
DATE(year,month,day)

year Required. The value of the year argument can include one
to four digits. Excel interprets the year argument accord-
ing to the date system the computer is using.

month Required. An integer representing the month of the


year from 1 to 12 (January to December).

day Required. An integer representing the day of the month


from 1 to 31.

Example:
If the following function were entered in cell A1:
=DATE(2020,3,4)
it would return the date 3/4/2020 formatted according to the
settings on the local computer.

a.8 datedif

Calculates the number of days, months, or years between two dates.


Warning: Excel provides the DATEDIF function in order to support
older workbooks from Lotus 1-2-3. The DATEDIF function may cal-
culate incorrect results under certain scenarios.
516 function quick reference

Syntax:
DATEDIF(start date,end date,unit)

start date Required. A date that represents the first, or start-


ing date of a given period. Dates may be entered as text
strings within quotation marks (for example, “1/30/2001”)
or as the result of other formulas or functions.

end date Required. A date that represents the last, or ending,


date of the period.

unit Required. The type of information to be returned. “Y” is


the number of complete years in the period, “M” is the
number of complete months in the period, “D” is the num-
ber of complete days in the period.

Example:
Consider the worksheet illustrated in Figure 420.

Figure 420: DATEDIF Example Worksheet

If the following function were entered in cell C2:


=DATEDIF(A1,A2,”Y”)
it would return 65. This is how a person’s age can be calculated
with Excel.

a.9 if

Makes logical comparisons between a value and what was expected.


This is one of the most popular Excel functions.
Syntax:
IF(logical test, value if true, [value if false])

logical test Required. The condition being tested.

value if true Required. The value returned if the result of


logical test is TRUE.

unit Optional. The value returned if the result of logical test is


FALSE.
a.10 index 517

Example:
Consider the worksheet illustrated in Figure 421.

Figure 421: IF Example Worksheet

If the following function were entered in cell E2:


=IF(C2>15000,”Bonus”,”Regular”)
it would return Bonus.

a.10 index

Returns a value or the reference to a value from within a table or


range.
Syntax:
INDEX(array, row num, [column num])
array Required. A range of cells or an array constant.

row num Required, unless column num is present. Selects the


row in array from which to return a value. If row num is
omitted, column num is required.

column num Optional. Selects the column in array from which


to return a value. If column num is omitted, row num is
required.

Example:
Consider the worksheet illustrated in Figure 422.

Figure 422: INDEX Example Worksheet

If the following function were entered in cell E2:


518 function quick reference

=INDEX(A1:C5,4,3)
it would return 13405.

a.11 left

Returns the first character or characters in a text string, based on the


number of characters specified.
Syntax:
LEFT(text, [num chars])

text Required. The text string that contains the characters to be


extracted.

num chars Optional. Specifies the number of characters to be


extracted. If num chars is omitted, it is assumed to be 1.

Example:
Consider the worksheet illustrated in Figure 423.

Figure 423: LEFT Example Worksheet

If the following function were entered in cell E2:


=LEFT(A2,3)
it would return Nor.

a.12 lower

Converts all uppercase letters in a text string to lowercase.


Syntax:
LOWER(text)

text Required. The text string that contains the characters to be


converted to lowercase.

Example:
Consider the worksheet illustrated in Figure 424.
a.13 match 519

Figure 424: LOWER Example Worksheet

If the following function were entered in cell E2:


=LOWER(A2)
it would return north.

a.13 match

Searches for a specified item in a range of cells and then returns the
relative position of that item in the range. This function is commonly
combined with Index to lookup data in a table.
Syntax:
MATCH(lookup value, lookup array, [match type])
lookup value Required. The value that to be matched in lookup array.

lookup array Required. The range of cells being searched.

match type Optional. The number −1, 0, or 1 specifies how


Excel matches lookup value with values in lookup array. 1
finds the largest value that is less than or equal to lookup value.
0 finds the first value that is exactly equal to lookup value.
−1 finds the smallest value that is greater than or equal to
lookup value. If omitted, the default is 1.

Example:
Consider the worksheet illustrated in Figure 425.

Figure 425: MATCH Example Worksheet

If the following function were entered in cell E2:


=MATCH(3,B1:B5,0)
it would return 4 since the 3 is in the fourth row in Column B.
520 function quick reference

a.14 max

Returns the largest value in a set of values.


Syntax:
MAX(number1, [number2], ...)

number1, number2, ... Required. Up to 255 numbers for which


the maximum value is returned. This is usually a refer-
ence to a range of numbers.

Example:
Consider the worksheet illustrated in Figure 426.

Figure 426: MAX Example Worksheet

If the following function were entered in cell E2:


=MAX(B1:B5)
it would return 18580.

a.15 mid

Returns a specific number of characters from a text string, starting at


the position specified, based on the number of characters specified.
Syntax:
MID(text, start num, num chars)

text Required. The text string that contains the characters to be


extracted.

start num Required. The position of the first character to be


extracted in text. The first character in text has a start num
of 1, and so on.

num chars Required. Specifies the number of characters to be


extracted.

Example:
Consider the worksheet illustrated in Figure 427.
a.16 min 521

Figure 427: MID Example Worksheet

If the following function were entered in cell E2:


=MID(A2,2,3)
it would return ort.

a.16 min

Returns the smallest value in a set of values.


Syntax:
MIN(number1, [number2], ...)
number1, number2, ... Required. Up to 255 numbers for which
the minimum value is returned. This is usually a reference
to a range of numbers.

Example:
Consider the worksheet illustrated in Figure 428.

Figure 428: MIN Example Worksheet

If the following function were entered in cell E2:


=MIN(B1:B5)
it would return 13405.

a.17 now

Returns the serial number of the current date and time. If the cell
format was General before the function was entered, Excel changes
the cell format so that it matches the date and time format of the
regional settings. Note: to get only the date without the time, use the
TODAY function.
522 function quick reference

Syntax:
NOW()
The NOW function has no arguments.
Example:
If the following function were entered in cell A1:
=NOW()
it would return the current date and time. When this was writ-
ten the value returned was 12/27/2020 12:42.

a.18 not

Reverses the value of its logical argument.


Syntax:
NOT(logical)

logical Required. A value or expression that can be evaluated


to TRUE or FALSE. If logical is FALSE, NOT returns TRUE;
if logical is TRUE, NOT returns FALSE.

Example:
Consider the worksheet illustrated in Figure 429.

Figure 429: NOT Example Worksheet

If the following function were entered in cell E2:


=NOT(B2>3)
it would return FALSE. Note, B2 > 3 is TRUE, but the NOT
function changes the value returned to FALSE.

a.19 or

Returns TRUE if any of its arguments evaluate to TRUE and FALSE


if all arguments evaluate to FALSE.
Syntax:
OR(logical1, [logical2], ...)
a.20 pmt 523

logical1 Required. The first condition to be tested that can


evaluate to either TRUE or FALSE.

logical2, ... Optional. Additional conditions to be tested that


can evaluate to either TRUE or FALSE, up to a maximum
of 255 conditions.

Example:
Consider the worksheet illustrated in Figure 430.

Figure 430: OR Example Worksheet

If the following function were entered in cell E2:


=OR(B2>1,B2<10)
it would return TRUE.

a.20 pmt

Calculates the payment for a loan based on constant payments and a


constant interest rate.
Syntax:
PMT(rate, nper, pv, [fv], [type])

rate Required. The interest rate for the loan.

nper Required. The total number of payments for the loan.

pv Required. The present value, or the total amount that a se-


ries of future payments is worth now; also known as the
principal.

fv Optional. The future value, or a cash balance attained after


the last payment is made. If fv is omitted, it is assumed to
be 0.

type Optional. Indicates when payments are due, 0 for the end
of the period or 1 for the beginning of the period.

Example:
If the following function were entered in cell A1:
524 function quick reference

=PMT(0.05/12,5*12,-25000)
it would return 471.78. So, a loan of $25000 at 5% interest rate
per year for a term of 5 years would generate a monthly pay-
ment of 471.78.

a.21 proper

Capitalizes the first letter in a text string and any other letters in text
that follow any character other than a letter. Converts all other letters
to lowercase letters.
Syntax:
PROPER(text)

text Required. The text string that contains the characters to be


partially capitalized.

Example:
Consider the worksheet illustrated in Figure 431.

Figure 431: PROPER Example Worksheet

If the following function were entered in cell E2:


=PROPER(A2)
it would return North.

a.22 randbetween

Returns a random integer number between the numbers specified. A


new random integer number is returned every time the worksheet is
calculated.
Syntax:
RANDBETWEEN(bottom, top)

bottom Required. The smallest integer to be returned.

top Required. The largest integer to be returned.


a.23 right 525

Example:
If the following function were entered in cell A1:
=RANDBETWEEN(10,99)
it would return a random integer between 10 and 99 (inclusive).

a.23 right

Returns the last character or characters in a text string, based on the


number of characters specified.
Syntax:
RIGHT(text, [num chars])

text Required. The text string that contains the characters to be


extracted.

num chars Optional. Specifies the number of characters to be


extracted. If num chars is omitted, it is assumed to be 1.

Example:
Consider the worksheet illustrated in Figure 432.

Figure 432: RIGHT Example Worksheet

If the following function were entered in cell E2:


=RIGHT(A2,3)
it would return rth.

a.24 round

Rounds a number to a specified number of digits.


Syntax:
ROUND(number, num digits)

number Required. The number to be rounded.

num digits Required. The number of digits to which number


is rounded. If num digits is greater than 0 then number
is rounded to the specified number of decimal places. If
526 function quick reference

num digits is 0 the number is rounded to the nearest inte-


ger. If num digits is less than 0, the number is rounded to
the left of the decimal point.

Example:
Consider the worksheet illustrated in Figure 433.

Figure 433: ROUND Example Worksheet

If the following function were entered in cell E2:


=ROUND(C5,-2)
it would return 13900.

a.25 search

Returns the location of one text string inside another.


Syntax:
SEARCH(find text, within text, [start num])

find text Required. The text to be found.

within text Required. The text to be searched.

start num Optional. Starting position in the text to be searched.


This defaults to 1.

Example:
If the following function were entered in cell A1:
=SEARCH(”or”,”horse”)
it would return 2 since the word or starts at position 2 in horse.

a.26 sum

Sums the values in a range.


Syntax:
SUM(number1,[number2],...)

number1 Required. The first number to be added.


a.27 sumif 527

number2, ... Optional. Up to 255 additional numbers to be


added.

Example:
Consider the worksheet illustrated in Figure 434.

Figure 434: SUM Example Worksheet

If the following function were entered in cell E2:


=SUM(B1:B5)
it would return 23.

a.27 sumif

Sums the values in a range that meet a specified criteria.


Syntax:
SUMIF(range, criteria, [sum range])

range Required. The range of cells to be evaluated by criteria.

criteria Required. The criteria in the form of a number, ex-


pression, a cell reference, text, or a function that defines
which cells will be added.

sum range Optional. The actual cells to add if cells other than
those specified in the range argument are to be added. If
the sum range argument is omitted, Excel adds the cells
that are specified in the range argument (the same cells to
which the criteria is applied).

Example:
Consider the worksheet illustrated in Figure 435.
528 function quick reference

Figure 435: SUMIF Example Worksheet

If the following function were entered in cell E2:


=SUMIF(B2:B5,”>5”)
it would return 15, which is the sum of 7 and 8.

a.28 sumifs

Sums the values in a range that meet multiple specified criteria.


Syntax:
SUMIFS(range, crit range1, crit1, [crit range2, crit2], ...)

range Required. The range of cells to be summed.

crit range1 Required. The range that is tested using crit1.

crit1 Required. The criteria that defines which cells in crit range1
will be added.

crit range2, crit2, ... Optional. Additional ranges and their


associated criteria. Up to 127 range/criteria pairs can be
entered.

Example:
Consider the worksheet illustrated in Figure 436.

Figure 436: SUMIFS Example Worksheet

If the following function were entered in cell E2:


=SUMIFS(B2:B5,B2:B5,”>3”,B2:B5,”<8”)
it would return 12, which is the sum of 5 and 7.
a.29 today 529

a.29 today

Returns the serial number of the current date. If the cell format was
General before the function was entered, Excel changes the cell format
so that it matches the date and time format of the regional settings.
Note: to get both the date and time, use the NOW function.
Syntax:
TODAY()
The TODAY function has no arguments.
Example:
If the following function were entered in cell A1:
=TODAY()
it would return the current date. When this was written the
value returned was 12/27/2020.

a.30 trim

Removes all spaces from text except for single spaces between words.
Syntax:
TRIM(text)

text Required. The text from which excess spaces should be


removed.

Example:
If the following function were entered in cell A1:
=TRIM(“ Two Spaces ”)
it would return Two Spaces.

a.31 upper

Converts all lowercase letters in a text string to uppercase.


Syntax:
UPPER(text)

text Required. The text string that contains the characters to be


converted to uppercase.

Example:
Consider the worksheet illustrated in Figure 437.
530 function quick reference

Figure 437: UPPER Example Worksheet

If the following function were entered in cell E2:


=UPPER(A2)
it would return NORTH.

a.32 vlookup

Looks up a value in a table or range by row.


Syntax:
VLOOKUP(value, array, col num, [range lookup])

value Required. The value to be looked up.

array Required. A range of cells to be searched for the value.

col num Required. Selects the column in array from which to


return a value. The columns are numbered starting with
1 which is the far left column.

range lookup Optional. Specifies whether an approximate


match, TRUE, or exact match, FALSE, is desired. The de-
fault is approximate.

Example:
Consider the worksheet illustrated in Figure 438.

Figure 438: VLOOKUP Example Worksheet

If the following function were entered in cell E2:


=VLOOKUP(7,B2:C5,2)
it would return 16852.
D Y N A M I C A R R AY S
b
Excel 365 NOTE: This appendix concerns dynamic arrays, a feature that
was first included in Excel 365 and is only available in versions of Ex-
cel that are included with a Microsoft Office subscription. Therefore,
students who are using Excel 2016 will not be able to use the infor-
mation in this appendix.

b.1 definition

Dynamic arrays are grids of data created by calculating values based


on the formula in a single cell. From its inception, Excel has always
used a “one cell, one formula” approach, so designers who wanted
to fill a grid of values would have to copy/paste a formula into each
cell in that grid. This was time consuming and error-prone. Dynamic
arrays, though, use a formula in a single cell to calculate values in
many other cells, saving time and improving accuracy.
The introduction of dynamic arrays includes several new functions
that make working with a data array easier. As an example, UNIQUE()
will search an array and return only the unique (non-repeating) val-
ues. Additionally, dynamic array functions are automatically updated
if items are added or removed from the data array.
These concepts are easiest to understand with examples.

1. Click File ⇒ Open ⇒ Browse.

2. Navigate to APA-Data and click Open.

3. Click File ⇒ Save As ⇒ Browse.

4. Navigate to the desired file location and save it with the


name APA-Dynamic.

5. Click the Sales worksheet tab to open the worksheet.

This simple worksheet lists the names, regions, and number of


monthly units sold for several sales representatives in a company.

b.2 functions

b.2.1 Sort()

= SORT (array, [sort index], [sort order], [by col])

531
532 dynamic arrays

One of the simplest dynamic array functions is SORT(). The syn-


tax above indicates that the only required variable is the array to be
sorted, the others are optional. The following steps use the function
in its simplest form.

1. Click E1 and enter Sort.

2. Click E2 to activate that cell.

3. Since the array is in a named table, a column can be


sorted by entering the names of the table and column,
like =SORT(Sales[Name]). Alternatively, the cell range
for the Name column can be entered, =SORT(A2:A21),
but using the table and column names is a better option
since those would still be accurate if the table is later
modified.

Notice that even though the formula was only entered in one cell,
E2, it filled an entire range, E2 : E21 with the sorted data. The sorted
data is dynamic so if any of the names in Column A are changed the
list in Column E is updated to reflect that change.

1. Click A14 to activate that cell.

2. Type Alvin to change the name Avye.

3. Notice that the list of names in Column E is automati-


cally updated so E4 contains the changed value, Alvin,
and the previous value, Avye, is gone.

4. Click cell A12 to activate that cell.

5. Click Home ⇒ Cells ⇒ Delete ⇒ Delete Table Rows.

6. The name Aidan has been deleted and the list of names
in Column E is automatically updated to reflect the miss-
ing row.

7. Click cell A13 to activate that cell.

8. Click Home ⇒ Cells ⇒ Insert ⇒ Insert Table Rows


Above.

9. Click cell A12 to activate that cell.

10. Type Bosley then press Tab .

11. Type Northeast then press Tab .

12. Type 146 then press Enter .


b.2 functions 533

13. The name Bosley has been added and the list of names
in Column E is automatically updated to reflect the new
row.

Figure 439: Sort Array

Click in E2 and notice that the formula displayed in the formula


bar is in normal font. Then click in E3 and notice that the formula
displayed in the formula bar is grayed out and cannot be edited. Also
notice that the range E2:E21 is surrounded with a blue border, indi-
cating that this is a spilled array that is generated automatically from
the formula in cell E2.

Best Practice
Array Data

In general, it is best to keep the data referenced by a


dynamic array in a data table with at least one column or
one row of separation between the data table and a dy-
namic array. The data table can be in a different worksheet
but must be in the same workbook as the dynamic array.
534 dynamic arrays

b.2.2 Sortby()

= SORT BY(array, array1, [order1], [array2, order2], . . . )


SORTBY() makes it possible to sort one range by another range for
more complex sorts. As an example, the following steps sorts the Sales
table by Name and Region.

1. Click F1 and enter Sortby.

2. Click F2 and enter


=SORTBY(Sales[[Name]:[Region]],Sales[Region],1,
Sales[Name],1) .

Figure 440: Sortby Array

Columns F:G now contains all of the names sorted alphabetically by


region. The SORTBY() function used in F2 looks complex, but it is not
that difficult to understand. Each of the sections of the command are
separated by commas and described below.

sales[[name]:[region]] — Sort the data in the Name and Region


columns from the Sales table.

sales[region] — Use the Region column as the primary sort field.

1 — Sort the regions alphabetically from first to last.

sales[name] Use the Name column as the secondary sort field; that
is, sort the names alphabetically within the regions.
b.2 functions 535

1 — Sort the names alphabetically from first to last.

The SORTBY() function is very powerful and even permits sorting


by columns that are not in the final output array. For example, to sort
the array in F2:G21 by Units, change the function in F2 to:
=SORTBY(Sales[[Name]:[Region]], Sales[Region], 1, Sales[Units], -1). With
this new sort order, Stewart becomes the first name in the Midwest
region since he sold the most number of units in that region.

b.2.3 Unique()

= UNIQUE(array, [col], [once])


Follow these steps to find the unique values in a column of data.

1. Click H1 and enter Unique.

2. Click H2 and enter =UNIQUE(Sales[Region]).

Figure 441: Unique Regions

Cells H2:H6 contains the unique values found in the Region column.
Complete the following steps to test the dynamic characteristic of
Column H.

1. Click B5 and enter Mountain.

2. Notice that the dynamic range H2:H7 is updated to in-


clude the new Mountain region.

3. Click B5 and enter Pacific, which was the original value.

4. Notice that the dynamic range H2:H7 is updated to ex-


clude the Mountain region.
536 dynamic arrays

b.2.4 Nesting Functions

Dynamic array functions, like any functions, can be nested to improve


their usefulness. The unique regions in Column H would be more
useful if they were in alphabetical order.

1. Click H2 and change the formula in that cell to


=SORT(UNIQUE(Sales[Region])).

Now the list of regions in Column H will be sorted in alphabetical


order.

b.2.5 Filter()

= FILT ER(array, include, [if empty])


Dynamic arrays can be filtered to focus on specific items. The fol-
lowing steps remove all regions except Pacific.

1. Click I1 and enter Filter.

2. Click I2 and enter


=FILTER(Sales[Name],Sales[Region]=”Pacific”).

A dynamic array is created in I2:I5 that lists the names of everyone


assigned to the Pacific region. This list would be more useful if it
were alphabetized so a SORT() function can be added.

1. Click I2 and change the formula in that cell to


=SORT(FILTER(Sales[Name],Sales[Region]=”Pacific”)).

Follow these steps to test the dynamic filter.

1. Click B2 and enter Pacific.

2. Notice that Colby is now in the Filter list in Column I.

3. Click B2 and enter Midwest to return this cell to its orig-


inal value.

4. Notice that Colby is no longer in the Filter list in Column


I.
b.2 functions 537

b.2.6 Referencing A Dynamic Array

Dynamic arrays can grow or shrink depending on the data being


analyzed but formulas that refer to that array need to work, no matter
its size. To do that, add a hash ( # ) after the array reference. This is
illustrated in the following steps.

1. Click J1 and enter Pacific Reps.

2. Click J2 and enter =COUNTA(I2#).

Figure 442: Referring to a Dynamic Array

Cell J2 displays 4 since there are four representatives listed in the


dynamic array starting in I2. Complete the following steps to test the
dynamic charactistics of this array.

1. Click B2 and enter Pacific.

2. Notice that Colby is now in the Filter list in Column I and


the number of representatives in J2 has changed to 5.

3. Click B2 and enter Midwest to return this cell to its orig-


inal value.

4. Notice that Colby is no longer in the Filter list in Column


I and the number of representatives in J2 has returned
to 4.

The formula in cell J2 counts all of the lines in the dynamic array
starting in I2 no matter how long that array grows.

b.2.7 Xlookup()

= XLOOKUP(value, array, return, [not found], [match], [search])


XLookup is a modern and flexible replacement for older functions
like VLOOKUP, HLOOKUP, and LOOKUP. Complete the following
steps to explore this powerful function.
538 dynamic arrays

1. Click K1 and enter XLookup.

2. Click K2 and enter Colby

3. Click L2 and enter


=XLOOKUP(K2,Sales[Name],Sales[[Region]:[Units]]).

Figure 443: XLookup Function

The XLookup function searches in the Name column for the name
found in cell K2. When it finds that value, it returns the Region and
Units values for that name. In the example above, Colby returns Mid-
west and 276 from the Sales table. One of the strengths of using dy-
namic arrays is that if the Sales table is modified by adding or deleting
rows or columns, the XLookup function will continue to work.

b.2.8 XMatch()

= XMAT CH(value, array, [match], [search])


XMatch is a modern and flexible replacement for the older MATCH
function. It performs a lookup and returns a position in vertical or
horizontal ranges. Complete the following steps to explore this pow-
erful function.

1. Click K4 and enter XMatch.

2. Click K5 and enter Colby

3. Click L5 and enter


=XMATCH(K5,Sales[Name]).
b.2 functions 539

Figure 444: XMatch Function

Cell L5 will display 1 since the value in K5, Colby, is in row one
of the Sales table. By itself, this is of limited value, but combining
XMatch with Index creates a powerful lookup function that can return
the value in any column for any found row in a data table.

1. Click K7 and enter XMatch+Index.

2. Click K5 and enter Colby

3. Click L5 and enter


=INDEX(Sales,XMATCH(K8,Sales[Name]),3).

Figure 445: XMatch+Index Function

This returns 276, which is how many units Colby sold. If the data ta-
ble contained dozens of columns and hundreds of rows, XMatch+Index
is very useful in pinpointing the specific data needed.

b.2.9 Randarray()

= RANDARRAY([rows], [columns], [min], [max], [whole number])


Use the following steps to create a dynamic array of random num-
bers.

1. Click D24 and enter Random.

2. Click D25 and enter =RANDARRAY(3,4,10,99,TRUE)


540 dynamic arrays

Figure 446: Random Array

This creates an array of three rows and four columns that contain
random numbers between 10 and 99. The final TRUE restricts the ran-
dom numbers to integers rather than decimals. NOTE: The function
creates an array of random numbers so the illustration in this book
will not match the student’s work.

b.2.10 Sequence()

= SEQUENCE(rows, [columns], [start], [step])


Follow these steps to create a dynamic array that contains a se-
quence of numbers.

1. Click D29 and enter Sequence.

2. Click D30 and enter =SEQUENCE(5,3,25,3)

Figure 447: Sequence

This creates a sequence of numbers filling five rows and three


columns starting at 25 and stepping by 3.
colophon

This document was typeset using the typographical look-and-feel


classicthesis developed by André Miede. The style was inspired by
Robert Bringhurst’s seminal book on typography “The Elements of Ty-
pographic Style”. classicthesis is available for both LATEX and LYX:

https://bitbucket.org/amiede/classicthesis/

Happy users of classicthesis usually send a real postcard to the author,


a collection of postcards received so far is featured here:

http://postcards.miede.de/

Final Version as of February 3, 2021 (classicthesis Edition 2).

You might also like