You are on page 1of 53

Excel 2019 Bible Michael Alexander

Visit to download the full and correct content document:


https://textbookfull.com/product/excel-2019-bible-michael-alexander/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Excel 2016 formulas 1st Edition Michael Alexander

https://textbookfull.com/product/excel-2016-formulas-1st-edition-
michael-alexander/

Excel VBA Programming For Dummies 5th Edition Michael


Alexander

https://textbookfull.com/product/excel-vba-programming-for-
dummies-5th-edition-michael-alexander/

Microsoft Excel Functions and Formulas with Excel 2019


Office 365 5th Edition Bernd Held

https://textbookfull.com/product/microsoft-excel-functions-and-
formulas-with-excel-2019-office-365-5th-edition-bernd-held/

The New Oxford Annotated Bible : New Revised Standard


Version—An Ecumenical Study Bible Michael David Coogan

https://textbookfull.com/product/the-new-oxford-annotated-bible-
new-revised-standard-version-an-ecumenical-study-bible-michael-
david-coogan/
The JPS Bible Commentary Song of Songs Michael Fishbane

https://textbookfull.com/product/the-jps-bible-commentary-song-
of-songs-michael-fishbane/

The Men s Health Gym Bible 2nd Edition Michael Mejia

https://textbookfull.com/product/the-men-s-health-gym-bible-2nd-
edition-michael-mejia/

Essential Excel 2019: A Step-By-Step Guide David Slager

https://textbookfull.com/product/essential-excel-2019-a-step-by-
step-guide-david-slager/

Microsoft Excel 2019 Formulas and Functions 1st Edition


Paul Mcfedries

https://textbookfull.com/product/microsoft-excel-2019-formulas-
and-functions-1st-edition-paul-mcfedries/

Building Interactive Dashboards in Microsoft 365 Excel


1st Edition Michael Olafusi

https://textbookfull.com/product/building-interactive-dashboards-
in-microsoft-365-excel-1st-edition-michael-olafusi/
Excel® 2019

BIBLE
Michael Alexander
Dick Kusleika
Previously by John Walkenbach
Excel® 2019 Bible
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2019 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-119-51478-7
ISBN: 978-1-119-51477-0 (ebk)
ISBN: 978-1-119-51476-3 (ebk)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under
Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the
Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center,
222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for
permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street,
Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/
permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties
with respect to the accuracy or completeness of the contents of this work and specifically disclaim all
warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be
created or extended by sales or promotional materials. The advice and strategies contained herein may not be
suitable for every situation. This work is sold with the understanding that the publisher is not engaged in
rendering legal, accounting, or other professional services. If professional assistance is required, the services of
a competent professional person should be sought. Neither the publisher nor the author shall be liable for
damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/
or a potential source of further information does not mean that the author or the publisher endorses the
information the organization or website may provide or recommendations it may make. Further, readers should
be aware that Internet websites listed in this work may have changed or disappeared between when this work
was written and when it is read.
For general information on our other products and services please contact our Customer Care Department within
the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included
with standard print versions of this book may not be included in e-books or in print-on-demand. If this book
refers to media such as a CD or DVD that is not included in the version you purchased, you may download this
material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley
.com.
Library of Congress Control Number: 2018954472
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or
its affiliates, in the United States and other countries, and may not be used without written permission.
Microsoft and Excel are registered trademarks of Microsoft Corporation. All other trademarks are the property
of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in
this book.
About the Authors
Michael Alexander is a Microsoft Certified Application Developer (MCAD) and author of
several books on advanced business analysis with Microsoft Access and Microsoft Excel. He
has more than 20 years of experience consulting and developing Microsoft Office solutions.
Mike has been named a Microsoft MVP for his ongoing contributions to the Excel commu-
nity. You can find Mike at www.datapigtechnologies.com.
Dick Kusleika is a 12-time Microsoft Excel MVP and has been working with Microsoft Office
for more than 20 years. Dick develops Access- and Excel-based solutions for his clients and
has conducted training seminars on Office products in the United States and Australia. Dick
also writes a popular Excel-related blog at www.dailydoseofexcel.com.
John Walkenbach is a best-selling Excel author who has published more than 50 spread-
sheet books. He lives amid the saguaros, javelinas, rattlesnakes, bobcats, and Gila monsters
in Southern Arizona, but the critters are mostly scared away by his clawhammer banjo
playing. For more information, Google him.
About the Technical Editors
Jordan Goldmeier is an internationally recognized analytics professional and data visu-
alization expert, author, speaker, and CEO. He is the owner of Cambia Factor, a data con-
sulting agency, and the author of Advanced Excel Essentials (Apress, 2014) and co-author
of Dashboards for Excel (Apress, 2015), both on developing advanced analytics with Excel.
He has consulted with and provided training for the NATO Training Mission, Pentagon, Air
Force and Navy, Financial Times, and the University of Cincinnati, among others. His work
has been cited by and quoted in the Associated Press, Bloomberg BusinessWeek, Dice News,
and American Express OPEN Forum. He holds the prestigious MVP award from Microsoft
since 2013, and he is an owner and producer of Excel.TV, an online community devoted to
sharing stories, setbacks, and lessons from experts and practitioners in Excel, business
intelligence, big data, and analytics. He has provided technical editing and review for
Wiley, O’Reilly, and others.
Joyce J. Nielsen has worked in the publishing industry for more than 25 years as
an author, development editor, technical editor, and project manager specializing in
Microsoft Office, Windows, Internet, and general technology titles for leading educational
and retail publishers. She is the author or co-author of more than 40 computer books
and has edited several hundred IT publications and more than 2,000 online articles.
Joyce holds a bachelor of science degree in quantitative business analysis from Indiana
University’s Kelley School of Business in Bloomington. Joyce currently resides in Arizona.
Doug Holland is an architect evangelist at Microsoft Corporation, working with part-
ners to drive digital transformation through technologies such as the Microsoft Cloud,
Office 365, and HoloLens. He holds a master’s degree in software engineering from Oxford
University and lives in Northern California with his wife and five children.
Guy Hart-Davis is the author of an improbable number of computer books on a bizarre
range of topics. If you had been wondering who was responsible for the Word 2000
Developer’s Handbook, AppleScript: A Beginner’s Guide, iMac Portable Genius, or Samsung
Galaxy S8 Maniac’s Guide, you need wonder no more.
Credits
Project Editor Marketing Manager
Gary Schwartz Christie Hilbrich

Technical Editors Associate Publisher


Jordan Goldmeier Jim Minatel
Joyce J. Nielsen
Doug Holland Project Coordinator, Cover
Guy Hart-Davis Brent Savage

Production Editor Proofreader


Barath Kumar Rajasekaran Amy J. Schneider

Copy Editor Indexer


Kim Wimpsett John Sleeva

Production Manager Cover Designer


Kathleen Wisor Wiley

Content Enablement and Operations Cover Image


Manager iStockphoto.com/Aleksandar
Pete Gaughan
Acknowledgments
O
ur deepest thanks to the professionals at John Wiley & Sons for all the hours of work
put into bringing this book to life. Thanks also to Jordan Goldmeier, Joyce Nielsen,
Doug Holland, and Guy Hart-Davis for suggesting numerous improvements to the
examples and text in this book. A special thank-you goes out to our families for putting
up with all the time spent locked away on this project. Finally, we’d like to thank John
Walkenbach for his many years of work on the previous editions of this book. His efforts
in curating Excel knowledge have been instrumental, not only in helping millions of Excel
users to achieve their learning goals but in inspiring countless Excel MVPs to share their
expertise with the Excel community.

ix
Contents at a Glance
Introduction................................................................................................................ xli

Part I: Getting Started with Excel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Chapter 1: Introducing Excel........................................................................................... 3
Chapter 2: Entering and Editing Worksheet Data............................................................. 29
Chapter 3: Performing Basic Worksheet Operations...........................................................51
Chapter 4: Working with Excel Ranges and Tables............................................................ 71
Chapter 5: Formatting Worksheets................................................................................ 117
Chapter 6: Understanding Excel Files and Templates.......................................................153
Chapter 7: Printing Your Work......................................................................................173
Chapter 8: Customizing the Excel User Interface............................................................195

Part II: Working with Formulas and Functions. . . . . . . . . . . . . . . . . . . . . . . 205


Chapter 9: Introducing Formulas and Functions.............................................................207
Chapter 10: Using Formulas for Common Mathematical Operations...................................239
Chapter 11: Using Formulas to Manipulate Text..............................................................253
Chapter 12: Using Formulas with Dates and Times..........................................................269
Chapter 13: Using Formulas for Conditional Analysis......................................................295
Chapter 14: Using Formulas for Matching and Lookups...................................................315
Chapter 15: Using Formulas for Financial Analysis..........................................................333
Chapter 16: Using Formulas for Statistical Analysis........................................................365
Chapter 17: Using Formulas with Tables and Conditional Formatting................................385
Chapter 18: Understanding and Using Array Formulas....................................................399
Chapter 19: Making Your Formulas Error-Free.................................................................423

Part III: Creating Charts and Other Visualizations. . . . . . . . . . . . . . . . . . . 443


Chapter 20: Getting Started with Excel Charts...............................................................445
Chapter 21: Using Advanced Charting Techniques..........................................................489
Chapter 22: Creating Sparkline Graphics........................................................................523
Chapter 23: Visualizing with Custom Number Formats and Shapes...................................537
Chapter 24: Implementing Excel Dashboarding Best Practices..........................................567

xi
Part IV: Managing and Analyzing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Chapter 25: Importing and Cleaning Data......................................................................579
Chapter 26: Using Data Validation.................................................................................613
Chapter 27: Creating and Using Worksheet Outlines........................................................627
Chapter 28: Linking and Consolidating Worksheets........................................................637
Chapter 29: Introducing PivotTables..............................................................................655
Chapter 30: Analyzing Data with PivotTables.................................................................679
Chapter 31: Performing Spreadsheet What-If Analysis.....................................................715
Chapter 32: Analyzing Data Using Goal Seeking and Solver.............................................733
Chapter 33: Analyzing Data with the Analysis ToolPak...................................................755
Chapter 34: Protecting Your Work.................................................................................769

Part V: Understanding Power Pivot and Power Query. . . . . . . . . . . . . . . . . . 781


Chapter 35: Introducing Power Pivot.............................................................................783
Chapter 36: Working Directly with the Internal Data Model.............................................807
Chapter 37: Adding Formulas to Power Pivot..................................................................817
Chapter 38: Introducing Power Query............................................................................835
Chapter 39: Transforming Data with Power Query...........................................................859
Chapter 40: Making Queries Work Together....................................................................887
Chapter 41: Enhancing Power Query Productivity ..........................................................903

Part VI: Automating Excel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915


Chapter 42: Introducing Visual Basic for Applications.....................................................917
Chapter 43: Creating Custom Worksheet Functions.........................................................947
Chapter 44: Creating UserForms....................................................................................961
Chapter 45: Using UserForm Controls in a Worksheet......................................................983
Chapter 46: Working with Excel Events..........................................................................997
Chapter 47: Seeing Some VBA Examples....................................................................... 1011
Chapter 48: Creating Custom Excel Add-Ins.................................................................. 1027

Index....................................................................................................................... 1037

xii
Contents
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xli

Part I: Getting Started with Excel 1


Chapter 1: Introducing Excel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Understanding What Excel Is Used For..................................................................... 3
Looking at What’s New in Excel 2019....................................................................... 4
Understanding Workbooks and Worksheets.............................................................. 4
Moving around a Worksheet.................................................................................... 7
Navigating with your keyboard....................................................................... 8
Navigating with your mouse........................................................................... 9
Using the Ribbon................................................................................................. 10
Ribbon tabs................................................................................................ 10
Contextual tabs........................................................................................... 12
Types of commands on the Ribbon................................................................ 12
Accessing the Ribbon by using your keyboard............................................... 14
Using Shortcut Menus.......................................................................................... 16
Customizing Your Quick Access Toolbar.................................................................. 17
Working with Dialog Boxes................................................................................... 18
Navigating dialog boxes............................................................................... 19
Using tabbed dialog boxes............................................................................ 20
Using Task Panes................................................................................................. 20
Creating Your First Excel Workbook....................................................................... 22
Getting started on your worksheet............................................................... 22
Filling in the month names.......................................................................... 23
Entering the sales data................................................................................ 23
Formatting the numbers.............................................................................. 24
Making your worksheet look a bit fancier...................................................... 25
Summing the values.................................................................................... 26
Creating a chart.......................................................................................... 26
Printing your worksheet.............................................................................. 26
Saving your workbook................................................................................. 27
Chapter 2: Entering and Editing Worksheet Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Exploring Data Types............................................................................................ 29
Numeric values............................................................................................ 29

xiii
Contents

Text entries................................................................................................ 30
Formulas..................................................................................................... 31
Entering Text and Values into Your Worksheets...................................................... 31
Entering numbers........................................................................................ 31
Entering text.............................................................................................. 32
Using Enter mode........................................................................................ 33
Entering Dates and Times into Your Worksheets..................................................... 33
Entering date values.................................................................................... 33
Entering time values.................................................................................... 34
Modifying Cell Contents....................................................................................... 34
Deleting the contents of a cell...................................................................... 34
Replacing the contents of a cell.................................................................... 35
Editing the contents of a cell....................................................................... 35
Learning some handy data-entry techniques................................................. 37
Automatically moving the selection after entering data......................... 37
Selecting a range of input cells before entering data............................. 37
Using Ctrl+Enter to place information into multiple cells
simultaneously............................................................................... 37
Changing modes................................................................................. 38
Entering decimal points automatically.................................................. 38
Using AutoFill to enter a series of values.............................................. 39
Using AutoComplete to automate data entry......................................... 40
Forcing text to appear on a new line within a cell..................................41
Using AutoCorrect for shorthand data entry..........................................41
Entering numbers with fractions.......................................................... 42
Using a form for data entry................................................................. 42
Entering the current date or time into a cell......................................... 44
Applying Number Formatting................................................................................ 44
Using automatic number formatting............................................................. 46
Formatting numbers by using the Ribbon...................................................... 46
Using shortcut keys to format numbers......................................................... 46
Formatting numbers by using the Format Cells dialog box.............................. 48
Adding your own custom number formats..................................................... 50
Chapter 3: Performing Basic Worksheet Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Learning the Fundamentals of Excel Worksheets.....................................................51
Working with Excel windows.........................................................................51
Moving and resizing windows.............................................................. 52
Switching among windows................................................................... 53
Closing windows................................................................................. 54
Activating a worksheet................................................................................ 54
Adding a new worksheet to your workbook.................................................... 55
Deleting a worksheet you no longer need...................................................... 55
Changing the name of a worksheet............................................................... 56
Changing a sheet tab color........................................................................... 57
Rearranging your worksheets....................................................................... 57
Hiding and unhiding a worksheet................................................................. 58
xiv
Contents

Controlling the Worksheet View............................................................................ 59


Zooming in or out for a better view.............................................................. 59
Viewing a worksheet in multiple windows..................................................... 60
Comparing sheets side by side.......................................................................61
Splitting the worksheet window into panes................................................... 62
Keeping the titles in view by freezing panes................................................. 62
Monitoring cells with a Watch Window.......................................................... 65
Working with Rows and Columns........................................................................... 65
Inserting rows and columns......................................................................... 66
Deleting rows and columns........................................................................... 67
Changing column widths and row heights..................................................... 67
Changing column widths..................................................................... 68
Changing row heights.......................................................................... 68
Hiding rows and columns............................................................................. 69
Chapter 4: Working with Excel Ranges and Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Understanding Cells and Ranges............................................................................ 71
Selecting ranges.......................................................................................... 72
Selecting complete rows and columns........................................................... 73
Selecting noncontiguous ranges................................................................... 73
Selecting multisheet ranges..........................................................................74
Selecting special types of cells..................................................................... 77
Selecting cells by searching......................................................................... 79
Copying or Moving Ranges.................................................................................... 81
Copying by using Ribbon commands............................................................. 82
Copying by using shortcut menu commands.................................................. 83
Copying by using shortcut keys.................................................................... 83
Copying or moving by using drag-and-drop................................................... 85
Copying to adjacent cells............................................................................. 86
Copying a range to other sheets................................................................... 87
Using the Office Clipboard to paste............................................................... 87
Pasting in special ways................................................................................ 89
Using the Paste Special dialog box................................................................ 90
Performing mathematical operations without formulas.......................... 92
Skipping blanks when pasting............................................................. 92
Transposing a range............................................................................ 92
Using Names to Work with Ranges......................................................................... 93
Creating range names in your workbooks...................................................... 94
Using the Name box............................................................................ 94
Using the New Name dialog box............................................................ 94
Using the Create Names from Selection dialog box................................. 95
Managing names......................................................................................... 97
Adding Comments to Cells.................................................................................... 98
Formatting comments.................................................................................. 99
Changing a comment’s shape.......................................................................100

xv
Contents

Reading comments.....................................................................................101
Hiding and showing comments....................................................................101
Editing comments.......................................................................................101
Deleting comments.....................................................................................102
Working with Tables............................................................................................102
Understanding a table’s structure................................................................102
The header row..................................................................................103
The data body....................................................................................103
The total row.....................................................................................103
The resizing handle............................................................................104
Creating a table..........................................................................................104
Adding data to a table................................................................................105
Sorting and filtering table data...................................................................105
Sorting a table...................................................................................106
Filtering a table.................................................................................108
Filtering a table with slicers............................................................... 110
Changing the table’s appearance..................................................................112
Chapter 5: Formatting Worksheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
Getting to Know the Formatting Tools.................................................................. 117
Using the formatting tools on the Home tab.................................................118
Using the Mini toolbar................................................................................118
Using the Format Cells dialog box................................................................ 119
Formatting Your Worksheet.................................................................................120
Using fonts to format your worksheet..........................................................120
Changing text alignment............................................................................122
Choosing horizontal alignment options...............................................123
Choosing vertical alignment options...................................................125
Wrapping or shrinking text to fit the cell............................................125
Merging worksheet cells to create additional text space........................125
Displaying text at an angle.................................................................127
Using colors and shading............................................................................127
Adding borders and lines............................................................................128
Using Conditional Formatting..............................................................................131
Specifying conditional formatting...............................................................131
Using graphical conditional formats.............................................................131
Using data bars..................................................................................131
Using color scales...............................................................................133
Using icon sets..................................................................................134
Creating formula-based rules.......................................................................137
Understanding relative and absolute references...................................137
Conditional formatting formula examples.....................................................138
Identifying weekend days..................................................................139

xvi
Contents

Highlighting a row based on a value....................................................139


Displaying alternate-row shading........................................................140
Creating checkerboard shading...........................................................140
Shading groups of rows...................................................................... 141
Working with conditional formats................................................................ 141
Managing rules..................................................................................142
Copying cells that contain conditional formatting................................142
Deleting conditional formatting..........................................................142
Locating cells that contain conditional formatting...............................142
Using Named Styles for Easier Formatting.............................................................143
Applying styles..........................................................................................143
Modifying an existing style........................................................................144
Creating new styles....................................................................................145
Merging styles from other workbooks...........................................................146
Controlling styles with templates................................................................146
Understanding Document Themes........................................................................ 147
Applying a theme.......................................................................................148
Customizing a theme..................................................................................149
Chapter 6: Understanding Excel Files and Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Creating a New Workbook.....................................................................................153
Opening an Existing Workbook............................................................................154
Filtering filenames.....................................................................................156
Choosing your file display preferences.........................................................157
Saving a Workbook..............................................................................................157
Using AutoRecover..............................................................................................159
Recovering versions of the current workbook...............................................159
Recovering unsaved work............................................................................160
Configuring AutoRecover............................................................................160
Password-Protecting a Workbook.......................................................................... 161
Organizing Your Files..........................................................................................162
Other Workbook Info Options...............................................................................162
Protect Workbook options...........................................................................162
Check for Issues options.............................................................................163
Manage Workbook options...........................................................................163
Browser View options..................................................................................163
Compatibility Mode section.........................................................................164
Closing Workbooks..............................................................................................164
Safeguarding Your Work......................................................................................164
Working with Templates......................................................................................165
Exploring Excel templates...........................................................................165
Viewing templates.............................................................................165
Creating a workbook from a template..................................................166
Modifying a template.........................................................................168

xvii
Contents

Using default templates..............................................................................168


Using the workbook template to change workbook defaults...................169
Creating a worksheet template............................................................ 170
Editing your template........................................................................ 170
Resetting the default workbook.......................................................... 170
Using custom workbook templates............................................................... 170
Creating custom templates.................................................................. 170
Saving your custom templates............................................................ 171
Using custom templates......................................................................172
Chapter 7: Printing Your Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
Doing Basic Printing...........................................................................................173
Changing Your Page View..................................................................................... 174
Normal view............................................................................................... 175
Page Layout view.......................................................................................175
Page Break Preview..................................................................................... 176
Adjusting Common Page Setup Settings................................................................178
Choosing your printer.................................................................................180
Specifying what you want to print..............................................................180
Changing page orientation..........................................................................181
Specifying paper size..................................................................................181
Printing multiple copies of a report.............................................................181
Adjusting the page margins........................................................................181
Understanding page breaks.........................................................................183
Inserting a page break.......................................................................183
Removing manual page breaks............................................................183
Printing row and column titles....................................................................183
Scaling printed output................................................................................185
Printing cell gridlines.................................................................................185
Printing row and column headers................................................................185
Using a background image...........................................................................185
Adding a Header or a Footer to Your Reports.........................................................187
Selecting a predefined header or footer........................................................188
Understanding header and footer element codes...........................................189
Exploring other header and footer options...................................................190
Exploring Other Print-Related Topics....................................................................190
Copying Page Setup settings across sheets...................................................190
Preventing certain cells from being printed.................................................191
Preventing objects from being printed.........................................................191
Creating custom views of your worksheet.....................................................192
Creating PDF files.......................................................................................194
Chapter 8: Customizing the Excel User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Customizing the Quick Access Toolbar..................................................................195
About the Quick Access toolbar...................................................................196

xviii
Contents

Adding new commands to the Quick Access toolbar......................................197


Other Quick Access toolbar actions..............................................................199
Customizing the Ribbon......................................................................................201
Why you may want to customize the Ribbon................................................201
What can be customized.............................................................................201
How to customize the Ribbon......................................................................202
Creating a new tab.............................................................................202
Creating a new group.........................................................................203
Adding commands to a new group.......................................................203
Resetting the Ribbon..................................................................................204

Part II: Working with Formulas and Functions 205


Chapter 9: Introducing Formulas and Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Understanding Formula Basics.............................................................................207
Using operators in formulas........................................................................208
Understanding operator precedence in formulas...........................................209
Using functions in your formulas................................................................211
Examples of formulas that use functions.............................................212
Function arguments...........................................................................213
More about functions.........................................................................214
Entering Formulas into Your Worksheets...............................................................214
Entering formulas manually........................................................................216
Entering formulas by pointing.....................................................................216
Pasting range names into formulas..............................................................216
Inserting functions into formulas................................................................217
Function entry tips....................................................................................219
Editing Formulas.................................................................................................219
Using Cell References in Formulas........................................................................220
Using relative, absolute, and mixed references..............................................221
Changing the types of your references.........................................................223
Referencing cells outside the worksheet.......................................................223
Referencing cells in other worksheets.................................................223
Referencing cells in other workbooks..................................................224
Using Formulas in Tables.....................................................................................225
Summarizing data in a table.......................................................................225
Using formulas within a table.....................................................................227
Referencing data in a table.........................................................................228
Correcting Common Formula Errors.......................................................................229
Handling circular references.......................................................................230
Specifying when formulas are calculated......................................................231
Using Advanced Naming Techniques.....................................................................232
Using names for constants..........................................................................233
Using names for formulas............................................................................233

xix
Contents

Using range intersections...........................................................................234


Applying names to existing references.........................................................236
Working with Formulas........................................................................................236
Not hard-coding values...............................................................................236
Using the Formula bar as a calculator...........................................................237
Making an exact copy of a formula..............................................................237
Converting formulas to values.....................................................................238
Chapter 10: Using Formulas for Common Mathematical Operations. . . . . . . . . . . . . . . . 239
Calculating Percentages.......................................................................................239
Calculating percent of goal..........................................................................239
Calculating percent variance....................................................................... 241
Calculating percent variance with negative values........................................242
Calculating a percent distribution...............................................................243
Calculating a running total.........................................................................244
Applying a percent increase or decrease to values.........................................244
Dealing with divide-by-zero errors...............................................................245
Rounding Numbers..............................................................................................247
Rounding numbers using formulas...............................................................247
Rounding to the nearest penny...................................................................247
Rounding to significant digits.....................................................................248
Counting Values in a Range..................................................................................250
Using Excel’s Conversion Functions....................................................................... 251
Chapter 11: Using Formulas to Manipulate Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Working with Text..............................................................................................253
Using Text Functions..........................................................................................254
Joining text strings....................................................................................254
Setting text to sentence case......................................................................256
Removing spaces from a text string.............................................................257
Extracting parts of a text string..................................................................258
Finding a particular character in a text string..............................................259
Finding the second instance of a character.................................................. 261
Substituting text strings............................................................................262
Counting specific characters in a cell...........................................................263
Adding a line break within a formula...........................................................264
Cleaning strange characters from text fields.................................................265
Padding numbers with zeros........................................................................266
Formatting the numbers in a text string......................................................266
Using the DOLLAR function.........................................................................268
Chapter 12: Using Formulas with Dates and Times. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Understanding How Excel Handles Dates and Times...............................................269
Understanding date serial numbers..............................................................269
Entering dates............................................................................................270
Understanding time serial numbers.............................................................271

xx
Contents

Entering times...........................................................................................272
Formatting dates and times........................................................................273
Problems with dates...................................................................................273
Excel’s leap year bug.......................................................................... 274
Pre-1900 dates................................................................................... 274
Inconsistent date entries....................................................................275
Using Excel’s Date and Time Functions..................................................................275
Getting the current date and time...............................................................275
Calculating age..........................................................................................276
Calculating the number of days between two dates.......................................277
Calculating the number of workdays between two dates................................277
Using NETWORKDAYS.INTL..................................................................278
Generating a list of business days excluding holidays...................................278
Extracting parts of a date...........................................................................280
Calculating number of years and months between dates................................282
Converting dates to Julian date formats.......................................................282
Calculating the percent of year completed and remaining..............................284
Returning the last date of a given month.....................................................285
Using the EOMONTH function..............................................................286
Calculating the calendar quarter for a date...................................................286
Calculating the fiscal quarter for a date.......................................................287
Returning a fiscal month from a date...........................................................288
Calculating the date of the Nth weekday of the month..................................289
Calculating the date of the last weekday of the month..................................290
Extracting parts of a time...........................................................................290
Calculating elapsed time.............................................................................291
Rounding time values ................................................................................292
Converting decimal hours, minutes, or seconds to a time...............................293
Adding hours, minutes, or seconds to a time................................................294
Chapter 13: Using Formulas for Conditional Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Understanding Conditional Analysis.....................................................................295
Checking if a simple condition is met...........................................................295
Checking for multiple conditions.................................................................296
Validating conditional data.........................................................................298
Looking up values..............................................................................298
Checking if Condition1 AND Condition2 are met............................................299
Referring to logical conditions in cells................................................301
Checking if Condition1 OR Condition2 are met..............................................302
Performing Conditional Calculations.....................................................................303
Summing all values that meet a certain condition........................................303
Summing greater than zero................................................................305
Summing all values that meet two or more conditions...................................306
Summing if values fall between a given date range.......................................307

xxi
Contents

Using SUMIFS....................................................................................308
Getting a count of values that meet a certain condition................................309
Getting a count of values that meet two or more conditions..........................310
Finding nonstandard characters.......................................................... 311
Getting the average of all numbers that meet a certain condition.................. 311
Getting the average of all numbers that meet two or more conditions............312
Chapter 14: Using Formulas for Matching and Lookups. . . . . . . . . . . . . . . . . . . . . . . . . 315
Introducing Lookup Formulas..............................................................................315
Leveraging Excel’s Lookup Functions....................................................................316
Looking up an exact value based on a left lookup column.............................316
Looking up an exact value based on any lookup column................................318
Looking up values horizontally....................................................................320
Hiding errors returned by lookup functions..................................................321
Finding the closest match from a list of banded values..................................323
Finding the closest match with the INDEX and MATCH functions...........324
Looking up values from multiple tables........................................................325
Looking up a value based on a two-way matrix.............................................328
Using default values for match............................................................329
Finding a value based on multiple criteria....................................................330
Returning text with SUMPRODUCT......................................................331
Finding the last value in a column...............................................................331
Finding the last number using LOOKUP...............................................332
Chapter 15: Using Formulas for Financial Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Performing Common Business Calculations............................................................333
Calculating gross profit margin and gross profit margin percent.....................333
Calculating markup............................................................................334
Calculating EBIT and EBITDA.......................................................................335
Calculating cost of goods sold......................................................................336
Calculating return on assets........................................................................337
Calculating return on equity...............................................................337
Calculating break even................................................................................338
Calculating customer churn.........................................................................340
Calculating annual churn rate.............................................................341
Calculating average customer lifetime value.................................................341
Calculating employee turnover....................................................................342
Leveraging Excel’s Financial Functions.................................................................343
Converting interest rates............................................................................343
Computing effective rate with FV........................................................345
Creating a loan payment calculator..............................................................345
Creating an amortization schedule......................................................346
Creating a variable-rate mortgage amortization schedule..............................348
Using dates instead of payment numbers.............................................350

xxii
Contents

Calculating depreciation............................................................................. 351


Calculating accelerated depreciation...................................................352
Calculating present value............................................................................354
Calculating the present value of future payments.................................355
Calculating net present value......................................................................356
Calculating positive and negative cash flows........................................357
Calculating an internal rate of return..........................................................358
Calculating nonperiodic future cash flows...........................................359
Performing financial forecasting.................................................................360
Chapter 16: Using Formulas for Statistical Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Working with Weighted Averages..........................................................................365
Smoothing Data with Moving Averages.................................................................367
Applying exponential smoothing to volatile data..........................................369
Using Functions to Create Descriptive Statistics....................................................371
Getting the largest or smallest value............................................................372
Getting the Nth largest or smallest value.....................................................373
Calculating mean, median, and mode...........................................................375
Bucketing Data into Percentiles...........................................................................377
Identifying Statistical Outliers with an Interquartile Range..................................379
Creating a Frequency Distribution........................................................................383
An alternative to the FREQUENCY function...................................................384
Chapter 17: Using Formulas with Tables and Conditional Formatting . . . . . . . . . . . . . . . 385
Highlighting Cells That Meet Certain Criteria........................................................385
Highlighting cells based on the value of another cell....................................387
Highlighting Values That Exist in List1 but Not List2.............................................389
Highlighting Values That Exist in List1 and List2 .................................................391
Highlighting Based on Dates................................................................................393
Highlighting days between two dates..........................................................395
Highlighting dates based on a due date........................................................397
Chapter 18: Understanding and Using Array Formulas. . . . . . . . . . . . . . . . . . . . . . . . . . 399
Understanding Array Formulas.............................................................................399
A multicell array formula............................................................................400
A single-cell array formula..........................................................................401
Creating an Array Constant..................................................................................403
Understanding the Dimensions of an Array...........................................................404
One-dimensional horizontal arrays..............................................................404
One-dimensional vertical arrays..................................................................405
Two-dimensional arrays..............................................................................405
Naming Array Constants......................................................................................407
Working with Array Formulas...............................................................................408
Entering an array formula...........................................................................408
Selecting an array formula range.................................................................408

xxiii
Contents

Editing an array formula.............................................................................409


Expanding or contracting a multicell array formula...................................... 410
Using Multicell Array Formulas............................................................................ 411
Creating an array from values in a range...................................................... 411
Creating an array constant from values in a range........................................ 411
Performing operations on an array.............................................................. 412
Using functions with an array.....................................................................413
Transposing an array.................................................................................. 414
Generating an array of consecutive integers................................................. 415
Using Single-Cell Array Formulas.......................................................................... 416
Counting characters in a range.................................................................... 416
Summing the three smallest values in a range.............................................. 417
Counting text cells in a range..................................................................... 418
Eliminating intermediate formulas.............................................................. 419
Using an array instead of a range reference..................................................421
Chapter 19: Making Your Formulas Error-Free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Finding and Correcting Formula Errors..................................................................423
Mismatched parentheses.............................................................................424
Cells are filled with hash marks...................................................................425
Blank cells are not blank............................................................................425
Extra space characters................................................................................426
Formulas returning an error........................................................................426
#DIV/0! errors....................................................................................427
#N/A errors........................................................................................428
#NAME? errors...................................................................................428
#NULL! errors....................................................................................428
#NUM! errors.....................................................................................429
#REF! errors.......................................................................................429
#VALUE! errors..................................................................................430
Operator precedence problems.....................................................................430
Formulas are not calculated.........................................................................431
Problems with decimal precision..................................................................431
“Phantom link” errors.................................................................................432
Using Excel Auditing Tools..................................................................................432
Identifying cells of a particular type...........................................................432
Viewing formulas.......................................................................................433
Tracing cell relationships............................................................................433
Identifying precedents.......................................................................434
Identifying dependents......................................................................434
Tracing error values....................................................................................435
Fixing circular reference errors....................................................................435
Using the background error-checking feature...............................................435
Using Formula Evaluator.............................................................................436

xxiv
Contents

Searching and Replacing.....................................................................................438


Searching for information...........................................................................438
Replacing information................................................................................439
Searching for formatting............................................................................439
Spell-checking your worksheets...................................................................440
Using AutoCorrect...............................................................................................441

Part III: Creating Charts and Other Visualizations 443


Chapter 20: Getting Started with Excel Charts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
What Is a Chart?.................................................................................................445
How Excel handles charts............................................................................446
Embedded charts........................................................................................447
Chart sheets..............................................................................................449
Parts of a chart..........................................................................................450
Chart limitations........................................................................................452
Basic Steps for Creating a Chart...........................................................................453
Creating the chart......................................................................................453
Switching the row and column orientation...................................................454
Changing the chart type.............................................................................456
Applying a chart layout..............................................................................456
Applying a chart style................................................................................456
Adding and deleting chart elements............................................................457
Formatting chart elements..........................................................................458
Modifying and Customizing Charts.......................................................................459
Moving and resizing a chart........................................................................460
Converting an embedded chart to a chart sheet............................................460
Copying a chart..........................................................................................461
Deleting a chart.........................................................................................461
Adding chart elements................................................................................461
Moving and deleting chart elements............................................................462
Formatting chart elements..........................................................................462
Copying a chart’s formatting.......................................................................463
Renaming a chart.......................................................................................463
Printing charts..........................................................................................464
Understanding Chart Types..................................................................................464
Choosing a chart type.................................................................................465
Column charts............................................................................................467
Bar charts..................................................................................................469
Line charts................................................................................................469
Pie charts.................................................................................................. 471
XY (scatter) charts..................................................................................... 474
Area charts................................................................................................ 474
Radar charts.............................................................................................. 476

xxv
Contents

Surface charts............................................................................................477
Bubble charts.............................................................................................477
Stock charts..............................................................................................477
New Chart Types for Excel....................................................................................479
Histogram charts.......................................................................................479
Pareto charts.............................................................................................481
Waterfall charts.........................................................................................481
Box & whisker charts..................................................................................482
Sunburst charts.........................................................................................483
Treemap charts..........................................................................................484
Funnel charts.............................................................................................484
Map charts.................................................................................................486
Chapter 21: Using Advanced Charting Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Selecting Chart Elements.....................................................................................489
Selecting with the mouse............................................................................490
Selecting with the keyboard.......................................................................491
Selecting with the Chart Elements control...................................................491
Exploring the User Interface Choices for Modifying Chart Elements........................492
Using the Format task pane.........................................................................493
Using the chart customization buttons........................................................494
Using the Ribbon........................................................................................494
Using the Mini toolbar................................................................................495
Modifying the Chart Area....................................................................................495
Modifying the Plot Area......................................................................................496
Working with Titles in a Chart.............................................................................497
Working with a Legend........................................................................................498
Working with Gridlines........................................................................................500
Modifying the Axes.............................................................................................501
Modifying the value axis............................................................................501
Modifying the category axis........................................................................506
Working with Data Series.....................................................................................509
Deleting or hiding a data series................................................................... 510
Adding a new data series to a chart............................................................. 510
Changing data used by a series.................................................................... 511
Changing the data range by dragging the range outline........................ 511
Using the Edit Series dialog box.......................................................... 512
Editing the Series formula.................................................................. 512
Displaying data labels in a chart.................................................................513
Handling missing data................................................................................ 515
Adding error bars....................................................................................... 516
Adding a trendline..................................................................................... 517
Creating combination charts....................................................................... 518
Displaying a data table...............................................................................521
Creating Chart Templates.....................................................................................522

xxvi
Contents

Chapter 22: Creating Sparkline Graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523


Sparkline Types..................................................................................................523
Creating Sparklines.............................................................................................525
Customizing Sparklines.......................................................................................527
Sizing Sparkline cells..................................................................................528
Handling hidden or missing data.................................................................528
Changing the Sparkline type.......................................................................529
Changing Sparkline colors and line width.....................................................529
Highlighting certain data points.................................................................529
Adjusting Sparkline axis scaling..................................................................530
Faking a reference line...............................................................................531
Specifying a Date Axis........................................................................................533
Auto-Updating Sparklines....................................................................................535
Displaying a Sparkline for a Dynamic Range.........................................................535
Chapter 23: Visualizing with Custom Number Formats and Shapes . . . . . . . . . . . . . . . . 537
Visualizing with Number Formatting....................................................................537
Doing basic number formatting...................................................................537
Using shortcut keys to format numbers...............................................538
Using the Format Cells dialog box to format numbers...........................539
Getting fancy with custom number formatting.............................................540
Formatting numbers in thousands and millions....................................542
Hiding and suppressing zeros..............................................................543
Applying custom format colors............................................................544
Formatting dates and times................................................................545
Using symbols to enhance reporting............................................................546
Using Shapes and Icons as Visual Elements...........................................................550
Inserting a shape.......................................................................................550
Inserting SVG icon graphics........................................................................ 551
Formatting shapes and icons.......................................................................552
Enhancing Excel reports with shapes...........................................................554
Creating visually appealing containers with shapes..............................554
Layering shapes to save space.............................................................556
Constructing your own infographic widgets with shapes.......................556
Creating dynamic labels..............................................................................557
Creating linked pictures.............................................................................558
Using SmartArt and WordArt...............................................................................561
SmartArt basics.........................................................................................561
WordArt basics...........................................................................................562
Working with Other Graphics Types......................................................................563
About graphics files....................................................................................563
Inserting screenshots.................................................................................564
Displaying a worksheet background image...................................................564
Using the Equation Editor....................................................................................565

xxvii
Contents

Chapter 24: Implementing Excel Dashboarding Best Practices. . . . . . . . . . . . . . . . . . . . 567


Preparing for a Dashboard Project........................................................................567
Establishing the audience and purpose for the dashboard.............................568
Delineating the measures for the dashboard.................................................568
Cataloging the required data sources...........................................................569
Defining the dimensions and filters for the dashboard..................................569
Determining the need for drill-down features...............................................569
Establishing the refresh schedule................................................................570
Implementing Dashboard Modeling Best Practices.................................................570
Separating data, analysis, and presentation.................................................570
Starting with appropriately structured data.................................................571
Spreadsheet reports make for ineffective data models..........................571
Flat data files lend themselves nicely to data models............................572
Avoiding turning your data model into a database........................................572
Documenting and organizing your data model..............................................573
Implementing Dashboard Design Best Practices..................................................... 574
Keep it simple.................................................................................... 574
Don’t turn your dashboard into a data repository................................. 574
Avoid the fancy formatting................................................................575
Limit each dashboard to one printable page.........................................575
Format numbers effectively................................................................ 576
Use titles and labels effectively.......................................................... 576

Part IV: Managing and Analyzing Data 577


Chapter 25: Importing and Cleaning Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Importing Data...................................................................................................579
Importing from a file..................................................................................580
Spreadsheet file formats.....................................................................580
Database file formats..........................................................................580
Text file formats................................................................................581
HTML files.........................................................................................582
XML files...........................................................................................582
Importing vs. opening................................................................................582
Importing a text file...................................................................................583
Copying and pasting data...........................................................................587
Cleaning Up Data................................................................................................587
Removing duplicate rows............................................................................587
Identifying duplicate rows..........................................................................589
Splitting text.............................................................................................589
Using Text to Columns........................................................................591
Using Flash Fill..................................................................................592
Changing the case of text...........................................................................595

xxviii
Contents

Removing extra spaces...............................................................................596


Removing strange characters......................................................................597
Converting values.......................................................................................597
Classifying values......................................................................................598
Joining columns.........................................................................................599
Rearranging columns..................................................................................600
Randomizing the rows................................................................................601
Extracting a filename from a URL................................................................601
Matching text in a list................................................................................601
Changing vertical data to horizontal data....................................................603
Filling gaps in an imported report...............................................................606
Checking spelling.......................................................................................607
Replacing or removing text in cells..............................................................607
Adding text to cells....................................................................................608
Fixing trailing minus signs.........................................................................609
Following a data cleaning checklist.............................................................609
Exporting Data................................................................................................... 610
Exporting to a text file............................................................................... 610
CSV files............................................................................................ 610
TXT files............................................................................................ 610
PRN files........................................................................................... 611
Exporting to other file formats.................................................................... 611
Chapter 26: Using Data Validation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
About Data Validation.........................................................................................613
Specifying Validation Criteria.............................................................................. 614
Types of Validation Criteria You Can Apply............................................................ 615
Creating a Drop-Down List................................................................................... 617
Using Formulas for Data Validation Rules.............................................................. 619
Understanding Cell References............................................................................. 619
Data Validation Formula Examples........................................................................621
Accepting text only....................................................................................621
Accepting a larger value than the previous cell............................................621
Accepting nonduplicate entries only............................................................622
Accepting text that begins with a specific character.....................................623
Accepting dates by the day of the week.......................................................623
Accepting only values that don’t exceed a total............................................623
Creating a dependent list............................................................................623
Using Data Validation without Restricting Entry...................................................625
Showing an input message..........................................................................625
Making suggested entries............................................................................626
Chapter 27: Creating and Using Worksheet Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
Introducing Worksheet Outlines...........................................................................627
Creating an Outline.............................................................................................631

xxix
Contents

Preparing the data.....................................................................................631


Creating an outline automatically................................................................632
Creating an outline manually......................................................................632
Working with Outlines.........................................................................................634
Displaying levels........................................................................................634
Adding data to an outline...........................................................................635
Removing an outline..................................................................................635
Adjusting the outline symbols.....................................................................635
Hiding the outline symbols.........................................................................636
Chapter 28: Linking and Consolidating Worksheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
Linking Workbooks.............................................................................................637
Creating External Reference Formulas...................................................................638
Understanding link formula syntax.............................................................638
Creating a link formula by pointing.............................................................639
Pasting links.............................................................................................640
Working with External Reference Formulas...........................................................640
Creating links to unsaved workbooks...........................................................640
Opening a workbook with external reference formulas..................................641
Changing the startup prompt......................................................................642
Updating links...........................................................................................643
Changing the link source............................................................................643
Severing links............................................................................................643
Avoiding Potential Problems with External Reference Formulas..............................644
Renaming or moving a source workbook.......................................................644
Using the Save As command........................................................................644
Modifying a source workbook......................................................................644
Using Intermediary links............................................................................646
Consolidating Worksheets....................................................................................646
Consolidating worksheets by using formulas................................................647
Consolidating worksheets by using Paste Special..........................................648
Consolidating worksheets by using the Consolidate dialog box......................649
Viewing a workbook consolidation example..................................................650
Refreshing a consolidation..........................................................................653
Learning more about consolidation..............................................................654
Chapter 29: Introducing PivotTables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
About PivotTables...............................................................................................655
A PivotTable example..................................................................................656
Data appropriate for a PivotTable.................................................................659
Creating a PivotTable Automatically.....................................................................662
Creating a PivotTable Manually............................................................................663
Specifying the data....................................................................................663
Specifying the location for the PivotTable....................................................664
Laying out the PivotTable...........................................................................664

xxx
Contents

Formatting the PivotTable..........................................................................668


Modifying the PivotTable............................................................................670
Seeing More PivotTable Examples.........................................................................672
What is the daily total new deposit amount for each branch?.........................672
Which day of the week accounts for the most deposits?.................................672
How many accounts were opened at each branch, broken
down by account type?........................................................................... 674
How much money was used to open the accounts?........................................ 674
What types of accounts do tellers open most often?......................................675
In which branch do tellers open the most checking accounts
for new customers?.................................................................................676
Learning More....................................................................................................677
Chapter 30: Analyzing Data with PivotTables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
Working with Non-numeric Data...........................................................................679
Grouping PivotTable Items...................................................................................681
A manual grouping example........................................................................681
Automatic grouping examples.....................................................................683
Grouping by date...............................................................................683
Grouping by time...............................................................................688
Using a PivotTable to Create a Frequency Distribution...........................................689
Creating a Calculated Field or Calculated Item.......................................................691
Creating a calculated field...........................................................................693
Inserting a calculated item.........................................................................695
Filtering PivotTables with Slicers.........................................................................698
Filtering PivotTables with a Timeline...................................................................700
Referencing Cells within a PivotTable...................................................................701
Creating PivotCharts...........................................................................................703
A PivotChart example.................................................................................703
More about PivotCharts...............................................................................706
Using the Data Model..........................................................................................707
Chapter 31: Performing Spreadsheet What-If Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . 715
Looking at a What-If Example..............................................................................715
Exploring Types of What-If Analyses..................................................................... 717
Performing manual what-if analysis............................................................. 717
Creating data tables.................................................................................... 717
Creating a one-input data table...........................................................718
Creating a two-input data table..........................................................721
Using Scenario Manager..............................................................................725
Defining scenarios.............................................................................725
Displaying scenarios..........................................................................728
Modifying scenarios...........................................................................729
Merging scenarios..............................................................................729
Generating a scenario report...............................................................730

xxxi
Contents

Chapter 32: Analyzing Data Using Goal Seeking and Solver. . . . . . . . . . . . . . . . . . . . . . 733
Exploring What-If Analysis, in Reverse.................................................................733
Using Single-Cell Goal Seeking.............................................................................734
Looking at a goal-seeking example..............................................................734
Learning more about goal seeking...............................................................736
Introducing Solver..............................................................................................737
Looking at appropriate problems for Solver...................................................737
Seeing a simple Solver example...................................................................738
Exploring Solver options............................................................................. 743
Seeing Some Solver Examples...............................................................................744
Solving simultaneous linear equations......................................................... 745
Minimizing shipping costs.......................................................................... 747
Allocating resources...................................................................................750
Optimizing an investment portfolio............................................................. 751
Chapter 33: Analyzing Data with the Analysis ToolPak. . . . . . . . . . . . . . . . . . . . . . . . . . 755
The Analysis ToolPak: An Overview......................................................................755
Installing the Analysis ToolPak Add-In.................................................................756
Using the Analysis Tools......................................................................................756
Introducing the Analysis ToolPak Tools................................................................757
Analysis of variance...................................................................................757
Correlation.................................................................................................758
Covariance.................................................................................................759
Descriptive statistics..................................................................................759
Exponential smoothing...............................................................................759
F-test (two-sample test for variance)...........................................................760
Fourier analysis..........................................................................................760
Histogram.................................................................................................. 761
Moving average.......................................................................................... 761
Random number generation........................................................................763
Rank and percentile...................................................................................765
Regression.................................................................................................765
Sampling...................................................................................................766
T-test........................................................................................................766
Z-test (two-sample test for means)...............................................................767
Chapter 34: Protecting Your Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
Types of Protection.............................................................................................769
Protecting a Worksheet.......................................................................................770
Unlocking cells..........................................................................................770
Sheet protection options.............................................................................772
Assigning user permissions.........................................................................773
Protecting a Workbook........................................................................................ 774
Requiring a password to open a workbook.................................................... 774
Protecting a workbook’s structure...............................................................776

xxxii
Contents

Protecting a VBA Project.....................................................................................777


Related Topics....................................................................................................778
Saving a worksheet as a PDF file..................................................................778
Marking a workbook as final........................................................................778
Inspecting a workbook................................................................................779
Using a digital signature.............................................................................780
Getting a digital ID............................................................................780
Signing a workbook............................................................................780

Part V: Understanding Power Pivot and Power Query 781


Chapter 35: Introducing Power Pivot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Understanding the Power Pivot Internal Data Model..............................................783
Activating the Power Pivot Ribbon..............................................................783
Linking Excel tables to Power Pivot.............................................................785
Preparing your Excel tables................................................................786
Adding your Excel tables to the data model.........................................787
Creating relationships between your Power Pivot tables........................788
Managing existing relationships.........................................................790
Using Power Pivot data in reporting....................................................792
Loading Data from Other Data Sources..................................................................793
Loading data from relational databases........................................................793
Loading data from SQL Server.............................................................793
Loading data from other relational database systems...........................797
Loading data from flat files.........................................................................798
Loading data from external Excel files.................................................798
Loading data from text files...............................................................800
Loading data from the clipboard.........................................................801
Refreshing and managing external data connections....................................803
Manually refreshing your Power Pivot data..........................................803
Setting up automatic refreshing.........................................................803
Editing your data connection..............................................................805
Chapter 36: Working Directly with the Internal Data Model . . . . . . . . . . . . . . . . . . . . . . 807
Directly Feeding the Internal Data Model..............................................................807
Managing Relationships in the Internal Data Model...............................................813
Removing a Table from the Internal Data Model....................................................814
Chapter 37: Adding Formulas to Power Pivot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .817
Enhancing Power Pivot Data with Calculated Columns............................................817
Creating your first calculated column...........................................................818
Formatting your calculated columns............................................................819
Referencing calculated columns in other calculations....................................820
Hiding calculated columns from end users....................................................821

xxxiii
Another random document with
no related content on Scribd:
Aunt Martha bit her lips, and two bright pink spots showed on her
cheeks. “This is scandalous!” she exclaimed.
“It’s downright wicked!” said old Mrs. Lancaster.
The minister went on with the service, raising his voice to make
himself heard; but Don, and doubtless many others, had little thought
for what was being said inside the church.
At the end of the service many of the people hurried past the soldiers
on their way home; but others stood and watched with indignant
glances.
That event was only one of many other irritations that followed and
inflamed the hearts of the townsfolk.
“Aunt Martha, war has got to come,” said Don.
“Don’t speak of it, Donald,” she replied, and Don glanced once at his
aunt’s face and wished that he had held his tongue in the first place;
his aunt’s eyes were red and moist.
“All that cloth and powder is still in the cellar, isn’t it?” he asked a
while later.
“Yes, Donald; and your uncle intends to keep it there until he can find
a satisfactory way of getting it out, though what with all the trouble
that surrounds us, I do believe that he doesn’t often give it a thought
any more.”
“Seems too bad not to sell it,” said Don.
“Yes, I’ve said so myself, but he always nods and says, ‘Yes, that’s
right,’ and then his mind goes wandering off on—on other matters.”
David Hollis, and indeed all the members of the Committees of
Correspondence, had many matters to keep them busy. A close
watch was being kept on the troops in town. It was known that Gage
had sent two officers in disguise to make maps of the roads that led
to Boston; and rumor had it that he intended to send a strong force
to Concord to capture supplies that the patriots had stored there.
The month of March dragged past with war-like preparations on both
sides. Many of the townsfolk, realizing that open hostilities must
begin soon, had moved into the country. Samuel Adams and John
Hancock had gone to Lexington, where they were staying with the
Rev. Jonas Clark. David Hollis and Glen Drake had both made
several trips to the town with messages for them.
One day early in April, David Hollis took his wife aside out of hearing
of his nephew. “Martha,” he said in a low voice, “I want you to leave
the house for a while. There’s going to be trouble, and Boston will be
no safe place for you.”
Aunt Martha’s chin lifted a trifle. “And, pray, where should I go?” she
asked.
“To Cousin Deborah’s in Concord.”
“I shall not go!” Aunt Martha replied.
“But she has already prepared for you; I told her you’d come.”
“You had no right to say that.”
“But, Martha, listen to reason. I say there will be trouble—I know it!
And it’s coming soon. Need I speak plainer than that?”
“No, David, you need not. I understand. Yet I intend to remain right
here in our home.”
David Hollis threw out his hands and turned away. Then with another
gesture he said, “Martha Hollis, you are a foolish woman. I—I
command you to go; it is for your own good.”
Aunt Martha’s blue eyes flashed behind her spectacles. “And I refuse
to obey. My place is here, and here is where I stay.” Then with a
sudden flash of anger she exclaimed, “I’d like to see any Redcoats
drive me from my own home!”
David Hollis turned toward the fire and snapped his fingers several
times. “It’s too bad,” he said. “Stubbornness is not a virtue.”
“You have it!”
Uncle David made no reply.
“You tell Cousin Deborah that I’m sorry she has gone to any trouble
about me.”
“I don’t expect to go that way very soon.”
“Then Glen can see her.”
“Glen has gone—elsewhere.”
Aunt Martha was thoughtful. “Well,” she said at last, “as you say, it is
too bad, but, David, my mind is made up.”
“How would it be to send Donald? Seems to me it might be a good
vacation for him. He’s an able lad, and I know that he’d be glad to
make the trip. He could ride almost as far as Lexington with Harry
Henderson. Cousin Deborah would be glad to have him for
overnight.”
“Dear me!” said Aunt Martha. “I can’t allow it.”
But in the end she yielded, and that evening Don heard the news
with glee. “Your cousin is a nervous, exact kind of person,” his aunt
told him, “and I want you to tell her everything that I say.”
“But what is it?” asked Don.
“Tell her that I am very sorry she has gone to any trouble on my
account, but that I cannot with a clear conscience visit with her at
this time. Say also that when your uncle promised for me he had not
consulted me and therefore did not know all the facts.”
“She’ll want to know the facts,” said Don, grinning. “I’m kind of
curious myself, Aunt Martha.”
“Donald!”
But Don’s grin was irresistible, and his aunt smiled. “Never mind,”
she said. “And you’ll hurry home, won’t you?”
“I surely will, Aunt Martha.”
The next morning, the sixteenth of April, Don set out with Harry
Henderson, a raw-boned young fellow with red hair and a short
growth of red stubble on his face. The soldiers had just finished
standing parade on the Common when Don and Harry rattled by in
the cart; Harry’s light blue eyes narrowed as he watched them
moving in little groups to their barracks.
“Good morning to you, young sir,” said a cheerful voice.
Don, looking up, saw Harry Hawkins. “Good morning to you, sir,” he
replied.
Harry Henderson looked at his companion narrowly. “Friend of
yours?” he asked.
“Well, no, not exactly,” replied the boy.
“Friend of your uncle’s maybe?” Harry was grinning impudently now,
and Don’s cheeks were red.
“No; here’s how it is——” And Don gave a brief account of how he
had happened to meet the Redcoat.
“Well,” said Harry dryly, “I should think he might say good morning to
you.”
They passed the Common and finally turned into Orange Street and,
after some delay, drove past the fortifications on the Neck. “Clear of
’em b’gosh!” said Harry, cracking his whip. “We’ll reach Lexin’ton by
mid-afternoon if old Dan here doesn’t bust a leg.”
But Harry had not reckoned on horseshoes. Shortly before they
reached Medford, old Dan lost a shoe, and the circumstance caused
a delay of two hours. Then later Dan shied at a barking dog and
snapped one of the shafts. As a result Harry and Don did not reach
Lexington until almost ten o’clock.
“You’ve got to stay right here with me,” said Harry, “It’s too late for
you to reach Concord. I know your cousin, and she wouldn’t be at all
pleased to have you wake her at midnight—not she!” He laughed.
So Don remained at Lexington overnight and the next morning set
out on foot for Concord. He reached his cousin’s house just before
noon.
Cousin Deborah was a tall strong-looking woman with black hair,
black eyes and a nose that was overly large. She had once been a
school teacher and, as David Hollis used to say, had never lost the
look. “Where’s your Aunt Martha?” were her first words to Don.
“She decided she couldn’t come.”
“But Uncle David told me——”
Then followed the inevitable questions that a person like Cousin
Deborah would be sure to ask, and Don wriggled under each of
them. But after all, Cousin Deborah was good-hearted, and deep
within her she knew that she would have done the same as Don’s
aunt was doing, if she had been in similar circumstances—though
she would not acknowledge it now. “Your aunt always did have a
broad streak of will,” she said severely. “Now I want you to spend
several days with me, Donald.”
“Aunt Martha told me to hurry back.”
“That means you can stay to-night and to-morrow night,” Cousin
Deborah decided. “I’ll have dinner in a few moments, and then I want
you to tell me all the things that have happened in Boston.”
In spite of his cousin’s questions, which were many and varied, Don
managed to enjoy himself while he was at Concord. On the second
day he met a boy of his own age, and the two fished all morning from
the North Bridge. In the afternoon they went on a long tramp into the
woods along the stream.
At night Don was tired out and was glad when his cousin finally
snuffed the candles and led the way up-stairs. He was asleep shortly
after his head struck the pillow.
That night proved to be one of the most eventful in the history of the
Colonies.
CHAPTER V
THE REGULARS COME OUT

While Don was asleep, breathing the damp, fragrant air that blew
over the rolling hills and fields round Concord, his friend, Paul
Revere, was being rowed cautiously from the vicinity of Hudson’s
Point toward Charlestown. It was then near half-past ten o’clock.
Revere, muffled in a long cloak, sat in the stern of the small boat and
glanced now at his two companions—Thomas Richardson and
Joshua Bentley—and now at the British man-of-war, Somerset, only
a few rods off. The tide was at young flood, and the moon was rising.
The night seemed all black and silver—black shadows ahead where
the town of Charlestown lay, black shadows behind that shrouded
the wharfs and shipyards of the North End, and silver shimmering
splashes on the uneasy water and on the sleek spars of the
Somerset.
The sound of talking came from the direction of the man-of-war and
was followed by a burst of laughter that reverberated musically in the
cool night air. Revere blew on his hands to warm them. The little
boat drew nearer, nearer to Charlestown; now he could see the
vague outlines of wharfs and houses. Several times he glanced over
his shoulder in the direction of a solitary yellow light that gleamed in
the black-and-silver night high among the shadows on the Boston
side,—a light that burned steadily in the belfry of the Old North
Meeting-House behind Corps Hill as a signal that the British were on
their way by land to attack the Colonists.
“Here we are,” said one of the rowers, shipping his muffled oar and
partly turning in his seat.
A few minutes later the boat swung against a wharf, and the two
men at the oars held it steady while Revere stepped out. A brief
word or two and he was on his way up the dock. In the town he soon
met a group of patriots, one of whom, Richard Devens, got a horse
for him. Revere lost no time in mounting and setting off to warn the
countryside of the coming of the Redcoats.
He had not gone far beyond Charlestown Neck, however, when he
almost rode into two British officers who were waiting in the shadows
beneath a tree. One of them rode out into the middle of the path; the
other charged full at the American. Like a flash Revere turned his
horse and galloped back toward the Neck and then pushed for the
Medford road. The Redcoat, unfamiliar with the ground, had ridden
into a clay pit, and before he could get his horse free Revere was
safely out of his reach.
At Medford he roused the captain of the Minute-Men; and from there
to Lexington he stopped at almost every house along the road and
summoned the inmates from their beds. It was close to midnight
when he reached Lexington. Riding to the house of the Rev. Jonas
Clark, where Hancock and Adams were staying, he found eight men
on guard in command of a sergeant.
“Don’t make so much noise!” cried the fellow as Revere clattered up
to the gate.
“Noise!” repeated Revere in a hoarse voice. “You’ll have noise
enough here before long—the regulars are coming out!”
At that moment a window opened, and Hancock thrust his head out.
“Come in, Revere!” he said. “We’re not afraid of you!”
Revere dismounted and hurried inside. In a few words he told his
story, that the British were on their way either to capture Hancock
and Adams or to destroy the military stores at Concord. While he
was talking, William Dawes, who also had set out to warn the
people, clattered up to the door.
After he and Revere had had something to eat and to drink they
started for Concord and were joined by a Dr. Prescott, whom Don
had seen once or twice in company with his uncle. With Revere in
the lead the party rode on at a rapid pace.
About half-way to Concord, while Prescott and Dawes were rousing
the people in a house near the road, Revere spied two horsemen
ahead. Turning in his saddle, he shouted to his companions, and at
that moment two more horsemen appeared.
Prescott came riding forward in answer to the shout, and he and
Revere tried to get past the men, all of whom were British officers.
But the four of them were armed, and they forced the Americans into
a pasture. Prescott at once urged his horse into a gallop, jumped a
stone wall and, riding in headlong flight, was soon safe on his way to
Concord. Revere urged his horse toward a near-by wood, but just
before he reached it six British officers rode out, and he was a
prisoner.
“Are you an express?” demanded one of them.
“Yes,” replied Revere and with a smile added: “Gentlemen, you have
missed your aim. I left Boston after your troops had landed at
Lechemere Point, and if I had not been certain that the people, to the
distance of fifty miles into the country, had been notified of your
movements I would have risked one shot before you should have
taken me.”
For a moment no one spoke; it was clear that the Redcoats were
taken aback. Then followed more questions, all of which Revere
answered truthfully and without hesitating. Finally they ordered their
prisoner to mount, and all rode slowly toward Lexington. They were
not far from the meeting-house when the crash of musketry shook
the night air.
For an instant the major who was in command of the party thought
they had been fired on. Then he remarked to the officer beside him,
“It’s the militia.”
The officer laughed shortly and glanced at their prisoner. Then the
party halted, and the British took Revere’s horse. The major asked
him how far it was to Cambridge and, on being told, left the prisoner
standing in the field and with the rest of the party rode toward the
meeting-house.
A few minutes later Revere crossed the old burying-ground and
entered the town. He soon found Hancock and Adams again and
told them what had happened, and they concluded to take refuge in
the town of Woburn. Revere went with them. He had done his duty.
Perhaps it was a vague feeling of impending danger, perhaps it was
the mere twitter of a bird outside his window—at any rate Don awoke
with a start. All was darkness in the room. A light, cool wind stirred
the branches of the great elm at the side of the house; he could hear
the twigs rubbing gently against the rough shingles. He had no idea
what time it was; it must be after midnight, he thought; but somehow
he was not sleepy. He raised his head a trifle. Down-stairs a door
slammed; that seemed strange. Now someone was talking. “I
wonder——” he said to himself and then sat bolt upright in bed.
The church bell had begun to ring at a furious rate. Clang, clang!
Clang—clang! Don thought he had never before heard a bell ring so
harshly or so unevenly. He jumped out of bed and began to dress.
Clang! Clang! What in the world could be the matter? He could hear
shouts now and the sound of hastening footsteps. In his excitement
he got the wrong arm into his shirt. Clang! Clang—clang! He found
his shoes at last and with trembling fingers got them on his feet. He
unlatched the door and started carefully down the winding stairs. It
seemed as if there were a hundred steps to those creaking old
stairs. Twice he almost missed his footing—and all the while the bell
continued to clash and ring and tremble.
In the sitting-room a single candle was burning. Don got a glimpse of
his cousin Deborah, hastily dressed and still wearing her nightcap;
she was standing at the door, and his Cousin Eben, with a musket in
his hand and a powder horn over his shoulder, was saying good-bye.
Don saw him kiss his wife. Then the door opened, the candle
flickered, and he was gone.
“Cousin Deborah, what’s wrong?” cried Don.
“The regulars are coming!” And then Cousin Deborah burst into
tears.
Don bit his lips; he had never thought of his cousin as being capable
of tears.
They did not last long. A few movements of her handkerchief and
Cousin Deborah seemed like herself again. “Donald,” she said, “they
have begun it, and the good Lord is always on the side of the right.
Now I want you to go back to bed and get your rest.”
“Are you going back to bed, Cousin Deborah?”
“No; there will be no sleep for me this night.”
“Then I shall remain up also,” replied Don.
Cousin Deborah made no protest but went to the stove and poked
the fire.
The bell had ceased ringing now. The town of Concord was wide
awake.
While Don and his cousin were eating a hastily prepared breakfast
the Minute-Men and the militia assembled on the parade ground
near the meeting-house. Meanwhile other patriots were hard at work
transporting the military stores to a place of safety.
Dawn was breaking, and the mist was rising from the river when Don
and his cousin finally got up from the table. “Now, Donald,” said
Cousin Deborah, “I’ve been thinking all along of your Aunt Martha
and blaming myself for my selfishness in having you stay here with
me for so long. I’d give most anything if you were back there with
her. And yet——” She paused frowning.
“Oh, I can get back all right,” said Don confidently.
“How?”
“Why, by keeping off the roads as much as possible. I know the
country pretty well.”
“You’re a bright lad, Donald,” said Cousin Deborah. “You’re a bright
lad; and I don’t know but what you’d better start. Your aunt needs
you more than I do. But oh, Donald, you’ll be cautious!”
“I don’t think I ought to leave you here alone.”
“Drat the boy!” exclaimed his cousin and then smiled. “Bless you,
Donald,” she added, “I’ll be safe enough. I shall go to Mrs. Barton’s
until things are quiet again. Now go and get yourself ready.”
Don needed only a few moments in which to get his things together.
Then he walked with his cousin as far as Mrs. Barton’s house, which
was situated some distance beyond the North Bridge, bade her
good-bye and started back. It was growing lighter every minute now,
and the birds were singing in all the trees. On the road he met a
Minute-Man who was hurrying in the opposite direction, and asked
him the news.
“Regulars fired on our boys at Lexin’ton,” replied the fellow as he
hurried past. Over his shoulder he shouted, “Killed six of ’em—war’s
begun!”
Don said not a word in reply, but stood stock still in the road. For
some reason a great lump had come into his throat, and he thought
of his Aunt Martha. He must get to her as quickly as possible.
As he came near the North Bridge he saw the Provincial troops—the
Minute-Men and the militia of the town and detachments of Minute-
Men from some of the outlying towns; and all the while fresh soldiers
were hurrying to swell the numbers. The British, he soon learned,
were on their way to Concord, and several companies of Provincials
had gone out to meet them.
Don left the town and struck off into the open country several
hundred yards from the Lexington road. After a few minutes of rapid
walking he saw the detachment of Americans coming back. He
quickened his pace and finally broke into a run.
He had gone something more than a mile and a half when he
suddenly stopped and threw himself on the ground. There on the
road, marching steadily in the direction of Concord, was a large force
of regulars. He could see the flash of metal and the bright red of their
coats. For a while he lay there, panting. Then at last, spying a great
rock with a hollow just behind it, he crept toward it and waited.
The long column advanced slowly. Now Don could hear the crunch
of their feet on the hard road. He lifted his head cautiously and
began to count; there must easily be a thousand Redcoats. The
crunching grew louder as the head of the column came almost
opposite to him. Now he could hear the rattle of equipment and the
occasional jangling of a sword.
He Lifted His Head Cautiously and Began to Count.
It was some time before the rear of the column had passed. He
waited until it was perhaps a quarter of a mile up the road and then
got to his feet. He ought not to have much trouble in reaching Boston
if he started at once. He was about to resume his journey when a
fresh thought came to him. Ought he to go without knowing what
was to happen to the town of Concord—and to his Cousin Deborah?
For at least five minutes he struggled with the question. “No, I
oughtn’t!” he declared at last and, turning suddenly, began to retrace
his steps.
It was close to seven o’clock when the regulars, in two columns,
marched into Concord and sent a party over the North Bridge into
the country. Don found a clump of spruces growing on a hillside and
climbed into the lower branches of one of them. From that position
he could see the scattered houses and the two bridges, though the
distance was too great for him to be able to distinguish features or
even the outlines of anybody in the town.
Part of the King’s force seemed to have disbanded, and later when
Don heard the ring of axes he suspected that they were destroying
the stores that had not been carried away. “Well,” he thought, “they
won’t be able to destroy much.”
But when he distinguished blue smoke curling upward from several
places near the centre of the town he almost lost his grip on the
branch to which he was clinging. One of them was the court-house!
Where was the militia? Where were the Minute-Men? He made out
the peaked roof of his cousin’s house and the great elm standing
beside it, and observed with some satisfaction that no Redcoats
were close to it. Then a while later he saw the thread of smoke
above the court-house grow thinner, and at last it disappeared
altogether.
Don held his position in the tree for more than an hour. He ground
his teeth as he saw a detachment of soldiers leave the town and cut
down the liberty pole on the side of the hill. Where were the Minute-
Men and the militia?
The main body of the regulars was well inside the town. At the South
Bridge there was a small party on guard, and at the North Bridge
was another party of about one hundred. Don was so much occupied
with watching the Redcoats that he had failed to observe a long
double column of Provincials coming down the hill beyond the North
Bridge; they were moving at a fast walk and carried their guns at the
trail.
At first glance he thought there were no more than a hundred of
them, but as he watched he was forced to conclude that there were
at least three hundred. He pulled himself farther out on the limb and
waited.
The detachment of regulars, who were on the far side of the bridge,
hastily retired across it and prepared for an attack. When the
Provincials were a few rods distant the Redcoats opened fire, then
waited and fired again, and Don saw two men fall. Then he saw a
succession of bright flashes and heard the crash of arms as the
Provincials returned the fire. Several of the enemy fell. Then there
was more firing, and in a few minutes the British left the bridge and
ran in great haste toward the main body, a detachment from which
was on the way to meet them. The Provincials pursued the regulars
over the bridge and then divided; one party climbed the hill to the
east, and the other returned to the high grounds.
Don found himself trembling all over; he felt sick and dizzy. With
much difficulty he reached the ground, where he lay for a few
minutes. On getting to his feet, he saw the Redcoats who had first
crossed the North Bridge returning. In the town there seemed to be
much confusion; the sun glanced on red coats and polished
trimmings as men hurried here and there.
Don would not trust himself to climb the tree again, but threw himself
on the ground at the foot of it. He would rest for a while and then set
out on his long journey back to Boston, fairly confident that his
cousin had not been harmed. He had not slept a wink since some
time between one and two o’clock in the morning; now it was after
ten o’clock. So when his head began to nod he did not try very hard
to fight off sleep.
CHAPTER VI
ACROSS THE FLATS

Don was wakened by the sound of firing. He sat up and rubbed his
eyes; then, looking at the sun, he guessed that twelve o’clock had
passed. He could see nothing of the Redcoats; nor could he see
smoke anywhere inside the town. From the east came the sound of
firing that had wakened him, and men with muskets were hurrying
across fields in that direction. For a moment he thought of returning
to his Cousin Deborah’s; then he decided to push for Boston as fast
as he could.
Half running, half walking, he made his way in a southeasterly
direction in order to avoid the main road. Once he wondered whether
the Redcoat Harry Hawkins was with this expedition of British troops,
but somehow the thought was painful, and he turned his mind to
other things.
For some time he had been climbing a rocky hillside; now, on
reaching the crest, he got his last glimpse of the skirmish. The British
were in the road just outside of Lexington, and, far off as Don was,
he could see plainly that they were having a hard time of it. He could
see the flash of sabres as if the officers were urging their men to
advance. One officer was prancing here and there on a spirited black
horse, as if he had lost control of the animal. Then Don saw part of
the King’s troops open fire and saw a dozen or more muskets flash
in reply along an old stone wall on the opposite side of the road.
Before he heard the reports of them he saw the black horse fall.
Another glance and he saw a company of Minute-Men crossing a
distant field at a rapid pace. The sight of a battle going on almost
under his nose, the sound of guns, the smell of powder, all seemed
to hold him spell-bound, and only the thought of his Aunt Martha
alone in the little house in Pudding Lane caused him to turn and
hurry on his way.
Soon he was out of hearing of the firing, but from time to time he saw
detachments of Minute-Men and militia marching to the east. Once
he stopped at a solitary farmhouse and asked for something to eat.
A woman who was alone except for a little girl of nine or ten years
gave him bread and cheese and then prepared a small bundle of the
food for him to take along.
Don told her what he had seen at Concord and at Lexington, and her
lips quivered; but she smiled at him. “Such a day!” she exclaimed.
“My husband and my three brothers have gone. It seems that all the
men from the village have gone. I have heard that the town of
Dedham is almost empty; even the company of gray-haired old
veterans of the French Wars has gone. Such a day! Be careful, my
boy, and return to your aunt as soon as possible.”
Don thanked her for her kindness as he was leaving the house, and
soon he was hurrying on his way toward Boston. From Glen Drake
he had learned many of the secrets of woodcraft and had little
trouble in making his way through the thickets in the vicinity of Fresh
Pond. But mishaps will sometimes overtake the best of woodsmen.
As Don was descending a slope on the western side of the pond he
stepped on a loose stone, which turned under his weight and sent
him crashing headlong to the bottom. He lay there with teeth set and
both hands clenched; a sharp pain was throbbing and pounding in
his right ankle. Little drops of perspiration stood out like beads on his
forehead.
For several minutes he lay there; then as the pain decreased in
violence he sat up. But later when he rose he found that he dared
not put any weight at all on his right foot. Here was a predicament!
There was not a house in sight; he was a long way from the nearest
road; and night was coming on.
He tried to climb the slope down which he had slid, but the effort only
sent sharp pains shooting up his leg. Even when he crawled for only
a dozen yards or so on his hands and knees the pain would force
him to stop; it seemed that he could not move without giving the
ankle a painful wrench. Several times he shouted for help, but he
had little hope that anybody would be in that vicinity to hear him. So
at last he dragged himself to a little cove that was overgrown with
birches and willows; there he loosened his shoe and rubbed his
swollen ankle.
“Well,” he said to himself, “I’ve got to stay here all night, and I
haven’t a thing except my knife and——” He interrupted himself with
an exclamation; his knife was not in his pocket. Then he
remembered that he had left it at his Cousin Deborah’s.
The missing knife made his situation even more desperate than he
had supposed it was. With a knife he might have fashioned a bow
such as he had once seen Glen Drake use for lighting a fire; as it
was, he should have to keep warm as best he could.
The first thing he did was to choose a convenient hollow that was
protected at the back by the hill and on the sides by birches and the
willows. Then, breaking off a quantity of branches, he fashioned a
rude but effective windbreak for the front. By the time he had finished
doing that work it was twilight, and a cool wind was blowing across
the pond.
Don opened the package of food that the good lady at the farmhouse
had given him. There were bread and cheese and three small ginger
cakes; and when he had eaten half the food and put the rest by till
morning he felt a good deal better. Pulling his coat up round his
neck, he snuggled down on the light branches with which he had
carpeted the floor of his bower and prepared to wait for morning.
All light had faded from the sky, and the wind was rising steadily.
Loose twigs all round him tapped incessantly against one another in
tune with the wind. Don shivered and forgot the dull pain in his ankle.
Out in the pond and down close to the shore on both sides of the
cove he could hear strange little splashes, and in the thickets behind
him a pair of owls were calling every now and then. If it had not been
for thoughts of Aunt Martha, Don might really have enjoyed his
experience. He did not doubt that he should be able to walk in the
morning, and he rather liked being out alone as Glen Drake had
been many, many times.
Once he dozed off and awoke some time later, feeling cold and
hungry. The twigs were tapping all about him; somewhere far to the
south a hound was baying mournfully; and in front of him the moon
had covered the pond with a silvery sheen.
Again Don dozed off, and then awoke with a violent start. Somebody
—or something—was moving about in the underbrush on the slope
above him. Then a stone rattled down and bounded into the water.
Startled at the loud splash it made, Don gave an involuntary
exclamation. An instant later he heard someone call his name.
“O Don!” the call was repeated.
Don sat up. “Who is it?” he shouted in reply.
“Yer safe and sound? Praise be for that!”
“Glen!” cried Don, pulling himself upward.
In a moment the old trapper was at the foot of the slope, and Don
was explaining the accident that had befallen him.
“Well, yer a plucky lad,” said Glen. “I tracked ye all the way from
Concord, and when I found you was headin’ fer Fresh Pond I began
to have my fears. Here, now, let me take ye on my back, and we’ll
talk as we go along.”
Don was a sturdy boy and unusually solid for his age, but Glen
Drake lifted him to his back as if he had been no more than a child;
Don could feel the muscles in the old trapper’s shoulders play up
and down as Glen climbed the slope easily and walked quite as well
as if it had been daylight.
“What happened to the Redcoats, Glen?” asked Don.
“They got licked,” Glen replied promptly. “They ran most all the way
from Lexin’ton, and some of ’em fell and lay still with their tongues a-
hanging out; they were that tired. They lost a lot of men, Don, and
serves ’em right. Our boys kept a-coming from all directions—and
most of ’em know how to shoot too! I tell you, if a second force of the
King’s men hadn’t come out, not one of the Redcoats that tried to
burn Concord would have got back alive. Now they’re sewed up tight
in Boston; we’ve got an army watchin’ the town, and it’s growing
every minute.”
“How’s Aunt Martha, and how am I ever going to get back to her?”
“Your Aunt Martha is all right—at least, she was the last I saw her. As
to how you’re a-goin’ to get back, I can’t say for certain. But I’ll get
you back somehow; you trust me for that.”
“Where’s Uncle David?”
“He’s at Cambridge with the army. I’m sort of with the army myself,
though I don’t guess I’ll ever do much drillin’.” Glen Drake chuckled.
“Morning’s a-coming, Don; morning’s a-coming, and we’re at war!”
Don thought of his Aunt Martha, alone in Pudding Lane.
All the while Glen had been tramping with long strides in the
direction of the main part of Cambridge. Only once did he pause,
and then it was to fill his pipe. At last he turned into a lane at the right
of the road and approached a small house that overlooked the river.
By that time dawn was well on the way.
Don observed two or three soldiers at the side of the house; they
were cooking bacon over a small fire. “Hi, there!” shouted one. “I see
you found your boy.”
“Yes, I found him,” replied Glen. “Where’s Dave Hollis?”
“He hasn’t come in yet.”
Glen carried Don into the house, spoke a few words to a woman who
was preparing the morning meal and then, at her bidding, climbed
the stairs.
By the time the rays of the sun were slanting down on the river Don
was asleep deep within the feathery softness of a huge four-posted
bed. The woman down-stairs had given him a delicious breakfast,
and after he had eaten it the old trapper had rubbed his injured ankle
with some potent, vile-smelling ointment that he said would cure
anything from rheumatism to nose-bleed.
Near the middle of the afternoon Don awoke and a little to his
astonishment saw his Uncle David sitting beside Glen at one side of

You might also like