Excel Expert 2019 Ebook
Excel Expert 2019 Ebook
Certification
Guide
EXCEL
EXPERT
Courseware Number: 3274
Exam: MO-201
Microsoft® Office 365 & 2019 Series
Microsoft®
Excel
Expert Certification Guide
Exam MO-201
February 2020
© CCI Learning Solutions Inc.
Preface About This Courseware
This courseware is copyrighted and all rights are reserved by CCI Learning Solutions Inc. No part of this
publication may be reproduced, transmitted, stored in a retrieval system, modified, or translated into any
language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical,
chemical, manual or otherwise without written permission of CCI Learning Solutions, Canada: 1-800-668-
1669.
The information in this courseware is distributed on an “as is” basis, without warranty. While every precaution
has been taken in the preparation of this courseware, neither the author nor CCI Learning Solutions Inc. shall
have any liability to any person or entity with respect to any liability, loss, or damage caused or alleged to be
caused directly or indirectly by the instructions contained in this courseware or by the computer software
and hardware products described therein.
Courseware Team: Irina Heer, Kenneth Kozakis, Kelly Hegedus, Sue Wong
Copyright © 2020 CCI Learning Solutions Inc.
ISBN: 978-1-55332-551-2
All rights reserved.
Printed in Canada.
CCI Courseware#: 3274-1
Any brand name or product mentioned in this publication is a trademark or registered trademark of their
respective companies and are used for identification purposes only.
The Microsoft Office Specialist Program enables students to demonstrate the knowledge, skills, and abilities to productively use
Microsoft Office. The MOS Program enables students to tap into the full functionality of the Microsoft Office programs, resulting in
higher levels of individual performance and confidence, which can help those with MOS certifications distinguish themselves in the
workplace from those who are not certified. To learn more about these and other certifications, please visit www.certiport.com.
The Microsoft Office Specialist (MOS) certification exams validate skills within the applicable Microsoft Office programs. The Office 365
& Office 2019 exams are powerful tools for assessing student skills and preparing students for real-world application. Skill assessments
include performance-based formats, revised instructions, multiple projects, and questions integrated with objective domains.
The available Microsoft Office Specialist Program 2019 exams include:
• Microsoft Office 365 & Office 2019 Word
• Microsoft Office 365 & Office 2019 Excel
• Microsoft Office 365 & Office 2019 PowerPoint
• Microsoft Office 365 & Office 2019 Outlook
• Microsoft Office 365 & Office 2019 Access Expert
• Microsoft Office 365 & Office 2019 Word Expert
• Microsoft Office 365 & Office 2019 Excel Expert
Table of Contents
About This Courseware
Course Description ......................................................................................................................................................................................... vii
Course Series .......................................................................................................................................................................................... vii
Course Prerequisites ............................................................................................................................................................................ vii
System Requirements ......................................................................................................................................................................... vii
Classroom Setup .............................................................................................................................................................................................viii
Downloading the Exercise Files ................................................................................................................................................................viii
Course Design ................................................................................................................................................................................................... ix
Course Objectives ............................................................................................................................................................................................ ix
Conventions and Graphics............................................................................................................................................................................. x
Appendices
Appendix A: Courseware Mapping ....................................................................................................................................................... A 2
Appendix B: Glossary of Terms ............................................................................................................................................................... A 5
Appendix C: Index ........................................................................................................................................................................................ A 7
Course Description
This Microsoft® Office 365 & 2019 Excel Expert Certification Guide teaches the skills necessary to create and
edit professional-looking spreadsheets for a variety of purposes and situations.
Students who complete this course will have reviewed all the exam objectives and be prepared to take the
Microsoft Office Specialist Excel Expert Exam #MO-201. Successful completion of the certification exam
validates the knowledge and skill sets for individuals seeking employment or advancement in their careers.
Course Series
This guide is one of seven courses in CCI’s Microsoft Office 365 & 2019 series. The courses available in the
series include:
• Word Associate • PowerPoint Associate • Word Expert
• Excel Associate • Outlook Associate • Excel Expert
• Access Expert
Course Prerequisites
This course is designed for students who are familiar with the Microsoft Windows operating system, personal
computers, using a keyboard, and using a mouse. The course assumes that students have completed the
Microsoft Excel Associate course or have equivalent knowledge and experience. Students should be able to:
Start and run Windows. Create workbooks and navigate within Excel.
Use the taskbar. Manipulate cell data.
Use the Start button. Use formulas.
Use the Help feature. Format worksheets.
Use Minimize, Restore Down/Maximize, or View and print workbooks.
Close. Work with charts.
Use the left and right mouse buttons. Organize data.
Understand file management techniques. Use data tools to search for, find, and replace
Navigate between files, folders, or drives. data.
System Requirements
This courseware was developed using specific software and hardware configurations. To complete this
courseware, you should have the following for each student:
• A desktop or laptop system running Microsoft® Windows 10 and Microsoft® Office 365 or 2019
• Mouse or comparable pointing device
• 101-key enhanced keyboard
In the materials contained in this courseware, we assume that you have met these criteria, and that you have
successfully installed both Windows and Office on your computer.
Note: This course was written using Microsoft Office 365 Version 1902; if you subscribe to Office 365,
features may be added or updated without notice.
Classroom Setup
The features and exercises shown in this courseware were developed using the standard installation of the
Microsoft Office 365 Version 1902 Desktop applications on a system with Windows 10. If your computers
have another version of Windows or Office 365 installed, you will need to adjust accordingly to accommodate
for the differences in dialog boxes or command sequences.
It is likely your teacher set up the classroom computers based on the system requirements to run the software
for this course. Most software configurations on your computer are identical to those on your teacher's
computer. However, your teacher may use additional software to demonstrate network interaction or related
technologies.
Teacher Resources are available and are produced specifically to assist an educator in preparing to deliver
the course using the CCI materials. Contact your coordinator or administrator or call your CCI Account
Manager for information on how to access these resources.
3. Depending on the browser you are using, the ZIP file may be automatically saved in your Downloads
folder, or you may be prompted to open or save the file. Save (or move) the downloaded ZIP file to your
Desktop.
4. Right-click the ZIP file on your Desktop, then click Extract All to display the Extract Compressed (Zipped)
Folders dialog box.
5. Click the Browse button, navigate to the Desktop, click the Select Folder button to confirm the Desktop
as the location for extracting the files, then click the Extract button. A folder named 3274 Exercise Files
should now reside on your Desktop.
Within the 3274 Exercise Files folder, you will find a StarterFiles, ResourceFiles, and MyProjects folder. The
StarterFiles folder contains data file(s) you are directed to open at the beginning of an exercise. The
ResourceFiles folder contains supplemental files that you will be directed to access during an exercise.
The MyProjects folder will be empty. As you perform the exercises for a lesson, you will be directed to
save your work in the MyProjects folder.
Course Design
This course book was developed for instructor-led training and will assist you during class. Together with
comprehensive instructional text and objectives checklists, this course book provides easy-to-follow hands-
on exercises and a glossary of course-specific terms. This course book is organized in the following manner:
Course Objectives
This course book teaches the skills you will need to successfully complete the Microsoft Excel Expert Exam
MO-201. These skill sets are introduced using multiple types of business and personal workbooks.
Folder Names – Names of folders and specific locations are indicated in italic font style.
File Names – Names of files are indicated in bold font style.
Exercise Text Entry – Content to be entered by the student during an exercise appears in Times New Roman,
10pt, bold font.
Key Terms – Vocabulary terms that are presented in the narrative appear in bold, italic font style.
Procedures – Procedures and commands you are instructed to activate are indicated in bold font style.
Objective 1.1.1, 1.1.2 – This indicates the numbered objective from the Microsoft Office exam being covered
in the topic. Refer to the Appendix for a complete listing of exam objectives.
Technical Notes point out exceptions or special circumstances that you may find when working through a
particular process, or may indicate there is another method to complete the task.
Learn to Exercise
Learn to headings signal the start of step-by-step, hands-on exercises or other activities.
Microsoft ®
Excel
Expert Certification Guide
Lesson 1: Advanced
Formatting
Lesson Objectives
In this lesson, you will apply conditional formats, custom cell formats, and international formats, as well as use
the +Body and +Heading fonts. Upon completion of this lesson, you will be able to:
Create custom conditional formatting rules using Use international currency symbols.
formulas. Configure the editing and display language.
Apply custom number, accounting, date, and Understand +Body and +Heading fonts.
time formats.
The Excel courseware covered the topic of using the Ribbon to create conditional formats. The Ribbon
method is easy to use and enables you to create the most frequently used conditional formats. Behind the
scenes, the Ribbon method creates conditional formatting rules. You can also create these rules directly by
using the New Formatting Rule dialog box (Figure 1-2). Click New Rule or More Rules in one of the
Conditional Formatting drop-down menus to open the New Formatting Rule dialog box.
The New Formatting Rule dialog box includes the following rule types in the Select a Rule Type list.
• Format all cells based on their values – The main application of this rule is to display indicators that
show how the values in a range of cells relate to each other. For example, you may want cells with the
highest values to show in red, while the cells with the lowest values show in blue. Excel will choose
gradient colors between the red and blue for all other cells with the data values in between the two
extremes. You can choose one of four main types of indicators: a 2-color scale, a 3-color scale, a data
bar, or an icon set. In addition, you can choose from several different types of icons for the icon set.
• Format only cells that contain – The most commonly-used rule, offering a wide variety of operators to
select the cells to highlight, such as between, greater than, and equal to. All cells that meet that rule will
be highlighted with the same formatting.
• Format only top or bottom ranked values – Apply a specific format to the cells with the highest or
lowest values or percentile in a range of cells. For example, you can use this rule to identify the 10% of
students with the highest-ranking scores in a course.
• Format only values that are above or below average – Apply a specific format to cells that are above
or below the average of a range of cells. Excel allows you to choose from the mean average or various
degrees of standard deviation from the mean average.
• Format only unique or duplicate values – Identify and apply a specific format to all cells within a range
with duplicate or unique values.
• Use a formula to determine which cells to format – Enter a formula that evaluates as TRUE or FALSE
to enable the conditional formatting for the cells within the range. This formula may reference another
cell in the same worksheet, but not another worksheet or workbook.
A cell may have both a manual format as well as a conditional format applied to it. If a cell is not affected by
a conditional format, the cell will use the manual format.
Formatting options include only the font styles (regular, bold, italics, or bold and italics), font colors, borders,
and background fill patterns. You may not choose different font names or font sizes in a conditional format.
You may apply multiple conditional formats to a range of cells at the same time. For example, one rule may
be to display a certain color if the value is less than 3,000; another rule to display a different color if the value
is between 3,000 and 10,000; and a third rule if the value is greater than 10,000. In this situation, the rules do
not conflict with each other and one of them will be in effect at any given time.
Suppose instead that one rule is in effect when the value is less than 10,000 and another rule is in effect when
the value is greater than 3,000. In this case, the two rules overlap. Generally, the rule listed higher than the
other in the Rules Manager will override the other. This is known as rule precedence. However, both will take
effect if they do not conflict; for example, when one rule specifies to display an icon set and the other specifies
to display a background fill color.
The rules in the Rules Manager window apply in reverse sequence to when they were added; that is, the latest
rule added is always placed at the top of the list and takes precedence over any rules below it. The sequence
of these rules can be changed – simply select a rule and click Move Up or Move Down.
Note: You can also apply manual formatting to a cell using the Format Cells dialog box or by changing the
formatting settings directly from the Ribbon. If the cell also has a conditional format, then the conditional
format will always take precedence over the manual formatting.
1. Open New York Temperatures Basic Formatting.xlsx located in the 3274 Exercise Files\StarterFiles
folder.
The New York Temperatures Basic Formatting worksheet shows the average monthly temperature for New
York City from 2005 to 2020. You will create a conditional format using the Ribbon to set the fill color to blue
for any cell that contains a temperature value of less than 32 degrees Fahrenheit (0 degrees Centigrade).
3. On the Home tab, in the Styles group, click Conditional Formatting, then click Highlight Cells Rules,
Less Than.
The Less Than dialog box opens with default values entered for you.
4. In the Less Than dialog box, enter: 32 in the Format cells that are LESS THAN field, then click the drop-
down arrow in the with list box and click Custom Format.
Because the Custom Format option was selected, the Format Cells dialog box opens.
5. In the Format Cells dialog box, click the Fill tab, then click the blue standard color (bottom line, third
from the right) and click OK.
7. On the Home tab, in the Styles group, click Conditional Formatting, then click New Rule.
8. In the New Formatting Rule dialog box, click Format only cells that contain in the Select a Rule Type
list.
9. In the Edit the Rule Description section, click the drop-down arrow in the second list box and click greater
than. In the right-most field, enter: 75.
11. In the Format Cells dialog box, click the red standard color (bottom row, second from the left), and click
OK.
12. In the New Formatting Rule dialog box, click OK to complete the creation of the conditional formatting
rule.
13. On the Home tab, in the Styles group, click Conditional Formatting, then click Manage Rules.
14. Click the bottom rule (Cell Value < 32), then click Edit Rule.
16. In the Format Cells dialog box, click the light blue standard color (bottom row, fourth from the right),
then click OK.
17. In the Edit Formatting Rule dialog box, click OK. In the Conditional Formatting Rules Manager dialog
box, click OK.
19. Click cell B6, then click the Fill Color drop-down arrow in the Ribbon. In the Theme Colors section of the
drop-down menu, click the Gold, Accent 4, Lighter 40% color.
23. Click the Undo button in the Quick Access Toolbar once to undo the change to cell B6.
Cell B6 is now back to the light blue background color, and the gold background color that you manually
set is no longer visible. You can remove the conditional formatting from a selected range of cells or from
the entire worksheet.
24. On the Home tab, in the Styles group, click Conditional Formatting, click Clear Rules, and then click
Clear Rules from Entire Sheet.
Notice that the manual formatting in cell B6 is now in effect because the conditional formatting has been
removed.
25. With cell B6 still selected, click the Fill Color drop-down arrow in the Ribbon, then click No Fill in the
drop-down menu.
In Figure 1-4a, the formula =A$1=$B$19 is used for a new conditional format on the cell range A1:M17, as
shown in Figure 1-4b.
Figure 1-4a: New Formatting Rule – Using a formula Figure 1-4b: Result of formatting rule on selected cell range
1. Open New York Temperatures Formatting Formulas.xlsx located in the 3274 Exercise Files\StarterFiles
folder, and save it as My New York Temperatures Formatting Formulas.xlsx in the 3274 Exercise
Files\MyProjects folder.
Cell Value
B19 Feb
C19 2006
Excel automatically formatted cell C19 using the same settings as the cells above containing numbers.
You need to clear this formatting so that it shows as a year value without the decimal digits.
3. Select cell C19 again, then on the Home tab, in the Editing group, click Clear, and click Clear Formats.
5. On the Home tab, in the Styles group, click Conditional Formatting, then click New Rule.
6. In the New Formatting Rule dialog box, click Use a formula to determine which cells to format in the
Select a Rule Type list.
7. In the Format values where this formula is true field, type: =A1=$B$19.
9. In the Format Cells dialog box, on the Fill tab, click the green standard color (bottom row, fifth from the
right), and click OK.
10. In the New Formatting Rule dialog box, click OK to complete the creation of the conditional formatting
rule.
In the worksheet, only cell C1 is highlighted in green because it is the only cell in which the formula
entered in step 6 evaluates to the value of TRUE (for this cell, the formula is adjusted to =C1=$B$19).
The conditional format can be modified so that the entire column is highlighted in green.
11. Click Conditional Formatting in the Ribbon, then click Manage Rules.
12. With the sole rule already selected, click Edit Rule.
13. In the Format values where this formula is true field, change the formula to: =A$1=$B$19 and click OK.
14. In the Conditional Formatting Rules Manager dialog box, click OK.
The entire column is now highlighted. Every cell (not just C1) in the cell range C1:C17 will now have the
formula in the conditional format adjusted to =C1=$B$19.
15. Ensure that the range A1:M17 is still selected, click Conditional Formatting, then click New Rule.
16. In the New Formatting Rule dialog box, click Use a formula to determine which cells to format in the
Select a Rule Type list.
17. In the Format values where this formula is true field, type: =$A1=$C$19
18. Click the Format button, click the orange standard color (bottom row, third from the left), and click OK.
19. In the New Formatting Rule dialog box, click OK to complete creating the conditional formatting rule.
20. Click in any blank cell outside of the range A1:M17 to view the results of the conditional formatting.
With these changes, every cell in column J is green, except cell J15. Every cell in row 15 is orange,
including cell J15.
23. Click Conditional Formatting in the Ribbon, then click Manage Rules.
24. In the Show formatting rules for list box, click the arrow and select This Worksheet.
25. With the top-most rule already selected, click the Move Down button, then click OK.
By switching the sequence of the conditional formatting rules, the one that highlights in green now takes
precedence. The entire column is now green, including cell J15.
Excel provides a good variety of standard display formats for numbers, dates, times, and text characters. The
most commonly used options are easily accessible from the Ribbon.
In some cases, you may need to use special formats that are not one of these frequently-used cell formatting
categories. For example, you may need special formatting for data such as dates, part numbers, phone
numbers, and currencies (as you would in many European and Asian countries).
You can also create your own custom number format, using the following specification:
positive number format; negative number format; zero format; text format
Notice that this format has four sections separated by semicolons. A custom format does not require all four
sections; it can have as few as one section. If you specify only the first section, Excel will use this same format
for all numbers (positive, negative, and zero). If you specify only the first two sections, Excel will use the
positive number format for zero values as well as positive values and the format in the second section for
negative numbers.
You can specify each numeric format by using a sequence of symbols to indicate the position and type of
each of the numeric digits to be displayed. Some symbols that can be used in a custom format are:
# Display a digit, but do not display anything for leading and trailing zeros.
? Display a digit and replace trailing zeros with a blank space so that multiple cells with this
format are aligned by the decimal point.
, (comma) Separate a number into thousands and scale a number by a multiple of one thousand. In
some countries, the period (.) is used as the thousands separator.
. (period) Normally used as a decimal point. In some countries, the comma (,) is used as the decimal
point.
_ (underscore) Add a blank space that is the width of the character following the underscore in the custom
format. For example, the format #,##0.00_- has _- at the end, which means leave a space
that is the width of the minus sign. This format is used for the positive number component
of the Currency Style format to ensure numbers are aligned by the decimal point yet allows
for the brackets for negative numbers.
color Apply black, blue, cyan, green, magenta, red, white, or yellow.
conditional Specify a simple condition when this format applies. For example, the format
expression [Green][>1000]#,##0 displays the number in a cell in green only if it is greater than 1,000.
However, as the conditional formatting feature in the Ribbon is more flexible and powerful
than this feature, you should use the Ribbon feature most often.
“text” The double quotation marks tell Excel to insert the specified text in the displayed value. For
example, the format "$"#,##0.00" DR” places the $ character at the left side and a DR at the
right side of the displayed number.
* “character” The “*” symbol tells Excel to fill the remainder of the cell with the specified character.
Examples
Value Format Displayed Value
98765.4 #.### 98765.4
98765.4 0.000 98765.400
98765.4 ?.??? 98765.4 (with two blank spaces at the end)
98765.4 [Blue]#,##0.00_);[Red](#,##0.00) 98,765.40 (blue color)
-98765.4 [Blue]#,##0.00_);[Red](#,##0.00) (98,765.40) (red color)
36000 #,##0 36,000
36000 #, 36
36000000 #,, 36
36000000 #,###, 36,000
36 0000 0036
123456.78 “Cdn” $#,##0.00 Cdn $123,456.78
123456789 “Part #” 000-00-0000 Part # 123-45-6789
456.78 0.00 “cm” 456.78 cm
456.78 *$0.00 $$$$$456.78 ($ repeats as necessary to fill the
space at left)
The fourth section (text format) of the custom formatting specification applies only if the cell contains a text
string instead of a number. You can also display text strings inside cells containing numeric values.
You can delete custom cell formats that you no longer need or have created by mistake. However, you cannot
delete any of the built-in cell formats.
1. Open Destination Profiles Numeric.xlsx located in the StarterFiles folder, and save it as My
Destination Profiles Numeric.xlsx in the MyProjects folder.
2. Select cells B7:E8 and, on the Home tab, in the Number group, click the Number Format dialog box
launcher. If necessary, select the Number tab.
4. Reduce the Decimal places value to 0, select Use 1000 Separator (,) to turn it on, and click OK.
5. Select cells B13:E13, then click the Number Format dialog box launcher in the Number group.
6. In the Category section, click Custom, and in the Type section, click #,##0 (fourth from the top).
Notice how the preview of the data changes in the Sample section of the dialog box when you select the
custom format.
7. Click OK.
8. Select cells B15:E15, then click the Number Format dialog box launcher in the Number group.
9. In the Category section, click Custom, and in the Type section, click #,##0_);[Red](#,##0) (seventh from
the top), and click OK.
10. With cells B15:E15 still highlighted, click the Number Format dialog box launcher in the Number group.
11. Click the Custom category, and change the formatting instructions in the Type field to:
[Blue]#,##0;[Red]-#,##0. Click OK, then click in a blank area of the worksheet to deselect these cells.
Notice that the positive values are blue and the negative values are red. You can select from a number
of different colors to highlight positive and/or negative numbers.
12. Select cell D15 and click the Number Format dialog box launcher in the Number group.
Notice that the new format created earlier has been added at the bottom of the list of custom formats.
Now you want to add the text “m” or “ft” to the numbers in row 15. Because these cell formats have both
a positive and negative section, you must add the text to both.
13. In the Type field, change the format code to: [Blue]#,##0 "ft";[Red]-#,##0 "ft" and click OK.
14. Select cells B15:C15, and click the Number Format dialog box launcher in the Number group.
15. Click the Type field, change the format code to: [Blue]#,##0 "m";[Red]-#,##0 "m" and click OK.
16. Select cell E15, click the Number Format dialog box launcher in the Number group, select the
[Blue]#,##0 "m";[Red]-#,##0 "m" custom format code at the bottom of the list, and click OK.
17. Change several other cells containing numeric values to the following custom formats:
Figure 1-6: Format Cells dialog box – Accounting category, Symbol list
You can create custom accounting formats by combining the currency symbol with the custom number
formatting described previously.
1. Open Destination Profiles Accounting.xlsx located in the StarterFiles folder, and save it as My
Destination Profiles Accounting.xlsx in the MyProjects folder.
2. Select cells B11:E11, then on the Home tab, in the Number group, click the Number Format dialog box
launcher.
4. Click the Symbol drop-down arrow, then click $ English (United States).
The formatting code is much more complex because a specific currency symbol was selected in step 4.
6. Click OK.
Notice that the numbers in this row are indented to the left by one space. This space is reserved for the
right bracket; if the number is less than zero, brackets are displayed on both the left and right side.
Because these number are all greater than zero, a blank space appears on the right side.
One of the differences between the Accounting and Currency formats is that the currency symbol in the
Accounting format is at the far left of the cell, whereas it is immediately to the left of the number when
the Currency format is used.
7. With cells B11:E11 still highlighted, click the Number Format dialog box launcher in the Number group.
8. Click the Custom category, delete the contents of the Type field, and type: $0.00000;-$0.00000. Click OK.
9. Select cells B9:E9. On the Home tab, in the Number group, click the Number Format dialog box
launcher.
10. In the Custom category, change the custom format to: $#,##0,,, "billion" and click OK.
The various codes that can be used in a custom date and time format are:
d, dd, ddd, dddd Display the day of the month. The “d” version displays the days as 1 to 31; “dd”
displays 01 to 31 (always two digits); “ddd” displays “Sun” to “Sat”; and “dddd” displays
“Sunday” to “Saturday.”
m, mm, mmm, Display the month of the year. The “m” displays 1 to 12; “mm” displays 01 to 12;
mmmm, mmmmm “mmm” displays “Jan” to “Dec”; “mmmm” displays “January” to “December”; and
“mmmmm” displays “J” to “D” (first letter of the month name).
yy, yyyy Display the year value. The “yy” displays 00 to 99; “yyyy” displays the full combined
century and year value.
h, hh Display the hour value. The “h” displays 0 to 23; “hh” displays 00 to 23.
m, mm Display the minutes value within the context of a time value. The “m” displays 0 to 59;
“mm” displays 00 to 59.
s, ss Display the seconds value. The “s” displays 0 to 59; “ss” displays 00 to 59.
AM/PM, am/pm, Display the time using the 12-hour clock format (hour value is 0 to 11). The “AM/PM”
a/p displays “AM” or “PM” in upper case; “am/pm” displays them in lower case; “a/p”
displays only the first character of “am” and “pm.” If this symbol is absent, the time is
displayed using the 24-hour clock format (hour value is 0 to 23).
1. Open Age Calculator.xlsx located in the StarterFiles folder, and save it as My Age Calculator.xlsx in
the MyProjects folder.
3. Select cells B1:B2. On the Home tab, in the Number group, click the Number Format dialog box
launcher.
5. Click in the Type field. Move to the year section at the far right side of the field and type: yy to expand
the year format to four digits. Click OK.
6. With cells B1:B2 still selected, on the Home tab, in the Number group, click the Number Format dialog
box launcher.
7. Delete the current contents of the Type field, and then type (do this slowly, and observe what is displayed
in the Sample field as you enter each character): dddd dd-mmmm-yyyy and click OK.
The currency format is set for all software on your computer through the Regional Settings of the Control
Panel. Windows then determines the correct currency symbol to use with the selected region of the world.
In addition, you can choose from a long list of currency symbols for other countries for your spreadsheet.
The Symbol list in the Currency category of the Format Cells dialog box provides this list. Excel also ensures
that the symbol position is correct when displaying the currency values.
Most English-speaking countries use the period (“.”) as the decimal point for numbers, and the comma (“,”)
to separate groups of thousands. Most European countries – for example, France and Italy – use the comma
as the decimal point and the period or space as the thousands separator.
Country Example
United States 1,234,567.89
Canada 1,234,567.89
United Kingdom 1,234,567.89
France 1 234 567,89
Germany 1.234.567,89 or 1 234 567,89
With the Control Panel Regional Settings configured to any country, Excel will use the correct currency format
for that country.
You can also override the default currency format settings by using the Symbol option list in the Format Cells
dialog box (Figure 1-8).
Figure 1-8: Format Cells dialog box – Currency category, Symbol option list
1. Open Consolidated Income Numeric.xlsx located in the StarterFiles folder, and save it as My
Consolidated Income Numeric.xlsx in the MyProjects folder.
2. Select cells D5:D13. On the Home tab, in the Number group, click the Number Format dialog box
launcher.
3. If necessary, click the Number tab. In the Category section, select Currency.
4. Click the Symbol drop-down arrow, and then select £ English (United Kingdom).
5. In the Negative numbers list box, select the option at the bottom (displays both negative sign and red
font), then click OK.
6. For cells C5:C13, display the Format Cells dialog box, and with Currency selected, select the R English
(South Africa) currency option (about one-half of the way down the long list of currencies).
7. For cells H5:H13, repeat the previous step but use the ¥ Japanese currency option for this range.
The numbers in columns E, F, and G all use the same $ currency symbol, even though they are for different
countries. To help differentiate these columns, you can customize the currency symbol as US$, C$, and
A$.
8. Select cells E5:E13. Open the Format Cells dialog box and, in the Custom category, change the custom
format in the Type field to: "US"$#,##0.00;[Red]-"US"$#,##0.00 and then click OK.
9. For cells F5:F13, change the custom format in the Type field to: "A"$#,##0.00;[Red]-"A"$#,##0.00 and
click OK.
10. Repeat step 8 for cells G5:G13, using the custom format "C"$#,##0.00;[Red]-"C"$#,##0.00
11. Select cells B5:B13. On the Home tab, in the Number group, click the Number Format drop-down arrow,
and select Currency.
Figure 1-9a: Symbol dialog box – Latin-1 Supplement subset Figure 1-9b: Symbol dialog box – Currency Symbols subset
1. Open Consolidated Income Currency Symbols.xlsx located in the StarterFiles folder, and save it as My
Consolidated Income Currency Symbols.xlsx in the MyProjects folder.
2. Select cell A15 and type: British Pound (with a blank space at the end), but do not press ENTER yet.
4. If necessary, click the Font drop-down arrow and select (normal text).
6. If necessary, scroll up or down to find the £ symbol, then click the £ (Pound Sign) symbol and click Insert.
Note: When you click the Insert button, you will be tempted to click it again because it may appear as
if nothing had been inserted. This is caused by the Symbol dialog box staying open and blocking your
view of the cell. After clicking the Insert button, the Symbol dialog box will display the Close button. If
it still shows the Cancel button, then you have not yet clicked the Insert button.
7. Close the Symbol dialog box and then press ENTER to finish the cell entry.
8. Select cell A16 and type: Japanese Yen (with a blank space at the end), but do not press ENTER yet.
Furthermore, you can customize a date value to any format of your choosing (Figure 1-11).
Figure 1-11: Format Cells dialog box – Custom category, customizing a date value
The various codes that can be used in a custom date and time format are the same as those described in the
Applying Custom Date and Time Formats section.
Note: The dates and times shown on your computer will be current according to your computer’s clock and
will differ from those shown here. Date and time formatting will also reflect the Regional settings of your
computer.
1. Open Date and Time Demo.xlsx located in the StarterFiles folder, and save it as My Date and Time
Demo.xlsx in the MyProjects folder.
2. Select cell B2, then on the Home tab, in the Number group, click the Number Format dialog box
launcher.
3. If necessary, click the Number tab. In the Category section, select Custom.
4. Delete the current contents of the Type field and then type (do this slowly, and observe what is displayed
in the Sample field as you enter each character): dddd dd-mmmm-yyyy and click OK.
5. Select cell B3, then on the Home tab, in the Number group, click the Number Format dialog box
launcher.
6. Click the Custom category, and replace the contents of the Type field with: hh:mm:ss and click OK.
7. Select cell C2, and click the Number Format dialog box launcher in the Number group.
8. Click the Locale (location) drop-down arrow, select English (Canada), and click OK.
9. Select cell C3, and click the Number Format dialog box launcher in the Number group.
10. Ensure the Locale (location) drop-down displays English (Canada), and click OK.
11. Select cell D2, and open the Format Cells dialog box.
12. With the Date category selected, change the Locale (location) to French (France).
13. In the Type list box, select the 14-mars-12 entry (sixth from the top), and click OK.
14. Select cell D3, and open the Format Cells dialog box.
15. With the Time category selected, ensure the Locale (location) is French (France).
16. If necessary, in the Type list box, select the 13:30:55 entry (third from the top), and click OK.
To access the language options, click File, click Options to open the Excel Options dialog box, and then click
the Language tab (Figure 1-12).
The currently available editing languages appear in the Editing Language list box in the Choose Editing
Languages section (Figure 1-13). Select a language and click OK to set it as the editing language. To add an
editing language, click the [Add additional editing languages] arrow, select a language, and then click Add.
Figure 1-13: Excel Options dialog box – Language tab, Choose Editing Languages section
Once you add a language to the Editing Language list box, you may need to enable the keyboard and/or
install the proofing tools for the language.
Notice that you also have the option to remove the selected language or set it as the default editing
language. The display and help languages can be set independently. To add display or help languages, click
the Get more display and Help languages from Office.com link in the dialog box to open a web page in your
browser. Select a language from the drop-down list, then click the download link for the correct software
version (32-bit or 64-bit). Open the downloaded file and install it. Restart Excel and open the Language tab
in the Excel Options dialog box.
In the Choose Display Language section, select the language you want to use in the Display Language list
box, then click Set as Default. Select the language you want to use in the Help Language list box, then click
Set as Default. Click OK and then restart Excel.
1. Open Climate Data.xlsx located in the StarterFiles folder, click File, and then click Options to open the
Excel Options dialog box.
2. In the Excel Options dialog box, click the Language tab in the left panel.
3. In the Choose Editing Languages section, click the [Add additional editing languages] drop-down
arrow, then in the list, click Spanish (Spain).
4. Click the Add button to add the selected language to the Editing Languages list.
At this point, you could click OK and you would be prompted to restart Office. For this exercise, however,
you will remove the language instead.
5. With Spanish (Spain) selected in the Editing Language list box, click Remove, then click OK.
Note: If you are prompted to restart Office, click OK, but do not restart Excel.
Figure 1-14a: Font list – Headings and Body fonts Figure 1-14b: Format Cells dialog box – Font tab
However, if you insert a graphic text box or WordArt and right-click the text within the graphic object, the
Font dialog box (Figure 1-15) shows these fonts as +Body and +Heading.
You can apply formatting (style, size, color settings, effects, and so on) to one of these generic fonts just as
you can to a named font. Notice there are additional effects options (including Small Caps and All Caps)
available for text in graphic objects.
If you manually apply a font other than the current body or heading font to a cell or to the text in a graphic
object, the font and size will remain unchanged if you select a different theme for your workbook.
1. Open Travel Insurance Premiums Body Heading Fonts.xlsx located in the StarterFiles folder, and save it
as My Travel Insurance Premiums Body Heading Fonts.xlsx in the MyProjects folder.
3. Click in any blank area of the worksheet, and type: Not valid for more than 365 days.
Now you will manually apply a different font to one of the new worksheet cell values.
5. Select cell K2, then on the Home tab, in the Font group, click the Font drop-down arrow and select a
script-like font such as Freestyle Script. Be sure to memorize the name of the font that you selected –
you will need it for a later step.
6. Select cell A2, then on the Home tab, in the Font group, click the Font drop-down arrow, and view the
list of fonts available.
8. Select the cell range B2:J2, then on the Home tab, in the Font group, click the Font drop-down arrow
and select Calibri Light (Headings).
9. On the Page Layout tab, in the Themes group, click Themes to display the list of themes available.
10. Point the cursor at some of the different themes to see how the font and size of all cells except K2 (which
was set to a script-like font in a previous step) will appear if a different theme is applied.
Notice that all cells and the graphic text reformatted to match the theme specifications, except for cell
K2.
12. Select cell B2, then on the Home tab, in the Font group, click the Font drop-down arrow, and view the
list of fonts available.
The Font drop-down list shows that the Badge theme has changed the default Body and Headings fonts
for this workbook.
13. Select all of the text inside the text box in cell H12, then right-click and click Font.
14. Click the Latin text font drop-down arrow to display the list of fonts available.
15. Search for and click the same font that you had selected for cell K2, then in the Effects section, select the
Small Caps check box, and click OK to close the Font dialog box.
16. Preview a few more themes. Notice that the font and size and effects of the text box now remains
unchanged as different themes are previewed in the worksheet.
Lesson Summary
Now that you have completed this lesson, you should be able to:
Create custom conditional formatting rules using Use international currency symbols.
formulas. Configure the editing and display language.
Apply custom number, accounting, date, and time Understand +Body and +Heading fonts.
formats.
Key Terms
Term Definition
Conditional A feature that enables you to change the appearance of a cell, depending on that
Formatting cell’s value.
Display Language Refers to the language-specific text used in menus, tool tips, and the Help system.
Editing Language Refers to the language-specific keyboard layout and proofing tools such as
dictionaries for spelling and grammar checking, and paragraph direction buttons.
Format Instructions that tell Excel how it should display styles, fonts, colors, numbers, bullets,
and so on.
Formula A calculation that displays a new result based on the values in other cells. Composed
of values, cell references, arithmetic operators, and special functions. These results
may be used in other formulas located in other cells.
Rules Manager A feature you can use to create new conditional formatting rules, modify existing
ones, and delete rules that are no longer needed. See Conditional Formatting.
Quiz Questions
For each question, select the best answer.
a. Display a dark gray background color if the cell contains a text string with the text string “con” in it.
b. Display cell text in a different font if the cell value is greater than 10,000.
c. Display a color that could range from dark green to dark red, with lighter shades between these two
extremes, depending on the numeric value in the cell.
d. All of the options listed are valid conditional formats.
2. Suppose you create the following two conditional format rules on a range of cells: Rule 1 – display an orange
background color if the cell has a value > 7.5; and Rule 2 – display a green background color if the cell has a
value >= 7.4. What background color will display if every value has a minimum value of 8?
a. It depends which rule is listed above the other in the Rules Manager dialog box.
b. Orange
c. Green
d. Brown – both colors are applied and combined
3. Which of the following formulas is NOT a valid formula to use in a conditional formatting rule?
a. =$F$5>TODAY()
b. =A$16<>SUM(A$1:A$15)
c. =$C2
d. =ISNUMBER(A1)
4. You can create your own custom number format using which of the following specifications?
5. The Symbol list in the Format Cells dialog box allows you to select many different ______________________.
a. mm-d-yyy
b. mm-d-yyyy
c. d-m-yy
d. All of these date formats are valid.
7. How can you override the default currency format settings in Excel and apply a currency format for a foreign
country to a range of cells?
a. Enter the foreign country currency as a text value, thus allowing you to enter any characters
necessary.
b. Select the appropriate option in the Symbol list in the Format Cells dialog box.
c. Install a language pack for the foreign country and then set that language as the editing language.
d. You cannot override the default settings; you must adjust them through the Control Panel.
8. When you manually insert an international currency symbol using the Symbol dialog box, which of the
following subset options would you likely NOT select when looking for currency symbols?
9. How can you override the current Regional Settings date format and apply a date format for a foreign country
to a range of cells?
a. Change the Locale (location) setting in the Format Cells dialog box.
b. Enter the foreign country date as a text value, thus allowing you to enter any characters necessary.
c. Install a language pack for the foreign country and then set that language as the editing language.
d. You cannot override the default settings; you must adjust them through the Control Panel.
10. Dan would like to check the spelling and grammar of his worksheet using Parisian French. Which of the
following steps should he take?
a. He should use the Insert Tools command in the Language group on the Insert tab of the Ribbon.
b. He should use the Import Dictionary command in the Proofing group on the Review tab of the
Ribbon.
c. He should ensure that French (France) is selected in the Editing Language list in the Language tab
of the Excel Options dialog box.
d. You cannot change the editing language in Excel; you must change the editing language using the
Regional settings in Windows.
a. They automatically increase in point size each time you select them.
b. They are designed for use in HTML representations of your workbook.
c. They automatically configure themselves to be one point larger in size than text in surrounding cells.
d. They automatically adjust themselves when a new theme is applied.
Microsoft ®
Excel
Expert Certification Guide
Describe what a function is. Use the Error Checking Tool to mark possible
Use the correct syntax for functions. incorrect formulas.
Use the lookup functions CHOOSE, INDEX, Check the worksheet manually for formula
MATCH, HLOOKUP, and VLOOKUP. errors.
Understanding Functions
The power of a spreadsheet program comes from the ability to perform calculations based on entered values.
For simple calculations such as ‘A – B =’, the use of common mathematical operators works well. For more
complex calculations, such as computing a monthly loan payment amount, Excel offers a tool called a
function. Excel has a large selection of built-in functions to help you perform calculations in a spreadsheet.
Compatibility Statistical functions available in Excel 2007 and earlier versions have since been
replaced with newer versions. Functions in this category are still available for
workbooks that still require them. All the compatibility functions can also be found
in the Statistical category.
Cube Work with the Microsoft SQL Server Analysis Services tool to perform data mining.
Engineering Perform calculations that are typically used in engineering applications. These
functions must be loaded as part of the Analysis Toolpak add-in.
Financial Perform financial calculations, such as those typically used with loans, annuities, and
cash flows.
Information Display information about the cells in the worksheet.
Logical Control the actions taken by Excel based on evaluations of data in the spreadsheet.
Lookup & Reference Locate information within tables or on the Internet.
Math & Trig Perform mathematical and trigonometric calculations, such as logarithms, cosine,
and rounding.
Statistical Perform statistical evaluations, such as average, mean, and standard deviation.
Web Exchange data with other systems located on the Internet or in the local network
using web functionality.
For complete details on the available functions, refer to the Microsoft Excel Help feature or get online help
from the Microsoft website.
The “=” Symbol Identifies the start of a formula or function. Only one = symbol is required for each
cell.
(Arguments) Identifies any variable portions of the argument or required parts of the formula.
You put these three components together in the following order:
=FUNCTION(Arguments)
The argument portion of a function is enclosed in parentheses and can include one or more values or
references. Commas separate multiple arguments in a function. Some functions do not require any
arguments; these functions do, however, still require parentheses.
If you do not include the “=” symbol, Excel treats the function as a text label. If the function name is invalid,
Excel will display #NAME? in the cell. If you do not include the proper number of arguments, Excel displays a
message box and suggests using the Insert Function feature to help you enter the function correctly.
In this example, the SUM function is used three times in the same formula. Note the use of parentheses to
ensure that the calculations are performed in the sequence that you had intended. Excel follows the standard
mathematical precedence of operators:
1. Parentheses: ()
2. Exponents and roots
3. Multiplication and division
4. Addition and subtraction
You can also nest functions together; that is, you can embed one function within another function. An
example of a nested function is shown here:
=ROUND(SUM(C1:C5),-2)
You can accomplish the same result by putting the intermediate results into separate cells. That is, you could
put the SUM function in cell C6 so the results are displayed there. You could then use =ROUND(C6,-2) to
calculate your final result in a different cell.
You are permitted to nest up to 64 layers of functions, which is more than sufficient for any worksheet. Prior
to Excel 2007, you could nest up to only seven layers.
Inserting Functions
Excel has a very large number of functions available; memorizing the syntax of every function is an impossible
task. To make it easier to use functions, Excel provides a special tool called Insert Function.
You can also access a list of functions by typing “=” (to indicate to Excel that you are entering a formula), and
then typing the first few characters of the function that you want to enter. Excel displays a drop-down list of
all functions that begin with these characters (Figure 2-2).
The Insert Function dialog box displays all functions grouped by most recently used or by categories
previously discussed. If you do not know the name of the function you want to use, but you do know what
you want to accomplish, you can type a brief description of what you want to do and the Insert Function
feature will recommend a function for you.
After you select a function, Excel displays the Function Arguments dialog box (Figure 2-3) to help you enter
all the required function arguments. Helpful features of this dialog box include the following:
• Each argument is listed and the required arguments are highlighted in bold. If the function you’re using
allows a variable number of arguments, the dialog box displays additional argument boxes as necessary.
• When the cursor is in one of the argument text boxes, the relevant help information displays in the lower
part of the dialog box.
• If you select or enter data values or cell references into the argument boxes, Excel previews the data to
the right of that argument box. In the following example screen, the data values being considered are
{45;24;57;49;36}.
• If enough arguments have been entered, Excel also displays the results in the lower part of the dialog
box. In this example screen, the calculated sum for the selected cell range is 211.
Many of the arguments in a function permit you to select a cell or range of cells containing the values to be
used. For example, consider the following three functions:
=SUM(45,24,57,49,36)
=SUM(C1,C2,C3,C4,C5)
=SUM(C1:C5)
Assuming that cell C1 contains the value 45, C2 contains 24, and so on, all three of these functions will result
in the displayed value of 211.
You can type a value or cell range into the appropriate boxes within the Function Arguments dialog box, or
you can select a cell or cell range directly in the worksheet. In some situations, such as if you are using a
device with a very small screen, the Function Arguments dialog box may block your view of the cell range. If
you click the Collapse button ( ) located to the right of the argument text box, the Function Arguments
dialog box shrinks temporarily, as shown in Figure 2-4.
Once you have selected your cell range, press ENTER or click the Restore ( ) button located at the right
side of the text box. The Function Arguments dialog box restores to its full size.
5. If necessary, in the Or select a category box, click the drop-down arrow and click Math & Trig (or Most
Recently Used).
Because the SUM function is by far the most commonly used, it is usually in the Most Recently Used list.
If it’s not, you can find it in the Math & Trig category.
6. In the Select a function list, scroll down and click SUM, and then click OK.
For this exercise, you will use the Collapse and Restore buttons to enter argument values into the
Function Arguments dialog box. Alternatively, you can enter the cell range values directly into the
argument text boxes or select the cell range without collapsing the dialog box.
7. With the cursor in the Number1 box, click Collapse to temporarily shrink the Function Arguments dialog
box and then drag the box to an empty part of the worksheet so that it does not obstruct the cell range
to be selected.
8. Select cells C1:C5 in the worksheet and click Restore to return the Function Arguments dialog box to its
default size.
11. In the Search for a function box, type: standard deviation and click Go.
Excel displays a list of functions that involve the use of standard deviation.
12. Click the STDEV.S function and then click OK to display the Function Arguments dialog box.
13. If necessary, drag the Function Arguments dialog box out of the way so that it is not blocking the cell
range C1:C5.
14. With the cursor in the Number1 box, select the cell range C1:C5 and click OK.
If cell A1 contained the value 3, then this cell will display the value that is entered in cell D1, which is the third
argument in the list after the index number.
1. Open the Tour Price List.xlsx workbook located in the StarterFiles folder, and save it as My Tour Price
List.xlsx in the MyProjects folder.
This worksheet is the tour price list for one of Tolano’s travel suppliers. Each specific tour has a unique
identification number, departure date, and price per person. In this worksheet, you will create a simple
lookup to display information about the tour.
Unfortunately, the CHOOSE function does not allow you to enter a cell range. It also does not apply the
formatting for the data.
5. Select cell B3 and, on the Home tab, in the Clipboard group, click Format Painter. Click cell F6 to copy
the formatting to this cell.
6. Use the Format Painter again to copy the formatting from cell C3 to cell F7.
Once the CHOOSE functions have been set up, you can easily display the data for any tour by entering the
row number.
7. Select cell F4 and enter different numbers of your choice between 1 and 10 to see how the values in cells
F5 to F7 change to match which row you selected.
row num Identifies the row in the range to find the value.
column num Optional: Identifies the column in the range to find the value. If not specified, the entire row
of data is used.
area num Optional: Identifies which reference range to use. If not specified, area 1 is used.
Following are examples of the INDEX function using the reference version (Figure 2-6).
Formula Result
=INDEX(A2:D4,2,3) liter
=INDEX(A2:D4,1,2) millimeter
You can also specify more than one range of cells in this version.
Formula Result
=INDEX((A2:D2,A3:D3,A4:D4),1,3,2) liter
=INDEX((A2:D2,A3:D3,A4:D4),1,2,1) millimeter
In this form of the reference version, the first example specifies that area 2 (A3:D3) be used for the index. In
the second example, area 1 (A2:D2) is to be used.
The second version of the INDEX function is the array version, which uses an array constant instead of a range
of cell references:
=INDEX(array, row num, [column num])
Where:
array Identifies a range of cells, or an array constant. An array constant is a set of values listed within
a set of curly braces.
row num Identifies the row in the range to find the value.
column num Optional: Identifies the column in the range to find the value.
Note that if the array is a range of cells, then the INDEX function will behave exactly like the reference version.
Following are examples of the array version using array constants (Figure 2-7).
Formula Result
=INDEX({10,20,30;40,50,60},2,3) 60
=INDEX({10,20,30;40,50,60},1,2) 20
In this example, each set of numbers separated by the semicolon represents a separate row within the array.
Therefore, the first example specifies to find a value in the second row of the array (consisting of the numbers
40, 50, and 60) and within that row, to select the value in the third column (60). The second example specifies
to find a value in the first row of the array (consisting of the numbers 10, 20, and 30) and within that row, to
select the value in the second column (20).
1. Open Tour Price List – Index.xlsx located in the StarterFiles folder, and save it as My Tour Price List –
Index.xlsx in the MyProjects folder.
2. Click the INDEX worksheet tab if necessary, select cell F4, and enter: 1.
Note: Remember you can use the F4 key to convert a cell reference to an absolute reference.
By using absolute references, you can copy this formula to other cells while pointing at the same lookup
range of cells. Even though using absolute references makes this formula more complex, the ability to
copy makes the process easier than using the CHOOSE function.
4. Copy the formula in cell F5, and paste it into cell F6.
5. Select cell F6 again, press the F2 key to modify the cell contents, and change the last argument in the
formula from 2 to 3. The formula in this cell should now be: =INDEX($A$3:$C$12,$F$4,3).
6. Use the Format Painter to copy the formatting from cell B3 to cell F5, and from cell C3 to cell F6.
7. Select cell F4 and enter different numbers of your choice between 1 and 10 to see how the values in cells
F5 and F6 change to match which row you selected.
8. Select cell F4 and, on the Home tab, in the Number group, click the Number Format dialog box launcher.
9. Click the Number tab if necessary, then click Custom as the Category.
10. Delete the current contents in the Type field, and replace it with: "LP-"000 and click OK.
You can now use the row # cell to show the tour # value. As a reminder, you should add some instructions
that only the numeric value should be entered.
11. Select cell E4, type: Tour #:, and then select cell G4 and type: (enter number only).
The MATCH function works by searching through the lookup array for the lookup value. When it is found, its
position in the lookup array is displayed.
lookup array Identifies the list of values or range of cells to be searched. This range must be a single row
or column.
match type Optional: 1 is less than, 0 is exact match, -1 is greater than. If 1 or -1 is specified, then the
values in the lookup array must be sorted in ascending order.
In this example, the MATCH function looks up the value in cell A6 (kilogram) and finds it in cell D4. Cell D4 is
in the third position (column) in the cell range D2:D4, so the MATCH function returns the value 3.
1. Open Tour Price List – Match.xlsx located in the StarterFiles folder, and save it as My Tour Price List –
Match.xlsx in the MyProjects folder.
2. Click the MATCH worksheet tab if necessary, select cell F4, and enter: LP-001.
4. Select cell F4 and enter different tour numbers to see how the row number value in cell F5 changes to
match the tour number you selected.
At first, it appears that the MATCH function does not provide anything useful, until you extend it with
the INDEX function.
With the tour # cell being used as the lookup value, you need only include the date and price column in
the lookup range. However, you can also include the tour # column in the lookup range if you prefer.
6. Copy the formula in cell F6, and paste it into cell F7.
7. In cell F7, press the F2 key to modify the cell contents, and change the last argument in the formula from
1 to 2. The formula in this cell should now be: =INDEX($B$3:$C$12,$F$5,2).
8. Use the Format Painter to copy the formatting from cell B3 to cell F6, and from cell C3 to cell F7.
row index number The row number in the array containing the value to be returned; rows are
numbered sequentially from the top row of the table.
range lookup Optional: You can enter “0” or “false” if you wish the function to find an exact
match in a sorted or unsorted list; enter “true” or omit the argument if you want
the function to find an approximate match in a sorted list.
Even though the range lookup parameter is optional, it has an important switch setting that deserves a closer
look. Consider an example of a scoring sheet for a school examination paper:
Mark Achieved on Exam 0% 50% 60% 70% 85%
Grade Assigned F D C B A
All students will have a result ranging from 0% to 100%. By using a range lookup value of TRUE, you tell Excel
to search the table for the highest mark value that does not exceed the lookup value. For example, a student
achieving a mark of 65% will get a grade value of C because 60% is the highest table value found that does
not exceed the lookup value.
If a range lookup value of FALSE is used, the HLOOKUP formula will not find the correct grade for most
students. This is because the mark achieved must exactly match one of the values in the table in order to be
found. Therefore, a range lookup value of FALSE is not the right choice to use here.
1. Open GradeBook.xlsx located in the StarterFiles folder, and save it as My GradeBook.xlsx in the
MyProjects folder.
This worksheet shows the History class grades for four students as well as a table in cells L3:P4 that shows
the correlation between numeric scores and letter grades.
Notice that the scores in the table are sorted in ascending order from left to right. This is required for
the lookup function to work properly.
You will enter a formula that will look up and display the final letter grade for the term in Column I.
With the final numeric grade being used as the lookup value, it is important to omit the range lookup
argument so that the function will find an approximate match in the letter grade table.
table array A range of cells containing the values to be searched and the data to be returned.
column index number The column number in the array containing the value to be returned; columns are
numbered sequentially from the left-most column.
range lookup Optional: You can enter “0” or “false” if you wish the function to find an exact
match in a sorted or unsorted list; enter “true” or omit the argument if you want
the function to find an approximate match in a sorted list.
You would use the VLOOKUP function if your table is arranged vertically. For example, here is the scoring
sheet table shown in a vertical layout.
Mark Achieved
Grade Assigned
on Exam
0% F
50% D
60% C
70% B
85% A
The same range lookup value of TRUE can be used to find the correct grade to assign, even though the
student’s mark can be any value between 0% and 100%. The range lookup value of FALSE is also inappropriate
for this VLOOKUP formula because most students will not have a mark that matches the table values exactly.
1. Open Pricing Sheet – Vertical.xlsx located in the StarterFiles folder, and save it as My Pricing Sheet –
Vertical.xlsx in the MyProjects folder.
This worksheet shows a partial tour pricing list on the top and a sample invoice below it. The requirement
is to enter a product number in column B of the invoice and have the description and cost appear on
the invoice automatically. In this case, Excel will look up the product number and retrieve the
corresponding description and cost.
Notice that the tour numbers are sorted in ascending order. This is required for the lookup function to
work properly.
Note: In a real-world example, the inventory list would be on a different worksheet or, more often, in a
different workbook. This exercise has been simplified for instructional purposes.
5. Select cell E15 then, on the Home tab, in the Editing group, click AutoSum, verify the formula is:
=SUM(E12:E14) and press ENTER.
Notice the #N/A filling the cells; this is displayed by the lookup functions when there is no lookup value.
The IF function could be used to clean up its appearance, but this exercise focuses on the VLOOKUP
function.
The last item entered had the wrong tour number. As a result, the wrong description and cost were
displayed. For this kind of worksheet, you should use the FALSE value for the range lookup option so
that Excel will identify incorrect tour numbers immediately.
11. Select cell C12, press F2, and change the TRUE to FALSE in the VLOOKUP formula.
The Description (C14) and Cost (D14) for row 14 now show #N/A because this tour number was not
found in the lookup list.
14. Select cell B14 and enter the correct tour # value: A4353.
To perform these calculations, Excel stores the date and time values as serial numbers with the integer part
representing the number of days since January 1, 1900 and the fractional part as a portion of a 24-hour
period. A serialized date value is simply a number that Excel uses to represent a specific point in time (which
consists of the month, day, year, and time components), which could be the current date and time or a
manually entered date and time. Special functions are provided to determine the date and time serial
numbers, and to extract the month, day, year, hours, minutes, and second values from serial numbers.
WEEKDAY Displays a numeric weekday value for the date serial number. For example, a date that
falls on a Sunday will return a 1 (first day of the week), and a date that falls on a Saturday
will return a 7. You can also specify a different numbering pattern; for example, you can
specify Monday as the first day of the week, which will then return a 1. The format of this
function is
WEEKDAY(date value, return type).
WORKDAY Calculates the nearest working day in the future or the past. This function is useful in
business situations, such as developing project plans, that can’t include weekends in date
calculations. The format of this function is
WORKDAY(start date, # of days, holiday date range).
TIME Calculates the serial number for a specified time entered as hours, minutes, and seconds.
The format of this function is
TIME(hour, minute, second).
HOUR Displays the hour value for the specified time serial number. This function is useful for
extracting only the hour value for a date/time value. The format of this function is
HOUR(date/time value).
MINUTE Displays the minute value for the specified time serial number. This function is useful for
extracting only the minute value for a date/time value. The format of this function is
MINUTE(date/time value).
SECOND Displays the second value for the time serial number. This function is useful for extracting
only the seconds value for a date/time value. The format of this function is
SECOND(date/time value).
Note: Another way to obtain the current date is by pressing CTRL+; (semicolon), and the current time by
pressing CTRL+SHIFT+; (semicolon). However, these date and time values are not continuously updated;
they are inserted into the worksheet as fixed points in time.
1. Open Departure Date Calculator.xlsx located in the StarterFiles folder, and save it as My Departure
Date Calculator.xlsx in the MyProjects folder.
4. Select cell C5 and type the first part of the formula (do not press ENTER yet): =WEEKDAY(B3,
The WEEKDAY function returns a single number that identifies the day of the week on which a date falls.
It has a second argument that allows you to choose which numbering pattern to use, with Sunday being
1 as the default if the second argument is not specified.
You can also calculate the number of days difference between two dates using a built-in function. However,
it calculates in whole days.
10. Press the F9 key to recalculate the current date and time. Wait at least one minute and press it again and
note the changes in cells B13 and B14 as the current time changes.
13. Select cell B17 and enter: =DATEVALUE("yyyy-mm-dd") where yyyy-mm-dd is the date you entered
in cell B3 at the beginning of the exercise.
The result is a number, which is the serialized date value. You can change the format to a date.
14. Select cell B17 again, then on the Home tab, in the Number group, click the Number Format drop-
down arrow and click Short Date.
16. Select cell B20 and enter the number of days currently displayed in cell B18. Do not enter a formula that
references cell B18.
18. Select cell B17 and, on the Home tab, in the Clipboard group, click the Format Painter button once,
then click cell B21 to copy the formatting for that cell.
At this point, cell B21 shows a date that is much later than the travel departure date showing in cell B17
(and B3). This is caused by the # of days value in cell B20, which should count only the number of working
days difference from today to the departure date. Cell B18 shows the total # of days, including weekends.
Note: If your weekend days are not Saturdays and Sundays, use the WORKDAY.INTL function to specify
other days of the week as weekends.
19. Change the number in cell B20 so that the date in cell B21 is the same as the date showing in cell B17.
You can estimate this number by multiplying the number in cell B18 by 0.714 (5 working days divided
by 7 days in a week).
The WORKDAY function skips only over weekends by default. You can also have it skip over holiday
dates.
20. Enter a date into cell B22. This date should be a date between today and the travel departure date
displayed in cell B17 and B3. It also must be a weekday between Monday and Friday.
By specifying two holiday dates (you can include as many holidays as needed in the cell range), the
WORKDAY function will automatically adjust its calculations.
You will calculate the day of the week on which the nearest working day date you calculated previously falls.
Cell C21 displays a number corresponding to the day of the week. The worksheet should appear similar
to the following:
Alternatively, on the Formulas tab, in the Formula Auditing group, click Error Checking.
Select or deselect the appropriate check boxes in the Error checking rules section to validate formulas using
specific error checking rules.
1. Open Rocky Mountains Tour Error Checking.xlsx located in the StarterFiles folder, and it save as My
Rocky Mountains Tour Error Checking.xlsx in the MyProjects folder.
Tolano Adventures is using this spreadsheet to compare the revenues to the expenses for a planned
tour. The numbers appear to indicate that a healthy profit will be made.
However, this worksheet has formulas with errors in them. Wherever Excel believes that a formula is
incorrect, it displays an Error Indicator (green triangle at the upper left corner) in the cell. By default, this
background error checking is turned on. You can verify this by looking in the Options dialog box.
2. Click File and then click Options. In the Excel Options dialog box, click the Formulas tab.
3. Ensure that the Enable background error checking check box is selected.
Notice that you can also change the color of the Error Indicator triangle or toggle various error checking
rules on or off.
4. Click the Reset Ignored Errors button, and then click OK to close the dialog box.
An error indicator (the small green triangle) is now visible in the upper left corner of cell D21, indicating
that it contains a possible formula error.
5. Select cell D21 and click the Trace Error icon to the left of this cell.
At the top row of the Trace Error menu, Excel describes the problem it has identified: the formula in this
cell does not include adjacent cells containing data that you may have wanted to include. At this point,
you should check the contents of the formula bar to determine whether to change this formula.
The formula in this cell is =SUM(D13:D19). However, cells D12 to D20 contain expense numbers.
If you select Ignore Error, the green triangle disappears and the error is not identified in future error
checks (unless you click Reset Ignored Errors in the Excel Options dialog box).
8. Click Undo in the Quick Access Toolbar to revert the formula back to its previous value.
The next step demonstrates how Excel behaves when you use the error checking tool. In fact, it doesn’t matter
where the cell pointer is when you carry out this step.
10. On the Formulas tab, in the Formula Auditing group, click Error Checking.
The cursor jumps to the first cell that Excel finds with a potential error in it.
When Excel can no longer find any problems with formulas, it displays the following:
This updated worksheet shows that the profit has been substantially reduced, but there is still a small
profit being made. The worksheet actually has more formula errors, but the Error Checking tool has
found as many errors as it could.
You can extend the tracing of precedent or dependent cells by selecting Trace Precedents or Trace
Dependents again in the Ribbon.
1. Open Rocky Mountains Tour Tracing Errors.xlsx located in the StarterFiles folder, and save it as My
Rocky Mountains Tour Tracing Errors.xlsx in the MyProjects folder.
Start by selecting the most important cell in the entire workbook—the one that calculates the profit of Total
Revenues less Total Expenses.
2. Select cell D23 and then, on the Formulas tab, in the Formula Auditing group, click Trace Precedents.
Notice the thin line and the dots drawn from cell D9 to D23. The dots in cells D9 and D21 indicate that
these cells are referenced in the formula in cell D23. These appear to be correct.
As the Trace Precedents tool drills down through the next layer of detail, Excel draws boxes above cells
D9 and D21. The boxes indicate that these cell ranges are referenced in the formulas in the two cells.
These also appear to be correct.
Another set of lines and dots is drawn as the Trace Precedents tool drills down through another layer of
detail. These indicate the cells referenced in the formulas entered into the cell range D6:D8.
Looking at the last set of lines and dots drawn, you should see that they do not appear to be correct.
The Fare value in cell B6 is used to calculate the total in cells D6:D8, but the fares in cells B7 and B8 are
not used at all.
By selecting cell D7, you can see that the formula is incorrect.
The lines and dots now appear in the correct cells. It also now appears that this tour will incur a loss
instead of a profit.
9. On the Formulas tab, in the Formula Auditing group, click Remove Arrows.
Instead of finding the precedent cells, you can find cells containing formulas that depend on the value
in a selected cell, either directly or indirectly. This is the reverse method—tracing dependent cells.
10. Select cell B6 and, on the Formulas tab, in the Formula Auditing group, click Trace Dependents.
Manually checking a worksheet means selecting every cell in the worksheet to determine if it contains the
right value or formula. If a cell contains a formula that references other cells, you should look and verify that
the correct cells are being referenced. Excel displays cell range references visually by highlighting them with
a colored border when you press F2 to help you verify that these formulas are correct (Figure 2-12).
A useful feature to help you review all the formulas in a worksheet at the same time is the Show Formulas
option, which you can access from the Formula Auditing group on the Formulas tab. This feature forces every
cell to display its underlying formula instead of the calculated value.
1. Open Rocky Mountains Tour Manual Checking.xlsx located in the StarterFiles folder, and save it as
My Rocky Mountains Tour Manual Checking.xlsx in the MyProjects folder.
2. Select cell C9 and then press the F2 key to switch to edit mode for this cell.
While in edit mode, you can see the formula in this cell, and the referenced range of cells that is
highlighted in the worksheet. This formula appears to be correct.
The formula in cell D9 appears to be correct. However, cell D21 appears to be suspicious. Repeating
these steps for each cell is tedious work.
5. On the Formulas tab, in the Formula Auditing group, click Show Formulas.
6. If necessary, adjust the size of the Excel workbook window so that you can see the cell range A1:D23.
With the worksheet now in Show Formula mode, you can easily see which cells to check. First, select the
cells containing SUM formulas to verify that they are correct.
7. Select cell C9, then cell D9, and then cell D21.
As you select each of these cells, note the range of cells that are highlighted and ask yourself if the
selection appears to be correct.
8. With cell D21 still selected, correct the formula by dragging the upper right (or upper left) handle around
the blue highlighted cell range up by one row. Then drag the bottom left (or bottom right) handle down
by one row.
9. Press ENTER.
10. Click each of the cells D6, D7 and D8. Correct any of the formulas in these cells, as necessary.
11. Click cell D23, and correct the formula in it, if necessary.
12. On the Formulas tab, in the Formula Auditing group, click Show Formulas again to turn the formula
display off.
You can choose from different data types as validation checks as described below.
Any value Deactivate any data validation. This is the default setting for all cells. However, you can
also use it to display an input message without validating any data entry.
Whole number Allow only numeric values without any decimal digits.
List Allow selections from a defined list of values in a cell range. This is also known as a pick
list. By using this type of list, you can ensure the cell will contain only one of these values.
Date Allow only date values. The lowest date value is January 1, 1900.
Text length Allow only the specified number of text characters. This validation does not permit any
numbers, dates, or time values to be entered.
Custom Enter a formula to validate the data being entered in the cell. The result of the formula
must be a true or false value.
You can use the Input Message tab of the Data Validation dialog box (Figure 2-14a) to enter a message that
will appear when a cell is selected. You can use the Error Alert tab (Figure 2-14b) to enter an error message
that will appear when invalid data is entered in a cell.
Figure 2-14a: Data Validation dialog box – Input Message tab Figure 2-14b: Data Validation dialog box – Error Alert tab
1. Open Feedback Form.xlsx located in the StarterFiles folder, and save it as My Feedback Form.xlsx in
the MyProjects folder.
3. On the Data tab, in the Data Tools group, click Data Validation. If you clicked the drop-down arrow
below the Data Validation button, click Data Validation.
4. Enter or select the following options for the Settings tab and click OK.
Criteria Select
Allow: Whole number
Data: between
Minimum: 1
Maximum: 5
6. Click Cancel.
7. Select cell B6. On the Data tab, in the Data Tools group, click Data Validation.
8. Enter or select the following options for the Settings tab, but do not click OK yet:
Criteria Select
Allow: Date
Data: less than
End date: =TODAY()
9. Click the Error Alert tab, enter the following settings, and click OK:
Criteria Enter
Style: Stop
Title: Incorrect date
Error message: Your travel date must be before today.
12. Select cell B13. On the Data tab, in the Data Tools group, click Data Validation.
13. Click the Settings tab and enter or select the following, but do not click OK yet:
Criteria Select
Allow: Text length
Data: less than
Maximum: 150
14. Click the Input Message tab, enter the following settings, and click OK:
Criteria Enter
Title: Your comments
Input message: Your comments will be entered into a grand prize drawing!
15. Click another cell and then click cell B13 again to see the input message display again.
16. Test the worksheet by entering values of your own choosing into the various cells.
Lesson Summary
Now that you have completed this lesson, you should be able to:
Describe what a function is. Use the Error Checking Tool to mark possible
Use the correct syntax for functions. incorrect formulas.
Use the lookup functions CHOOSE, INDEX, Check the worksheet manually for formula
MATCH, HLOOKUP, and VLOOKUP. errors.
Key Terms
Term Definition
Built-in Functions Pre-programmed formulas used to perform specific calculations. You can either type
these functions in or use the Insert Function wizard to assist in creating the function. See
Insert Function.
Data Validation A feature that helps you set up validation checks in cells; for example, numbers only, list
of inventory items available only, and so on.
Error Checking An auditing tool used to assist in checking any errors that may exist in the formulas. Any
errors are marked with a dark green triangle in the upper left corner of a cell.
Insert Function The feature that Excel provides to help you select the desired function to perform
calculations.
Tracing Tool An audit tool that draws arrows to help you find or trace formula errors in cells that are
precedents or dependents of the current cell.
Quiz Questions
For each question, select the best answer.
1. Which method can you use the access the Insert Function dialog box?
a. selects from a two-dimensional range of cells using both a row number and a column number as
the indices
b. returns the position of the value in the list, instead of the actual value itself
c. selects from a one-dimensional list of values by using an index number
d. selects from a two-dimensional range of cells using a row number as the index number
3. Which of the following shows the correct syntax for the INDEX function?
a. =INDEX(A2:D4,2,3)
b. =INDEX(A2,D4,2,3)
c. =INDEX(A2-D4,2,3)
d. =INDEX((A2:D4),2,3)
4. Which of the following functions returns the position of a value in a list, instead of the actual value itself?
a. INDEX
b. MATCH
c. VLOOKUP
d. HLOOKUP
5. Which of the following functions will look up a value in the third row of the cell range O11:R14?
a. =VLOOKUP(L4,O11:R14,2,0)
b. =HLOOKUP(L4,O11:R14,2,0)
c. =HLOOKUP(L4,O11:R14,3)
d. =VLOOKUP(L4,E12:LI14,3,0)
6. Which VLOOKUP switch setting will find an exact match for a lookup value?
a. EXACT
b. TRUE
c. 1
d. 0 or FALSE
a. =NOW()
b. =TODAY
c. =TODAY()
d. =NOW(Time)
8. Which function will show the day of the week for the date stored in cell A2, assuming that Monday is the first
day of the week?
a. =WEEKDAY(A2,2)
b. =DAY(A2)
c. =DAY(A2,1)
d. =WEEKDAY(A2,0)
9. When the Error Checking tool detects a possible error in a worksheet cell, it ____________________________.
10. Where can you find tools to trace precedents and dependents of the current cell in a worksheet?
11. You can force every cell in a worksheet to display its underlying formulas instead of the calculated result by
using which option?
a. Watch Window
b. Show Formulas
c. Evaluate Formula
d. Calculation Off
Microsoft ®
Excel
Expert Certification Guide
Pivot tables are frequently used to analyze large volumes of data, which are usually found in corporate
databases. When performing this kind of analysis, you almost always find values that repeat in many data
records or rows. The repeating values can be paired in various combinations to reveal underlying trends.
Once you specify the pivot table data and location and click OK, the PivotTable Fields task pane opens, which
controls the structure of the pivot table (Figure 3-2). You use this task pane to decide which columns of data
(correctly referred to as fields) from your source data table to use as the columns, rows, values, or filters for
the pivot table.
Filters Select (or filter) rows of data from the source data that appear in the pivot table.
Columns Display fields in this area as columns across the top of the pivot table.
Rows Display fields in this area as rows down the left side of the pivot table.
Values Summarize fields in this area in the main body of the pivot table. The default summary function
is SUM, although it can be changed to other functions, such as AVERAGE, MIN, or MAX.
Excel allows you to put more than one column from the source data into each area in the PivotTable Fields
task pane. You can specify the fields you want to display in the pivot table by selecting check boxes for each
field or by dragging the fields directly from the field list in the top half of the PivotTable Fields task pane to
the areas located in the bottom half.
Once you select fields to display in the pivot table, the table will appear in the worksheet (Figure 3-3).
By default, Excel places columns containing text data into the Rows area and those containing numeric data
into the Values area. Also, by default, it applies the SUM function to the columns in the Values area.
You can filter which rows and/or columns to display in a pivot table by using AutoFilter buttons. For
example, clicking the Row Labels AutoFilter button will display a drop-down menu from which you can specify
how to sort and which rows to display in the pivot table (Figure 3-4).
In this example, if you deselect the Air Miles and Cash check boxes and click OK, the pivot table will appear
as shown in Figure 3-5.
Notice that the Grand Total amount changes to reflect the data displayed in the pivot table.
The PivotTable Fields task pane automatically turns itself on and off when you select a cell inside or outside
the pivot table. Click any cell outside the pivot table to hide the PivotTable Fields task pane. Click any cell
inside the pivot table to re-display the PivotTable Fields task pane.
Note: The PivotTable Fields task pane can also be turned on or off using the Ribbon. On the PivotTable
Tools Analyze tab, in the Show group, click Field List to toggle it on or off.
1. Open Sales Pivot Table.xlsx located in the StarterFiles folder, and save it as My Sales Pivot Table.xlsx
in the MyProjects folder. Take a moment to review the contents of the worksheet.
There is a lot of data – over 2,000 rows. It will be difficult to examine the data in its current condition and
identify patterns or trends. Note that the same data values are repeated down each column, but in
different combinations and with different amount paid values. This kind of data is ideal for pivot tables.
The Date, Customer No., Sale Type, and Payment Type columns contain data values that appear multiple
times and are excellent candidates for row or column labels.
2. Select a cell within the cell range A1:E2009. On the Insert tab, in the Tables group, click PivotTable.
Notice that the table range is already specified in the Create PivotTable dialog box because you clicked
a cell within the range before executing the PivotTable command.
3. Click OK.
The skeleton pivot table is now ready. Notice that Excel has created it in a new worksheet; you can put
the pivot table into the same worksheet but you need to ensure that as the pivot table changes shape,
it does not overwrite other cells containing data.
4. Select the check boxes for the Amount Paid and Payment Type fields in the PivotTable Fields task pane
to turn them on and indicate that they are to be used in the pivot table. Excel does not know exactly
where you will want to place these fields, so for now it makes a guess.
5. Select the check box for the Sale Type field to turn it on.
With the addition of the Sale Type column, the pivot table is now much bigger. However, you will notice
that the same sale type (for example, bike tour, car rental) labels are repeated under each of the payment
types (for example, Air Miles, Amex, Cash).
This table would make more sense if the payment type labels and values were pulled across the columns.
6. In the PivotTable Fields task pane, drag the Payment Type field from the Rows area to the Columns area.
8. Deselect the Air Miles and Cash check boxes to turn them off, and click OK.
These two columns no longer appear in the pivot table. Notice that the grand total amounts appearing
in the far right have also been adjusted to include only the columns appearing on the screen. To re-
display all of the columns, select the Select All check box.
10. Select the (Select All) check box to turn it on, and click OK.
12. Select the (Select All) check box to turn it off, then select the Amex, Mastercard and Visa check boxes
to turn them on, and click OK.
To ensure that the formatting remains applied even as the pivot table changes, you should apply the
formatting directly to the field (as opposed to applying it to the values that display in the pivot table). To
apply formatting to the field, click the drop-down arrow on the far right of the field in the Values area of the
PivotTable Fields pane, and then click Value Field Settings (Figure 3-6a). The Value Field Settings dialog box
will open (Figure 3-6b).
Figure 3-6a: Value Field Settings Figure 3-6b: Value Field Settings dialog box
In the Value Field Settings dialog box, click the Number Format button to open the Format Cells dialog box
(Figure 3-7) and specify the formatting attributes as desired.
1. Open Sales Pivot Table Formatting.xlsx located in the StarterFiles folder, and save it as My Sales Pivot
Table Formatting.xlsx in the MyProjects folder.
2. In the PivotTable Fields task pane, click the drop-down arrow on the far right of Sum of Amount Paid
in the Values area, and then click Value Field Settings.
4. In the Format Cells dialog box, select Number in the Category list.
5. Reduce the Decimal places to 0 and select Use 1000 Separator (,) to turn it on. Click OK.
The worksheet should now reflect the formatting changes, as shown in the following image.
For example, you can change the fields that are displayed in the pivot table simply by selecting or deselecting
their check boxes in the PivotTable Fields task pane, or you can drag a field from the Rows area to the
Columns area (or vice versa) in the task pane to change your view of the data.
The following three figures illustrate how you can customize the display of a pivot table.
• In Figure 3-8, three of five possible fields (Sale Type, Amount Paid, and Payment Type) display in the
pivot table with sale types in the rows and payment types in the columns.
Figure 3-8: Three of five possible fields display in the pivot table
• In Figure 3-9, the same three fields display in the pivot table, but the row and column fields are reversed.
Notice that the Customer No. check box is now selected in the top part of the PivotTable Fields task pane,
and a Custom No. drop-down field appears above the pivot table. You can click the drop-down arrow at the
right of the Customer No. field and select a customer to display pivot table data for only that customer
(Figure 3-12).
For example, selecting 300 in the Customer No. list and clicking OK would display only the data for customer
#300 (Figure 3-13).
To remove the filter field, click the drop-down arrow for the field in the Filters area of the PivotTable Fields
task pane, and then click Remove Field (Figure 3-14).
The field will be removed from the Filters area and will be deselected in the field list at the top of the
PivotTable Fields task pane.
As you can see, pivot tables completely change the way you analyze data—almost to the point of making it
fun! You can change the way data is filtered, grouped, and/or summed in a matter of seconds, even though
the volume of data may be very large.
1. Open Sales Pivot Table Customizing.xlsx located in the StarterFiles folder, and save it as My Sales
Pivot Table Customizing.xlsx in the MyProjects folder.
2. In the pivot table, click the Column Labels AutoFilter button, and click Clear Filter From “Payment
Type”.
3. In the PivotTable Fields task pane, click and drag the Payment Type field from the Columns area to the
Rows area.
4. Drag the Sale Type field from the Rows area to the Columns area.
5. In the PivotTable Fields task pane, select the check boxes for the Date and Customer No. fields to turn
them on.
6. Drag the Date and the Customer No. fields to the Filters area.
When you activated these two fields in the pivot table, Excel made a guess at how you wanted them
added: the Customer No. field contains numeric data so it was put into the Values area, and the Date
field was put into the Rows area. Because the Date field contains date data, Excel also created a new
Month field and added it to the Rows area as well. You will remove both of these fields.
7. Click the down arrow button to the right of the Months item in the Rows area and click Remove Field.
8. If the Sum of Customer No. item appears in the Values area, click the down arrow button and click
Remove Field.
Hint: You could have avoided the need to remove these fields if you had dragged them directly into
the Filters area at step 6, instead of simply activating them.
9. In the pivot table, click the drop-down arrow at the far right of the Customer No. field, and then select
customer 300.
The pivot table shows only the data for customer 300:
11. In the pivot table, click the drop-down arrow at the far right of the Customer No. field, select (All), and
click OK.
12. Click the drop-down arrow at the far right of the Date field, scroll down and select 1-Apr, and then click
OK.
13. In the pivot table, click the drop-down arrow at the far right of the Date field, select (All), and click OK.
14. In the PivotTable Fields task pane, drag the Sale Type field from the Columns area to the Filters area.
15. In the PivotTable Fields task pane, click the Sum of Amount Paid drop-down arrow in the Values area
and click Value Field Settings.
16. Select Count in the Summarize value field by list and click OK.
To insert slicers, on the PivotTable Tools Design tab, in the Filter group, click Insert Slicer to open the Insert
Slicers dialog box (Figure 3-15).
In the Insert Slicers dialog box, you can select check boxes to indicate the slicers you want to create. After
you click OK, the slicers will appear on the worksheet but overlap each other. You can move the slicers to
different areas of the worksheet to see them in their entirety. For example, if you select Date, Customer No.,
Sale Type, and Payment Type, and then move the slicers so they no longer overlap, your worksheet would
look similar to Figure 3-16.
You can click individual items within the slicers to filter the data that will display in the pivot table according
to your selections. You can press and hold the CTRL key to select (or deselect) multiple items.
To clear the filter (that is, to re-select all the values in a slicer), simply click the Clear Filter button in the upper-
right corner of the slicer.
1. Open Sales Pivot Table Slicers.xlsx located in the StarterFiles folder, and save it as My Sales Pivot
Table Slicers.xlsx in the MyProjects folder.
2. Select any cell inside the pivot table to activate the PivotTable Tools tabs in the Ribbon.
3. In the PivotTable Fields task pane, drag the Payment Type field from the Rows area to the Columns area.
4. Drag the Sale Type field from the Filters area to the Rows area.
5. Click the Count of Amount Paid drop-down arrow in the Values area, and click Value Field Settings.
6. Select Sum in the Summarize value field by list and click OK.
7. On the PivotTable Tools Analyze tab, in the Filter group, click Insert Slicer.
8. Select the check boxes for Date, Customer No., Sale Type, and Payment Type to turn these on, and
click OK.
9. Move the slicers to an empty area to the right of the pivot table.
10. Click individual buttons of your choice in any of the slicers and observe the effects on the pivot table.
11. Press and hold the CTRL key to select (or deselect) more than one button in a slicer.
12. Click the Clear Filter button in the upper-right corner of any slicer to select all the values in that slicer.
You can use the Grouping dialog box to specify a starting and ending date, and the fields by which to group
the pivot table data. The pivot table in Figure 3-18 shows rows of date values grouped by month, quarter,
and year.
You can click the Collapse ( - ) button if you want to see only the summary values for a group. Conversely, if
a group or groups are collapsed, you can click the Expand ( + ) button to display the detail for that group.
You can also right-click any date and click Expand/Collapse for additional expand and collapse options
(Figure 3-19).
Expand Click to display the details for the current item; analogous to clicking the
Expand ( + ) button.
Collapse Click to hide the details for the current item; analogous to clicking the
Collapse ( - ) button.
Expand Entire Field Click to display the details for all items in a field.
Collapse Entire Field Click to hide the details for all items in a field.
Expand to “<field name>” Click to display a level of detail beyond the next level.
Collapse to “<field name>” Click to hide a level of detail beyond the next level.
To remove the grouping from the pivot table, right-click any date value, and click Ungroup.
To ensure that summary totals will appear automatically, you can right-click any of the row labels that should
contain totals (for example, quarter or year), and then click Field Setting to open the Field Settings dialog
box (Figure 3-20). Click Automatic in the Subtotals section and click OK.
You can create two groups called Single Booking and Multiple Booking that contain row data appropriate
for each booking type.
For example, to create the Single Booking group, press and hold CTRL, select Bike tour, Car rental, Cruise,
Flight, Hotel, Nature tour, and Rock climbing, release CTRL, right-click any of the selected row values, and
click Group. A group called Group1 will be created containing the rows you selected. In the Formula Bar,
change the name of Group1 to a meaningful name, such as Single Booking.
If you perform the same steps using the remaining row values to create the Multiple Booking group, the
pivot table should appear similar to Figure 3-22.
Figure 3-22: Sample pivot table – Single Booking group and Multiple Booking group
1. Open Sales Pivot Table Grouping.xlsx located in the StarterFiles folder, and save it as My Sales Pivot
Table Grouping.xlsx in the MyProjects folder.
2. Select a cell within the cell range A1:E2009. On the Insert tab, in the Tables group, click PivotTable and
click OK to create a pivot table in a new worksheet.
3. Select the Date, Amount Paid, and Payment Type check boxes.
4. In the PivotTable Fields task pane, drag the Payment Type field from the Rows area to the Columns area.
The Months option is already selected for you. You will add the Years selection as well.
5. Right-click any date value in the pivot table, and click Group.
The date rows are now grouped by both year and month. You can expand and collapse the groups to
see the rows at different levels of detail.
7. Click the Collapse ( - ) button for the months of Jan and Feb.
9. Right-click any month in column A, click Expand/Collapse, then click Collapse Entire Field.
10. Right-click any date value in the pivot table, and click Ungroup.
11. Right-click any date value in the pivot table, and click Group. With the Months option selected, click the
Quarters and Years options so that all three are selected. Click OK.
Notice that the lowest level of data is now at the month level, even though the Task Pane shows Date in
the Rows area. Also notice two new items in the Rows area: Years and Quarters.
13. Press and hold the CTRL key, then click each of the following row labels:
Bike tour
Car rental
Cruise
Flight
Hotel
Nature tour
Rock climbing
14. Release the CTRL key, right-click any of the selected row values, and then click Group.
15. Select the Flight+Car rental label, press and hold the CTRL key, then click on each of the following row
labels:
Flight+Cruise
Flight+Hotel
Hotel+Car rental
16. Release the CTRL key, right-click any of the selected row values, and then click Group.
17. Select cell A7 (containing the label Group1), select the text Group1 in the Formula Bar and enter: Single
Booking.
18. Select cell A15 (containing the label Group2), select the text Group2 in the Formula Bar and enter:
Multiple Booking.
Because of these limitations, calculated fields are usually simple formulas that use math operators such as
add (+), subtract (-), multiply (*), and divide (/). You can also use any function that allows references to pivot
table labels, such as =SUM(Item1,Item2,Item3) or =IF(Amount>20,Amount*0.05,0).
To insert a calculated field, on the PivotTable Tools Analyze tab, in the Calculations group, click Fields, Items,
& Sets, and then click Calculated Field. The Insert Calculated Field dialog box (Figure 3-23) will open, in which
you can specify the name and formula of a field for which you want to calculate values based on the current
fields in the pivot table.
For example, a new calculated field called Commissions can be calculated by multiplying the existing field
Amount Paid by 12%, as shown in Figure 3-23.
Figure 3-23: Insert Calculated Field dialog box – Commissions calculated field
Calculated items are similar to calculated fields in pivot tables, but are used for distinctly different purposes,
which will be explained shortly. To insert a calculated item, on the PivotTable Tools Analyze tab, in the
Calculations group, click Fields, Items, & Sets, and then click Calculated Item. The Insert Calculated Item
dialog box will open, in which you can specify the name and formula of an item for which you want to
calculate values based on the current items in the pivot table.
For example, a new calculated item called Regular Card can be calculated by multiplying the sum of three
items (Air Miles, Mastercard, and Visa) by 2.5%, as shown in Figure 3-24.
Figure 3-24: Insert Calculated Item in “Payment Type” dialog box – Regular Card new calculated item
A second new calculated item called Premium Card can be calculated by multiplying the sum of two items
(Amex and Diner’s Card) by 3.0%, as shown in Figure 3-25.
Figure 3-25: Insert Calculated Item in “Payment Type” dialog box – Premium Card new calculated item
Figure 3-26 shows how the new calculated field and the two new calculated items will appear in the pivot
table.
Figure 3-26: Calculated field and two new calculated items in pivot table
One way of describing the differences between calculated fields and calculated items is illustrated by the
pivot table example in the previous figure. The Sum of Commissions column is a calculated field based on
each row (credit card type). This pivot table also has two calculated items added: Regular Card and Premium
Card. Each of these new rows is calculated as a formula based on rows 5 to 10. Therefore, a calculated field
appears as a new column, but a calculated item shows as a new row, or vice versa.
This example also demonstrates that a calculated field appears as a separate column from the original data,
and therefore does not affect the original data. A calculated item appears as another row, together with the
original data rows. A calculated item can be described as a virtual item (row or column). Because it now
behaves like one of the original data items, its value is added to summary totals, can be filtered, and can be
included in a group. In the previous example, the two calculated items are grouped separately from the
original data to help users distinguish between the two.
Keep in mind that you must remove any groups from all pivot tables that were created from the same data
before you can create calculated items. After you have created the calculated items, you can group the data
again.
1. Open Sales Pivot Table Calculated Fields.xlsx located in the StarterFiles folder, and save it as My Sales
Pivot Table Calculated Fields.xlsx in the MyProjects folder.
2. Select a cell within the cell range A1:E2009. On the Insert tab, in the Tables group, click PivotTable and
click OK to create a pivot table in a new worksheet.
4. On the PivotTable Tools Analyze tab, in the Calculations group, click Fields, Items, & Sets, then click
Calculated Field.
5. With the default name in the Name field highlighted, type: Commissions.
6. In the Fields list box, click Amount Paid, and then click Insert Field.
7. With the cursor now in the Formula field, type: * 0.12 and click OK.
8. Select Sheet1 and insert a new pivot table that includes the Amount Paid and Payment Type fields.
10. On the PivotTable Tools Analyze tab, in the Calculations group, click Fields, Items, & Sets, and then click
Calculated Item.
Note: Notice also that the PivotTable Fields task pane has additional fields that were not present
originally, such as Quarters and Sale Type2.
13. Right-click the group label in cell A15, then click Ungroup.
14. Right-click the group label in cell A7, then click Ungroup.
15. Click the Sheet3 worksheet tab. Right-click the group label in cell A5, then click Ungroup.
16. Select the Sheet5 worksheet tab, then on the PivotTable Tools Analyze tab, in the Calculations group,
click Fields, Items, & Sets and click Calculated Item.
17. In the Name field, type: Regular Card and press TAB.
19. Click Air Miles in the Items list box and click Insert Item.
21. Click Mastercard in the Items list box and click Insert Item.
23. Click Visa in the Items list box and click Insert Item.
26. On the Analyze tab, in the Calculations group, click Fields, Items, & Sets then click Calculated Item.
27. In the Name field, type: Premium Card and press TAB.
29. Click Amex in the Items list box and click Insert Item.
31. Click Diner’s Card in the Items list box and click Insert Item.
32. With the cursor in the Formula field, type: ) and click OK.
33. Click cell A4 (Air Miles), press and hold the SHIFT key, and then click cell A9 (Visa). Release the SHIFT
key.
34. Right-click any of the selected row values, and click Group.
35. Select the Regular Card label, press and hold the CTRL key, then click the Premium Card label.
36. Release the CTRL key, right-click any of the selected row values, and then click Group.
37. Select cell A4 (containing the label Group1) and enter: Sales
38. Select cell A11 (containing the label Group2) and enter: Credit Card Fees
39. In the Row Labels field (click the Row Labels drop-down arrow), ensure that Payment Type is selected.
Notice that each of the original credit card types and the two calculated items appear in the filter list at
the bottom.
Notice that this pivot table created earlier with a calculated field now also has the calculated items. All
rows are also grouped in this pivot table, but the group names have not changed from their defaults.
Once you specify the pivot chart data and location and click OK, the PivotChart Fields task pane (Figure 3-
28) opens, which controls the structure of the pivot chart—it works in the same manner as the PivotTable
Fields task pane.
Filters Select (or filter) rows of data from the source data that appear in the pivot chart.
Values Display data points for these fields along the y-axis (vertical axis) of the chart.
Once you select fields to display in the pivot chart, the chart will appear in the worksheet. Because Excel links
a pivot chart to a pivot table, the pivot table is created on the worksheet at the same time as the pivot chart,
as shown in Figure 3-29.
You can also create a pivot chart directly from a pivot table by selecting a cell in the pivot table, and then in
the PivotTable Tools Analyze tab, in the Tools group, clicking PivotChart. Select the type of chart you want to
create and click OK.
You can also use the PivotChart button in the Charts group of the Insert tab
to create a standalone pivot chart or a pivot chart with an associated pivot
table (Figure 3-30).
1. Open Sales Pivot Chart.xlsx located in the StarterFiles folder, and save it as My Sales Pivot Chart.xlsx
in the MyProjects folder.
4. Verify that the correct cell range (A1:E2009) has been selected and that the pivot chart will be placed in
a new worksheet, then click OK.
5. In the PivotChart Fields pane, select the Sale Type and Amount Paid check boxes to turn them on.
Notice that Excel links a pivot chart to a pivot table; therefore, as you define your pivot chart, the pivot
table is created on the worksheet at the same time.
6. Select the Payment Type check box to turn it on, then drag the Payment Type field from the Axis
(Categories) area to the Legend (Series) area.
7. Drag the pivot chart to the blank area below the pivot table.
9. If necessary, click any cell in the pivot table to activate the PivotTable Fields Task Pane.
10. On the PivotTable Tools Analyze tab, in the Tools group, click PivotChart.
11. With the Clustered Column chart (far left in the Column category) selected, click OK.
12. Move the pivot chart to a new position below the pivot table.
This pivot chart is identical to the one in Sheet3 but was created using the PivotChart command in the
PivotTable Tools Ribbon. If you make any changes to the pivot table, the pivot chart will automatically
change as well.
13. Click the Column Labels AutoFilter button in the pivot table.
14. Select the Air Miles and Cash check boxes to turn them off, and then click OK.
15. Select the Sheet1 worksheet, then on the Insert tab, in the Charts group, click PivotChart.
16. In the Create PivotChart dialog box, select the Add this data to the Data Model check box to turn it
on.
17. Verify that the correct cell range has been selected and that the pivot chart will be placed in a new
worksheet, then click OK.
18. In the PivotChart Fields pane, select the Sale Type, Amount Paid, and Payment Type check boxes to
turn them on.
19. Drag the Payment Type field from the Axis (Categories) area to the Legend (Series) area.
Notice that the pivot chart appears on its own without any pivot table being visible.
20. Drag the pivot chart to the upper left area of the worksheet.
21. On the PivotChart Tools Analyze tab, in the Filter group, click Insert Slicer.
22. In the Insert Slicers dialog box, select the Payment Type check box to turn it on, and then click OK.
23. In the Payment Type slicer box, click the Amex button, press and hold the CTRL key, and then click the
Diner’s Card, MasterCard, and Visa buttons to select them as well. Release the CTRL key.
24. In the PivotChart Fields pane, drag the Sale Type field to the Legend (Series) area.
25. In the PivotChart Fields pane, drag the Sale Type field back to the Axis (Categories) area.
The most commonly used chart elements can be switched on or off by using the Chart Elements button
(Figure 3-33) that appears to the right of the pivot chart.
Figure 3-34 shows a pivot chart with the Axis Titles and Chart Title elements turned on (in addition to the
three default elements: Axes, Gridlines, and Legend). You can replace the default title text with any text of
your choice.
Figure 3-34: Pivot chart with Axis Titles and Chart Title elements turned on
1. Open Sales Pivot Chart Options.xlsx located in the StarterFiles folder, and save it as My Sales Pivot
Chart Options.xlsx in the MyProjects folder.
2. Select the Sheet3 tab, click in the pivot chart to select it, then widen it to the same width as the pivot
table. Also make the chart taller by at least two rows.
3. Click the Chart Elements icon that appears to the right of the pivot chart.
4. Point the cursor at each of the following check boxes that are turned off, and observe the effect on the
pivot chart: Data Labels, Data Table, and Error Bars.
6. Select the Axis Titles check box to turn it on, then click the arrow button to the right. Deselect the
Primary Vertical check box to turn it off.
7. Click twice in the Axis Title text box below the horizontal axis, delete the default text, and then type:
Sales Type
8. Click twice in the Chart Title text box at the top of the chart, and replace the default text with: Sales by
Type
9. On the PivotChart Tools Format tab, examine the various Ribbon commands available to format the pivot
chart.
10. On the PivotChart Tools Analyze tab, in the PivotChart group, click in the Chart Name text box and
change the name to: Sales by Type
11. Click in any blank area of the chart background, then on the PivotChart Tools Format tab, in the Shape
Styles group, click the Shape Fill arrow, and then hover the cursor over the different colors displayed.
Observe the changes to the chart background colors.
12. Click in an empty area of the worksheet to close the Shape Fill drop-down list.
However, the pivot tools always perform an aggregation of the values; for example, they will calculate a sum
total, an average, or find the maximum value. Quite often when you look at an aggregate value, you will want
to see the detailed data rows behind that value.
For example, suppose you have the pivot table shown in Figure 3-35.
If you double-click cell B5 in the pivot table (whose value is 44686), a separate worksheet will be created that
contains the detail row data that make up the aggregate value that appears in cell B5, as shown in Figure 3-
36. The new worksheet shows a breakdown of the amount paid for cruises using air miles.
Figure 3-36: Pivot table detail row data – breakdown of amount paid for cruises using air miles
Use the Expand Entire Field button to drill down into the details and reflect them in the chart. Use the Collapse
Entire Field button to gain a more summary view of the data.
Figure 3-37 shows the same pivot chart with varying degrees of detail displayed. Each successive display is
achieved by clicking the Expand Entire Field drill down button.
Figure 3-37: Three images of pivot chart with varying degrees of detail
1. Open Sales Pivot Chart Drilling.xlsx located in the StarterFiles folder, and save it as My Sales Pivot
Chart Drilling.xlsx in the MyProjects folder.
Suppose you want to know what the detailed transactions were that added up to the total value you see for
cruises that were paid for using air miles.
A new worksheet is created with the detailed transactions that comprise this value in the pivot table.
3. Double-click the right edge of the column A header to auto-fit the column width to the largest value.
Suppose you want to see the transactions for cruises that were paid for using air miles represented in the
pivot chart.
6. In the pivot chart, display the Sale Type list, deselect the (Select All) check box, select the Cruise check
box, and then click OK.
7. In the PivotChart Fields pane, select the Date field check box.
The Months and Date fields are added to the Axis (Categories) area in the PivotChart Fields pane and a
bar for each payment type displays for each month.
Notice that the Excel pivot chart drill down buttons now display in the lower right corner of the pivot
chart.
The chart now shows the detail transactions for each cruise.
Notice also that the pivot table expands to show more detailed data.
9. In the pivot chart, display the Payment Type list, deselect the (Select All) check box, select the Air Miles
check box, and then click OK.
The chart now shows the detail transactions for each cruise that was paid for using air miles.
10. In the pivot chart, click the Collapse Entire Field button to view more summarized data.
The chart now shows the monthly totals for each cruise that was paid for using air miles.
11. In the pivot chart, click the Collapse Entire Field button once more.
The pivot chart now shows only one bar, representing the total dollar amount for cruises that were paid
for using air miles.
Select a pivot chart and click the Chart Styles button to display the Style tab, from which you can select a
built-in chart style (Figure 3-38a). Clicking the Color tab will display a list of the color schemes you can apply
to the chart (Figure 3-38b).
Figure 3-38a: Chart Styles button – Style tab Figure 3-38b: Chart Styles button – Color tab
Figure 3-39 shows a pivot chart with the Style 7 style and the Colorful Palette 4 color scheme applied.
Figure 3-39: Pivot chart with Style 7 and Colorful Palette 4 applied
The full set of chart styles, colors, and elements are accessible from the PivotChart Tools Design tab in the
Ribbon (Figure 3-40).
Lesson Summary
Now that you have completed this lesson, you should be able to:
Key Terms
Term Definition
AutoFilter A feature that allows you to filter records in a worksheet by specifying filter criteria.
See Filter.
Calculated Fields Simple formulas that use math operators such as add (+), subtract (-), multiply (*),
and divide (/) that you can insert into a pivot table to create new data based on
existing data. See Pivot Table.
Data Slicers Buttons you can click to filter the data in a table or pivot table.
Filter The process of temporarily hiding data rows and/or columns that do not meet the
filter criteria.
Grouping A feature you can use to simplify a large table or pivot table by condensing data into
logical groups (for example, grouping date values by month, quarter, or year).
Pivot Chart A chart that displays the data in a pivot table. See Pivot Table.
Pivot Table A table that summarizes or cross-tabulates large amounts of data by selecting fields
for rows and columns and performing a summary function on the intersections of
the row and column fields.
Quiz Questions
For each question, select the best answer.
1. Which tool do you use to specify which columns of data from your source data table to use as the columns,
rows, values, or filters of a pivot table?
2. Dean applied numeric formatting via the Format Cells dialog box to the values displayed in his pivot table,
but discovered that when he changes the pivot table, the formatting disappears. What can he do to remedy
the situation?
a. Apply the formatting using the buttons on the PivotTable Tools Analyze contextual ribbon tab.
b. Apply the formatting to the pivot table fields, instead of to the displayed values.
c. Apply the formatting using the Tools button in the PivotTable Fields task pane.
d. There is no remedy for this situation; it is the nature of pivot tables.
3. Which tool would you use to customize a pivot table – for example, to switch the fields used for rows with
the fields used for columns?
a. Remove the column that contains the filter field from the pivot table.
b. Remove the column that contains the filter field from the source data.
c. Click the drop-down arrow for the field in the Filters area of the PivotTable Fields task pane, and
then click Remove Field.
d. Hide the column that contains the filter field in the pivot table.
5. Which pivot table feature can you use to easily determine which filter conditions are currently active?
a. Slicers
b. FilterTrackers
c. Timelines
d. Calculated items
6. Elsie created a pivot table from 5,000 records of source data that groups employees by the following
departments: Engineering, Fulfillment, Support, Sales, and Marketing. For budgeting purposes, she wants to
group these five departments into two groups – Group 1 (which includes Engineering and Support) and
Group 2 (which includes Fulfillment, Sales, and Marketing); however, these groups do not appear in the source
data. What can she do?
a. Recreate the source data range and arrange the data into the desired Group 1 and Group 2 groups.
b. Create the Group 1 and Group 2 groups manually.
c. Add a calculated field to the pivot table for grouping purposes.
d. Add a calculated item to each group, and then group by the item.
7. If a calculated field named Sum of Commissions appears as a new column, how will a calculated item named
Zone 2 appear in the pivot table?
a. As a filter
b. As a new column
c. As a new row
d. It is impossible to predict from the given information.
a. Click the buttons for the elements on the PivotChart Tools Analyze contextual ribbon tab.
b. Select the desired elements from a gallery on the PivotChart Tools Format contextual ribbon tab.
c. Switch them on or off using the Chart Elements button.
d. You must re-create the pivot chart in order to include the elements you want.
10. When do the Excel pivot chart drill down buttons appear in a pivot chart?
a. When you include multiple fields in the Axis (Categories) area of the pivot chart
b. When all pivot chart filters are turned off
c. When all pivot chart summary calculations are set to Sum
d. When you activate at least one data slicer
11. In order to apply styles to a pivot chart, which tab in the PivotChart Tools contextual ribbon would you use?
a. Analyze
b. Design
c. Format
d. Style
Microsoft ®
Excel
Expert Certification Guide
Lesson 4: Workbook
Management Features
Lesson Objectives
In this lesson, you will link to external workbooks, consolidate data, use comments, protect workbooks, and set
global and workbook-specific options. Upon completion of this lesson, you will be able to:
Insert, modify, and remove links to external Protect a worksheet from unwanted changes.
workbooks. Allow users to edit specific ranges only.
Consolidate data from multiple workbooks. Protect a workbook structure from unwanted
Create, navigate among, reply to, changes.
and delete comments. Set global and workbook-specific options.
Create secure passwords.
The ! (exclamation) symbol – also known as the bang symbol – is used by Excel to indicate that this cell
reference is found in a different worksheet. The single quotes are required if the worksheet name includes
blank spaces in it.
1. Open Land Tour Group Totals Create Links.xlsx, Land Tour Group 2.xlsx, and Land Tour Group
1.xlsx located in the StarterFiles folder.
2. Make the Land Tour Group Totals Create Links workbook the active workbook and maximize it.
You will enter links into this (dependent) workbook from several source workbooks.
3. On the View tab, in the Window group, click Arrange All. In the Arrange Windows dialog box, select the
Tiled option and click OK to make it easier to view and copy data from one workbook to another.
4. Select cell B5 in the Land Tour Group Totals Create Links workbook, and type: = to start your formula.
5. Click anywhere in the Land Tour Group 1 workbook and select cell B4. Press ENTER.
6. Select cell B5 in the Land Tour Group Totals Create Links workbook again and note the cell reference in
the Name Box. Within this worksheet, the cell is named B5.
7. With cell B5 in the Land Tour Group Totals Create Links workbook still selected, note the cell reference
in the Formula Bar.
The cell reference contains the file name (and full drive and folder name, after the workbook has been
saved the first time) reference of the source workbook, the worksheet name, and the cell address.
Notice that the workbook link uses an absolute cell reference; you will need to modify it if you want to
copy and paste the formula to other cells.
8. With cell B5 in the Land Tour Group Totals Create Links workbook still selected, press F2 and change the
cell reference from $B$4 to $B4.
10. Select the cell range B4:B11 in the Land Tour Group 2 workbook, then copy these cells.
11. Select cell C5 in the Land Tour Group Totals Create Links workbook, then on the Home tab, in the
Clipboard group, click the Paste drop-down arrow. In the Paste menu, click Paste Link (N). (This item
can be found in the Other Paste Options section, second from left).
This technique inserts the correct links for all the cells selected in the source workbook.
12. Close the Land Tour Group 1 workbook and the Land Tour Group 2 workbook.
13. Open the Land Tour Group 4 workbook and the Land Tour Group 3 workbook located the StarterFiles
folder.
14. Make the Land Tour Group Totals Create Links workbook the active workbook and tile the windows once
more.
15. Select cell D5 in the Land Tour Group Totals Create Links workbook, and type: =
16. Select cell B4 in the Land Tour Group 3 workbook, and press ENTER.
17. Select cell D5 in the Totals workbook again, press F2 and change the cell reference from $B$4 to $B4.
19. Select cell E5, press F2 and change the worksheet reference to: Land Tour Group 4.xlsx.
With the two workbook links now referencing two different workbooks, you can correctly copy and paste
these formulas to the remaining cells.
20. Select the cell range D5:E5, and copy down to the cell range D6:E12.
The screen now appears similar to the following (note the formula for E12 in the Formula Bar):
21. Select cell B4 in the Land Tour Group 4 workbook, and enter: 80.
The Totals workbook is updated automatically through the workbook link. Now try a scenario in which a
source workbook is changed while the dependent workbook is closed.
22. Save and close the Land Tour Group Totals Create Links and Land Tour Group 4 workbooks.
23. Select cell B4 in the Land Tour Group 3 workbook, and enter: 50.
24. Save the Land Tour Group 3 workbook, then press CTRL+W to close it.
25. Open the Land Tour Group Totals Create Links workbook.
26. Click Enable Content in the security warning to update the links.
Notice that cell C5 is now updated to the new changed value from the Land Tour Group 3 workbook.
27. Click on various cells of your choice in the cell range B5:E11, and look at the contents of the Formula Bar.
It now contains the full drive, folder path, and file name of the source workbook, followed by the
worksheet name and cell reference.
To change the link references, you can change the address reference directly in the cell or use the Edit Links
dialog box. To display this dialog box, on the Data tab, in the Queries & Connections group, click Edit Links.
Update Values Update all cells that reference this external workbook by incorporating the data from the
workbook.
Change Source Display the Change Source dialog box to enable you to find the drive, folder, and/or file
name that has changed for this workbook.
Open Source Open the selected source workbook as a new Excel window.
Break Link Automatically converts all cells that reference this external workbook from a formula to
the existing equivalent data values.
Check Status Verify the integrity of all links to external source workbooks. The Status column will be
updated.
1. Use the Windows Explorer to navigate to the 3274 Exercise Files/StarterFiles folder and change the name
of Land Tour Group 1 to 1a (the full file name is now Land Tour Group 1a), but do not open it.
3. Open Land Tour Group Totals Modify Links.xlsx located in the StarterFiles folder, and save it as My
Land Tour Group Totals Modify Links.xlsx in the MyProjects folder.
Excel now updates all formulas in the workbook that reference other workbooks. Because one of those
source workbooks can no longer be found, the following message is displayed.
The Edit Links dialog box lists all external source workbooks and the status information for each of them.
An error message appears next to the Land Tour Group 1 workbook, indicating that this source workbook
cannot be found.
The Change Source dialog box, which is almost identical to the Open dialog box, opens, enabling you to
find the correct location of this source workbook.
The link is now updated with the correct workbook name. Furthermore, all data referenced from all linked
workbooks has been validated.
9. Close the Edit Links dialog box, then save and close the workbook.
You can use the Break Link button in the Edit Links dialog box to break the link from one or more workbooks.
If you want to break the link for one workbook, select the workbook and click Break Link. If you want to break
the links for multiple workbooks, use CTRL or SHIFT to select the desired workbooks, and then click Break
Link.
For example, suppose you want to break the links from two of the four workbooks to which the current
workbook is linked. Open the Edit Links dialog box and select the two workbooks, as shown in Figure 4-2.
Breaking links permanently converts formulas and external references to their existing values. When you click
the Break Link button, the message shown in Figure 4-3 will appear.
Click the Break Links button to complete the process. Once you click the Break Links button, the external
references for the selected workbooks in the Edit Links dialog box will be removed. Notice that the Edit Links
dialog box still displays the two remaining workbooks (the ones for which you did not break links), as shown
in Figure 4-4.
Figure 4-4: Edit Links dialog box – Two remaining linked workbooks
1. Open Land Tour Group Totals Remove Links.xlsx located in the StarterFiles folder, save it as My Land
Tour Group Totals Remove Links.xlsx in the MyProjects folder, and then click Enable Content if
necessary.
2. Copy cells B5:E5, then on the Home tab, in the Clipboard group, click the Paste arrow and click Values
(V) (Paste Values section, first option).
Each of these linked workbook cell references has now been converted to numeric values in this
workbook.
3. Press ESC and select some of the cells in the range B5:E12.
Notice that the cells in row 5 contain numeric values, but the rest of the rows still contain links. The
alternative method is to use the Edit Links dialog box to break the links.
4. On the Data tab, in the Queries & Connections group, click Edit Links.
5. Click the first workbook link in the Edit Links dialog box, then press and hold the SHIFT key while clicking
on the last workbook link. Release the SHIFT key.
7. Read the contents of the message box and click Break Links.
With all the external references removed, notice that the Edit Links dialog box is now empty.
Notice that the cells now contain numeric values. The links have been removed.
Consolidating Data
Objective 3.4.1
Consolidating data refers to the process of summarizing multiple ranges of data into a single range. You
can consolidate data from different areas within a worksheet, from other worksheets in the same workbook,
or from other workbooks.
You begin by selecting the range where you want the consolidated results to be placed. With the range
selected, on the Data tab, in the Data Tools group, click Consolidate to open the Consolidate dialog box
(Figure 4-5).
Function Specifies the type of function (for example, Sum, Count, Average, Max, Min, and so on) to
apply to the data being consolidated. For example, if Sum is selected (the default), then the
consolidated data will be added together.
Reference Specifies the cell range from the worksheet/workbook where the source data is located.
When you click the Add button, the cell range selection is added to the All references list.
All references Lists all the source cell ranges that have been selected. When you click OK, the data from
all the source cell ranges will be consolidated using the selected function.
Use labels in Designates whether any label row and/or column is to be used to consolidate the data.
Create links to Will automatically update your consolidated data whenever the source data is changed.
source data
In the Reference field, select the first cell or range of cells that you want to consolidate, then click Add to
copy the cell range into the All references list. You can select the check boxes in the Use labels in section to
specify where the labels are located relative to the data so Excel can determine which numbers to consolidate.
Once you have selected and added all the cell ranges you want to include in the consolidation, click OK to
perform the specified function and display the results.
Figure 4-6 shows the Consolidate dialog box with entered references, which will consolidate certain values
from two workbooks (Group Tour 1 and Group Tour 2) into a third workbook.
If you select an option in the Use labels in section, Excel will use the column or row labels to match the source
ranges to the destination range; the order does not matter. When using labels to perform consolidation, the
row and column labels must match exactly. The matching process is not case sensitive. For example, the
parameters in Figure 4-6 will yield the values consolidated in the third workbook (Group Tour Total), as shown
in Figure 4-7.
Notice that, even though the data cells in the Group Tour 2 workbook are located in a different sequence
than the Group Tour 1 workbook, the consolidate feature added the correct cells together. Excel knew to use
the cell labels to the left of the numbers to determine which numbers to add together because you had
specified to use “Left column” labels in the Consolidate dialog box.
When consolidating by position, the source ranges must have the same layout as the destination range
(unlike the example shown above). Excel will process cell for cell from the source ranges to the destination
range using the selected function. The data in each of the source worksheets must therefore be in the same
positions; for example, the data in cell A1 from each of the source worksheets will be consolidated and placed
in cell A1 of the destination worksheet.
Even though consolidating data is relatively easy, there are some points you should consider when you are
using the consolidation process.
• Only numeric values are consolidated; any text in the source areas will display as a blank cell.
• Each consolidation area must be separate from other consolidation areas. For example, there must be a
set area for the Eastern Region Sales, another area for Western Region Sales, and so on.
• Excel uses the same numeric format in the consolidated area as what is applied in the first source area.
• Excel consolidates data values only; formulas are not brought into the consolidated worksheet.
• To link different worksheets while consolidating select the Create links to Source Data check box. Creating
links will result in a summary table with the details linked and that contains summation formulas to total
each group.
• You can specify a maximum of 255 source areas.
• When referencing other workbooks, the workbooks do not need to be opened at the time you reference
them.
• You can use range names in the source and destination worksheets. This makes it easier to find specific
information, especially if you do not know exactly where the cells are.
1. Open Group Tour 1.xlsx, Group Tour 2.xlsx, and Group Tour Total.xlsx from the StarterFiles folder.
Before starting the consolidation process, you must select the range where you want the results to be
placed.
6. Select the cells containing the data to be consolidated. Be sure to include the row labels.
7. With the cursor in the Reference field, select cells A1:B3 of the Group Tour 1 workbook.
If the Consolidate dialog box is obstructing the cells that you need to select, you can either click and drag it
out of the way or click the Collapse button at the right side of the Reference field.
Note: The referenced workbook does not need to be open, as it is in this exercise, for you to reference it.
You can manually enter the cell reference; be sure to enter the name of the workbook in square brackets
followed by the worksheet name all in single quotes. Follow this with a bang character (!) and then the cell
range from the source worksheet.
8. In the Use labels in section of the Consolidate dialog box, select the Left column check box to turn it on.
9. Click Add to copy this cell range into the All references list.
10. With the cell range in the Reference field still highlighted, select cells C4:D6 in the Group Tour 2 workbook
and click Add in the Consolidate dialog box.
Notice that even though the data cells in the Group Tour 2 workbook were in a different sequence than
the Group Tour 1 workbook, the consolidate feature added the correct cells together. Excel knew to use
the cell labels to the left of the numbers to determine which numbers to add together.
Note: If the row labels do not appear in the consolidated worksheet, use the Undo feature and be sure to
select the Left column check box.
12. Click each of the cells in the range B4:B6 in the Group Tour Total workbook to view the values entered
into these cells.
13. Save Group Tour Total.xlsx as My Group Tour Total.xlsx in the MyProjects folder, close it, and then
close the remaining open workbooks without saving.
Using Comments
Objective 1.2.5
Comments are like “sticky” notes on a hard-copy document. You typically use them so that several users who
are sharing a workbook can annotate the spreadsheet with their various comments. Excel automatically adds
the current user’s name at the top of the comment text box. The final reviewer can then act on each comment
and follow up with the originator, if necessary.
You can also use comments to remind yourself about things you need to do, or to record detailed information
about formulas you have used, for future reference. Spreadsheets typically contain large volumes of numbers,
titles, and formulas to produce the desired results. Comments often help by providing explanations. You can
insert comments directly into the cells they reference and display them only when you want to see them.
The command buttons used to create, delete, and move among comments are located on the Review tab in
the Comments group (Figure 4-8).
Note: The New Comment and Edit Comment buttons share the same position in the Review tab. If the
active cell does not have a comment, the New Comment button is displayed; otherwise, the Edit Comment
button is displayed.
In Office 365, the Notes group provides legacy-style commands for working with comments created in earlier
versions of Excel, including Excel 2019 Professional Plus. (See the Working with Comments in Office 2019
Professional Plus section if you are using Excel 2019 Professional Plus.)
Creating Comments
Objective 1.2.5
To insert a comment into a worksheet, select the cell to which you want to add a comment and then, on the
Review tab, in the Comments group, click New Comment. A comment box will open, as shown in Figure 4-9.
Notice that the comment box displays your name and the active cell (C6) in the title bar. You can type
whatever text you want in the Start a conversation field, and then click the Post button in the bottom left
corner of the comment box to create your comment. As shown in the previous figure, Excel displays a purple
marker in the top right corner of the commented cell to remind you that you have inserted a comment there.
Otherwise, the comment would remain hidden until you position the mouse pointer over that cell.
If you want to display your comment(s) continuously, on the Review tab, in the Comments group, click Show
Comments to open the Comments task pane (Figure 4-10). Simply close the Comments task pane or click
the Show Comments button again to hide the comments.
When the Comments task pane is closed, you can move from comment to comment by clicking the Previous
Comment and Next Comment buttons in the Comments section of the Review tab to move to the previous
comment and next comment in the worksheet, respectively. For example, if the active cell is cell C6, click Next
Comment to move to cell C21; click Previous Comment to move back to cell C6.
Replying to Comments
Objective 1.2.5
To reply to a comment, select the commented cell in the worksheet (or open the Comments task pane and
select the comment). Enter your comment in the Reply field that appears below the original comment (Figure
4-11), and then click the Post button.
Notice the Edit and Delete options that appear in the lower right portion of the reply. Once you’ve clicked
the Post button to complete the comment, you can click the Edit option to change your reply or click the
Delete option to delete it.
By replying to comments in this manner, you (and others) are creating a “conversation thread,” which makes
it easy to follow the flow of comments.
Deleting Comments
Objective 1.2.5
To remove a comment or an entire comment thread, select the comment you want to delete and, on the
Review tab, in the Comments group, click Delete. You can also remove individual “reply” comments in a
comment thread by clicking the Delete option in a particular “reply” comment. You can perform these actions
in the worksheet if the Comments task pane is not open or in the Comments task pane if it is open.
The command buttons used to create, delete, show, hide, and move among comments are located on the
Review tab in the Comments group (Figure 4-13).
Figure 4-13: Review ribbon tab – Comments group (Office 2019 Professional Plus)
The New Comment and Edit Comment buttons share the same position in the Review tab. If the active cell
does not have a comment, the New Comment button is displayed; otherwise, the Edit Comment button is
displayed.
When you insert a comment, a yellow "sticky note" opens on the worksheet with the cursor positioned inside,
below your name. Type your comment, then click outside the active cell. Excel displays a red (Comment
Symbol) in the top right corner of the cell to remind you that you have inserted a comment there.
To temporarily display the contents of an individual comment, position the cursor over a cell containing the
comment symbol. When you move the cursor away, only the Comment Symbol displays.
To display the contents of all comments in a worksheet, on the Review tab, in the Comments group, click
Show All Comments.
To move among comments in a worksheet, on the Review tab, in the Comments group, click the Next or
Previous buttons. Unlike in Office 365, the cell pointer moves to the comment instead of making the cell in
which the comment is inserted the active cell.
1. Open Income Statement.xlsx located in the StarterFiles folder, and then select cell C6.
3. In the Start a conversation field, type: Revenue came from sales of souvenir T-shirts.
Note: If you are using Office 2019 Professional Plus, enter the text in the comment box. Your screen
will appear as shown below:
Excel displays a comment indicator in the top right corner of the cell to remind you that you have inserted
a comment there. Otherwise, the comment would remain hidden until you position the mouse pointer
over that cell.
5. With the current active cell elsewhere on the worksheet, point the cursor at cell C6.
Note: If you are using Office 2019 Professional Plus, skip this step.
7. Select cell C21 and, on the Review tab, in the Comments group, click New Comment.
8. In the Start a conversation field, type: Net income needs to be improved!, and then click the Post button.
Note: If you are using Office 2019 Professional Plus, skip the posting portion of this step.
10. On the Review tab, in the Comments group, click Show Comments.
The Comments task pane opens displaying both comments in the worksheet.
Note: If you are using Office 2019 Professional Plus, on the Review tab, in the Comments group, click
Show All Comments.
11. On the Review tab, in the Comments group, click Show Comments again to close the Comments task
pane.
Note: If you are using Office 2019 Professional Plus, on the Review tab, in the Comments group, click
Show All Comments again to hide the comments.
13. On the Review tab, in the Comments group, click Next Comment.
Note: If you are using Office 2019 Professional Plus, on the Review tab, in the Comments group, click
Next.
The cell pointer will move to the first comment, which is attached to cell C6. Notice that "Comment 1"
displays in the Name box.
Note: If you are using Office 2019 Professional Plus, click the Next button again.
15. On the Review tab, in the Comments group, click Previous Comment to make cell C6 the active cell.
Note: If you are using Office 2019 Professional Plus, on the Review tab, in the Comments group, click
Previous to reselect the first comment.
16. Open the Comments task pane. Click the second comment to select it. Notice that cell C21 is now the
active cell.
17. Leave the Comments task pane open for the next task.
Note: If you are using Office 2019 Professional Plus, on the Review tab, in the Comments group, click
Show All Comments, then click the second comment to select it.
18. In the Comments task pane, click in the Reply field for the first task, type: By how much?, and then click
the Cancel button to remove the text.
Note: If you are using Office 2019 Professional Plus, skip to step 23.
19. Click in the Reply field again, type: What else can we include in this category?, and then click the Post
button.
20. Close the Comments task pane and position the mouse cursor over cell C6. Notice that the reply
comment appears below the original comment.
21. Select cell C6, select the reply comment, and then click Edit.
22. Double-click the word else, replace it with other items, and then click Save.
23. Click at the end of the first comment, press ENTER twice, then type: What other items can we include in
this category?
The Comment feature in Office 2019 Professional Plus is not as intuitive and user-friendly as the
Comment feature in Office 365.
24. Select cell C6. Point to the reply comment, and then click Delete.
Note: If you are using Office 2019 Professional Plus, select the What other items can we include in this
category? text within the comment, then press DELETE.
Note: If you are using Office 2019 Professional Plus, select the entire comment by clicking one of its
borders, then press DELETE.
Note: If you are using Office 2019 Professional Plus, in the Comments group, click Next, then press
DELETE.
Excel provides levels of protection that range from protecting individual cells up to full workbook files. By
using the appropriate level of protection, you can permit access to selected areas of the workbook while
hiding sensitive information and protecting your formulas.
When protection is enabled, Excel prompts the user to enter a password. If you are just protecting your
worksheet or workbook from accidental changes, you can leave the password blank. Although this is
equivalent to giving everyone the password, the intention here is simply to act as a friendly reminder; changes
can be made if they are important. A password, however, protects against malicious data tampering or
unauthorized viewing of sensitive data. Once a cell, worksheet, or workbook is password-protected, you will
be able to remove the protection only by using the password.
If you need a secure password (one that is more difficult to hack), here are some guidelines:
• The password must be at least six characters long. It is usually not necessary to exceed 10 characters.
• It must have at least one of each of these: lower-case alphabetic character (a to z), upper-case (A to Z),
numeric digit (0 to 9), and other characters (for example, # ! % &). An example of a secure password is
seC#r3T.
If you don’t need as much security but do need a password that will be easy to remember, follow these
guidelines:
• Choose a word that will not be obvious to others. For example, if you have a worksheet that lists the
salaries of everyone in the company, you might choose “grsPaY-17” instead of “salary.”
• Avoid associating the password with the job function. For instance, do not use “payroll” as a password
for a payroll workbook.
• If the password is distributed to people whom you want to access the workbook, do not use any of your
personal passwords. If you share a password you normally use for your own access to a secure network
or system, you risk others gaining access to your own secure area.
• Avoid using names of people you know, or pets, as these are typically the first words hackers try.
In addition to preventing others from making unwanted changes to your worksheet, this feature can prevent
you from making mistakes that could cause the loss of formulas or core information. When this is a
consideration, you may want to enable protection that doesn’t include the use of a password.
By default, every cell in a worksheet is set to locked (Figure 4-14a). Therefore, when you turn on worksheet
protection, none of the cells will permit changes. To unlock individual cells or cell ranges, use one of the
following methods:
• On the Home tab, in the Cells group, click Format and click Lock Cell to toggle it off. As shown in Figure
4-14b, you must look closely at the lock icon to confirm the current state.
Figure 4-14a: Lock Cell enabled Figure 4-14b: Lock Cell disabled
• On the Home tab, in the Cells group, click Format, click Format Cells to open the Format Cells dialog box,
and click the Protection tab (Figure 4-15). Click the Locked check box to turn it off or on.
Note: You may find it less confusing to use the Protection tab of the Format Cells dialog box. The Locked
check box clearly displays the locked status of the selected cells.
Once you have unlocked the selected cells, you can turn on worksheet protection. To do this, use one of the
following methods:
• On the Home tab, in the Cells group, click Format, and click Protect Sheet; or
• on the Review tab, in the Protect group, click Protect Sheet; or
• on the File tab, in the Info group, click Protect Workbook, and click Protect Current Sheet.
In this dialog box, you can choose from several additional protection options:
Select locked cells, These options allow users to select the locked or unlocked cells. By default, these
Select unlocked cells options are turned on when protecting a worksheet. Turning off Select locked
cells may be useful because it will allow users to access only unlocked cells. If
both the Select unlocked cells and Select locked cells options are turned off, users
will not be able to select or enter data into any cell on the worksheet.
Format cells, Format These options allow users to change any of the cell formatting in the worksheet.
columns, and Format However, even with these options turned off, users are permitted to use locked
rows cells as a source for the format painter (but not as target cells).
Insert columns, Delete Insert new rows or columns, or delete existing rows or columns.
columns, Insert rows,
and Delete rows
Use PivotTable & Allow the use of pivot tables and pivot charts.
PivotChart
Edit objects Delete or modify pictures, clipart, and other graphic objects.
By selecting any of these options, you allow others to have the selected capabilities. When you choose the
default settings, others are permitted to enter or change data only in unlocked cells and are prevented from
doing anything else, such as inserting or deleting rows or columns, or formatting cells.
Note that the password is optional; if you leave it blank, the worksheet is protected but anyone can unprotect
it. As you enter a password, the ● character displays in the dialog box for every character in the password;
this prevents anyone else from seeing what your password is. If you enter a password, Excel prompts you to
enter it again to ensure that you have entered it correctly.
When worksheet protection is turned on, the Review tab in the Ribbon will display Unprotect Sheet in the
Protect group to indicate that this worksheet is currently in protected mode, as shown in Figure 4-17.
Figure 4-17: Unprotect Sheet in the Protect group - Review ribbon tab
The Info page in the Backstage view will also identify which worksheet is in protected mode (Figure 4-18).
Note: Worksheet protection does not prevent anyone from deleting the entire worksheet or the workbook.
It also does not prevent anyone from copying data to another worksheet or workbook.
1. Open Loan Calculator Protect Worksheet.xlsx located in the StarterFiles folder, and save it as My Loan
Calculator Protect Worksheet.xlsx in the MyProjects folder.
3. On the Home tab, in the Cells group, click Format, and click Format Cells.
4. Click the Protection tab, deselect the Locked check box to turn the setting off, and click OK.
You have now unlocked a range of cells that users will be permitted to update once worksheet protection
is turned on.
5. On the Home tab, in the Cells group, click Format, and click Protect Sheet.
The Protect Sheet dialog box opens so you can select which worksheet operations or objects to protect.
6. Leave all the check boxes at their default settings, then type: 123 in the Password to unprotect sheet field.
Click OK.
Note: Do not use this password for your real workbooks! See the “Using Passwords” topic about
selecting passwords to fit your security needs.
The Confirm Password dialog box now appears; re-enter your password to ensure it is correct.
When you press any key, the following message box appears:
10. On the Home tab, in the Cells group, click Insert or Delete to try to insert or delete a row or column.
Notice that the Insert and Delete (and other) commands in the Ribbon are grayed out, preventing you
from accessing them. However, you do have the ability to insert new worksheets and copy data to
different worksheets.
11. Enter the following information into the cells that were unlocked earlier:
B4 1000
B5 .06
B5 12
12. On the Home tab, in the Cells group, click Format, then click Unprotect Sheet.
Now you will enter a value into a locked cell to verify that the worksheet is unprotected.
15. On the Review tab, in the Protect group, click Protect Sheet.
16. Deselect the Select locked cells and Select unlocked cells check boxes to turn them off and click OK
without specifying a password.
18. On the Review tab, in the Protect group, click Unprotect Sheet.
You did not need to enter a password to unprotect the worksheet because you did not use one when
you had protected it previously.
Once you have unlocked the worksheet, it remains unlocked until you protect it again.
19. Select cell C12 and delete the value in that cell.
The Allow Edit Ranges option is different—it allows users to make changes to unlocked cells, but they need
to know the password for that cell range. This feature enables you to allow only some users to update a
particular cell range.
On the Review tab, in the Protect group, click Allow Edit Ranges to open the Allow Users to Edit Ranges
dialog box (Figure 4-19).
Click the New button to open the New Range dialog box (Figure 4-20).
Use the New Range dialog box to specify different passwords and permission levels for each range of cells.
Refers to cells Identify the ranges of cells that are unlocked in this group. You can specify more than
one range of cells for the worksheet by entering a comma between each range.
Range password Use this password to unlock this group of cell ranges for editing.
Permissions Identify the individual IDs or groups that will have open access to these cell ranges. This
feature works best on computers connected to a domain-based (enterprise) network;
managing security access privileges on individual computers is too time-consuming to
be practical.
Note: You should not use the same password for the unlocked range as the password for locking the
worksheet or workbook.
Click the Permissions button to open the Permissions dialog box (Figure 4-21). Any group or user name(s)
that you add to the Group or user names list will be able to make changes to the selected cell range without
having to enter the password. All other users must enter the password to make changes.
1. Open Loan Calculator Allow Ranges.xlsx located in the StarterFiles folder, and save it as My Loan
Calculator Allow Ranges.xlsx in the MyProjects folder.
3. On the Home tab, in the Cells group, click Format, and then click Lock Cell to lock the selected cells.
4. With cells B5:B6 still selected, on the Review tab, in the Protect group, click Allow Edit Ranges.
6. Select the text in the Title field, then type: Loan data.
8. Click OK.
9. In the Confirm Password dialog box, type: 456 and click OK.
10. In the Allow Users to Edit Ranges dialog box, click Protect Sheet.
11. In the Protect Sheet dialog box, scroll up if necessary, then select the Select locked cells and Select
unlocked cells check boxes to turn them back on.
12. Click in the Password to unprotect sheet field, type: 123 and click OK.
13. In the Confirm Password dialog box, type: 123 and click OK.
With the worksheet now protected, change the value in a cell that is simply unlocked.
Because this cell is one of the locked ranges, the Unlock Range dialog box appears. The key that you
pressed to display this dialog box is ignored.
1. Open Monthly Salary Protect Structure.xlsx located in the StarterFiles folder, and save it as My
Monthly Salary Protect Structure.xlsx in the MyProjects folder.
2. On the Home tab, in the Cells group, click the Insert arrow button, then click Insert Sheet to add a new
worksheet.
3. On the Home tab, in the Cells group, click the Delete arrow button, then click Delete Sheet to delete
this new worksheet.
Note: Even though the button in the Ribbon is named Protect Workbook, it will lock down only the
structure of the workbook. Other users will still be permitted to freely open the workbook and make
changes to any cell in any worksheet.
7. Type: 123 in the Reenter password to proceed field, and then click OK.
8. On the Home tab, in the Cells group, click the Insert arrow button.
9. On the Home tab, in the Cells group, click the Delete arrow button.
10. On the Home tab, in the Cells group, click the Format arrow button. The Organize Sheets menu options
are also grayed out.
11. Right-click the Sheet1 worksheet tab. After reviewing the different menu options that are grayed out,
click any blank area of the worksheet to close the right-click menu.
The Save page of the Excel Options dialog box (Figure 4-23) includes settings that control default locations
for saving files, and the frequency of generating automatically saved versions of files through the
AutoSave/AutoRecover feature.
As you work, Excel saves copies of your workbooks using the AutoSave feature, creating versions you can
use to recover the workbook in case you lose it as a result of a power failure or accidental deletion. These
draft versions of your workbooks contain the contents prior to the last time you saved it (or when the
AutoSave feature created a version).
You can configure the time interval at which Excel will save a copy of the workbook. The longer you work on
a workbook, the more versions there will be if you do not manually save it occasionally.
You can also configure Excel to keep the last autosaved version if you close the file without saving it. If you
enable this option, you can recover your work if you accidentally close a workbook without saving your latest
changes. Re-open the workbook, then click File to access the Backstage view. The modified version is
temporarily available in the Manage Workbook section (Figure 4-24).
The Formulas page of the Excel Options dialog box has two settings that affect how formulas and calculations
are performed: Workbook Calculation and Enable iterative calculation, as shown in Figure 4-25.
Workbook Calculation Worksheets often contain many formulas, and when you update a value upon
which one or more formulas is dependent, all formulas recalculate. In most
situations, however, there is no noticeable delay and the default setting for
workbook calculation is Automatic. There may be times, however, when you want
to suspend recalculation until several values have been entered. You can do that
by changing this setting to Manual. If you change the setting to Manual, formulas
will not recalculate until you press the F9 keyboard key, or use the Calculate Now
or Calculate Sheet commands in the Calculation group on the Formulas tab of the
Ribbon. Notice that in conjunction with the manual setting, you can specify to
force a recalculation when the workbook is saved.
Enable iterative Most Excel formulas require only one calculation to reach completion. Some types
calculation of calculations, such as circular references and formulas that result in a loop,
require that formulas be recalculated several times. Some highly specialized
applications, such as scientific applications, may require a very large number of
recalculations. For these formulas, you can specify the maximum number of
iterations to prevent Excel from recalculating endlessly.
3. In the Excel Options dialog box, click Formulas, click the Manual option button, and then click OK to
save this setting.
Cell B1 has not changed to 20, which is what you would expect if Excel was performing the calculation
automatically. You will need to manually force Excel to recalculate the formula.
Note: Alternatively, you could also force Excel to perform the calculation by clicking Calculate Now in
the Calculation group on the Formulas tab.
8. On the Formulas tab, in the Calculation group, click Calculation Options, and then click Automatic.
Cell B1 now shows the value 30, which is correct because the formula automatically recalculated as soon
as you changed the value in cell A1.
Lesson Summary
Now that you have completed this lesson, you should be able to:
Insert, modify, and remove links to external Protect a worksheet from unwanted changes.
workbooks. Allow users to edit specific ranges only.
Consolidate data from multiple workbooks. Protect a workbook structure from unwanted
Create, navigate among, reply to, changes.
and delete comments. Set global and workbook-specific options.
Create secure passwords.
Key Terms
Term Definition
Allow Edit Ranges A feature that enables you to allow users to make changes to a cell or cell range as
long as they know the password to be able to do so.
AutoSave A feature that creates versions of your workbook that enables you to recover the
workbook in case you lose it as a result of a power failure or accidental deletion. See
Version.
Comment Similar to a post-it note in which you can annotate a worksheet by entering
information for yourself or others to review.
Consolidating data The process of summarizing multiple ranges of data into a single range. You can
consolidate data from different areas within a worksheet, from other worksheets in
the same workbook, or from other workbooks.
Global Options Options and settings you can specify in Excel that affect all workbooks.
Version A draft of your workbook that contains the contents prior to the last time you saved
it (or when the AutoSave feature created a version). See AutoSave.
Workbook Structure Refers to the worksheet tabs within a workbook. You can protect the workbook
structure to prevent users from adding, deleting, moving, or renaming worksheets
within the workbook.
Worksheet A feature that enables you to restrict others from making changes to designated
Protection cells or cell ranges in a worksheet.
Quiz Questions
For each question, select the best answer.
1. Which of the following is the correct workbook link to obtain the value in cell B12 in Sheet1 of the January
Sales workbook?
a. ='C:\Users\Me\January Sales'!B12
b. ='C:\Users\Me\[January Sales.xlsx]Sheet1'!B12
c. ='C:\Users\Me\[Total Sales.xlsx]Sheet1'!B12
d. = C:\Users\Me\[January Sales.xlsx]!B12
2. In which situation might you use the Edit Links dialog box?
3. What happens when you use the Break Link command in the Edit Links dialog box to break the link in cell
C7?
4. On which Ribbon tab can you access the command to consolidate data?
a. add your own comment to the cell immediately to the right of the cell containing the original
comment
b. add your own comment to the cell immediately above the cell containing the original comment
c. open the Comments task pane
d. click Reply to Comment in the Comments group in the Ribbon
6. Ellen has created a large worksheet filled with formulas and she has just turned on worksheet protection. She
notices that cell C25 contains an error. What will happen when she tries to make a correction to cell C25?
7. Which of the following statements about the Allow Edit Ranges option is TRUE?
a. This option validates the data users enter into a specific cell range.
b. The option allows all users to make changes to locked cell ranges.
c. This option prevents users from adding or deleting worksheets.
d. This option requires users to enter a password in order to edit an unlocked cell range.
8. Martin cannot add a new worksheet to the Quarterly Sales workbook. Why not?
9. Which statement about setting workbook management options in Excel is NOT true?
a. If you close a file without first saving it, the changes you made since your last save cannot be
recovered.
b. If you close a file without first saving it, the changes you made since your last save can be recovered.
c. You can specify the frequency with which Excel will automatically save workbooks.
d. You can specify the default file locations for saved files and autosaved files.
10. Where can you specify settings that affect how (and when) formula calculations are performed?
Microsoft ®
Excel
Expert Certification Guide
Nest functions inside other functions. Use the Scenario Manager to perform what-if
analysis.
Use conditional logic functions.
Use the cell Watch Window.
Because there are so many combinations to choose from, you may want to start with one of the selections
in the Chart Layouts group in the Chart Tools Design tab. Each of these options commonly uses a pre-selected
mix of titles, legend, and other chart formatting settings.
In many cases, you may want to configure the chart using two different chart types at the same time. This is
known as a combo chart, in which some of the data series use one chart type (for example, a clustered
column) while the rest of the data series use a different chart type (such as a line). You can select more than
two chart types, but the chart will look too complex. You can also combine a combo chart with dual axes so
that one chart type uses the primary axis, and the other chart type aligns to the secondary axis.
To change these chart type and secondary axis options, on the Chart Tools Design tab, in the Type group,
click Change Chart Type. The Change Chart Type dialog box opens (Figure 5-1).
An alternative method of shifting a data series to the secondary axis is to right-click one of the data points
(or bars) and click Format Data Series in the shortcut menu to open the Format Data Series pane (Figure 5-
2). To switch to the other axis, select the Secondary Axis option in the Format Data Series pane. Note that
you must select one of the data series—four resize handles will appear around each of the data bars in the
series.
1. Open Sales by Type and Year Secondary Axis.xlsx located in the StarterFiles folder, and save it as My
Sales by Type and Year Secondary Axis xlsx in the MyProjects folder.
3. On the Chart Tools Design tab, in the Data group, click Select Data.
5. In the Edit Series dialog box, click in the Series name field, then click cell A16.
6. Delete the current contents of the Series values field, select cells B16:J16, then click OK.
7. In the Select Data Source dialog box, click OK to add this new row of data to the chart.
This new data represents an expense, unlike the other data series, which represent income. It would
therefore make better sense to display it as a different chart type with its own separate Y-axis.
8. On the Chart Tools Design tab, in the Type group, click Change Chart Type.
9. In the Change Chart Type dialog box, click the Combo chart type on the left.
By changing to the combo chart type, Excel changes the second half of the data series to the line type.
10. Scroll down the Choose the chart type and axis for your data series list box, and ensure the Chart Type for
every series is Clustered Column. Only the last one, Advertising and Promotions should be Line.
11. Select the Secondary Axis check box for the Advertising and Promotions series, and click OK.
Notice that if you had left the new data row as another column bar, its significance would not have been
obvious. By changing the data series to a line, you can now see a very distinct pattern – the Advertising
and Promotions amount rises and falls in direct proportion to the sales of the various travel types.
Note: Basic chart types, including Column, Line, Pie, and Bar are discussed in the Excel Associate course.
You can easily change the type of chart you have selected if it does not display the worksheet information
appropriately.
Excel provides a variety of chart types and several subtypes within each major type. The following explains
the uses for some of the advanced chart types:
Area – Use to compare a continuous change in volume. Figure 5-3 shows a stacked area chart in which the
total height is the combined total. The relative size of each portion can be compared to each other as well
as for each point along the horizontal axis. The area chart is useful for displaying trends.
XY (Scatter) – Use to determine data patterns where points are clustered close together. In Figure 5-4, the
points are scattered with no apparent pattern.
Map – Use for showing the amount of data by region (state, country, province, and so on). Will show regions
as shaded with a gradient, based on the amount or density of data relative to other regions. Useful for
comparing a single statistic between regions.
Stock – Use to display high-low-close data (Figure 5-5). To use this display, you must have at least three sets
of data for each point on the horizontal axis.
Surface – Use to display trends in values with a 3-D presentation and a continuous surface (Figure 5-6).
Radar – Use to determine patterns or trends with points connected by lines. It is also called a spider or star
chart because of its appearance (Figure 5-7). This type of chart is most appropriate when the data series are
“spiked” with high values in only certain categories (such as months). Examples of spike data are seasonal
sales of flu medication, barbeque sauce, and tulip bulbs.
Treemap – Use to compare the relative size of each portion that together make up the combined total; each
portion shows as a rectangle. A treemap is a hierarchical chart in that it can group the data values as subtotals.
In Figure 5-8, you can not only compare the January values for each location, but also compare the (sub)total
of each location to each other.
Sunburst – Like a treemap chart, use to compare the relative size of each data value and their group subtotals
as portions of the combined total. The portions appear as slices of the total in the shape of a doughnut
(Figure 5-9).
Histogram – Use to display the frequency (number of times) that each value appears in the data; for example,
the number of men and women, or the number of people in different age groups. This type of chart is used
primarily for statistical analysis. Only one data series can be selected for this chart (Figure 5-10).
A Pareto chart is a second type of histogram in which the results are sorted in descending order and a line is
also drawn using the secondary Y-axis to show the cumulative total percentage. To create a Pareto chart
(Figure 5-11), you can select it directly from the Histogram category in the All Charts tab of the Insert Chart
dialog box.
Box & Whisker – Use to show more detailed statistical information about the spread of data values, including
the mean, range, quartiles, and outliers (Figure 5-12).
Waterfall – Use to graphically show an initial value and a final value, plus the increases and decreases
between the two (Figure 5-13). This is useful for specific uses such as showing financial data that identifies
where the major expenses are and how they affect a company’s profits.
Funnel – Use to track the same set of data that is shrinking or growing. A funnel chart is the same as a bar
chart; however, each bar is centered, causing it to look like a funnel (Figure 5-14). This is useful in cases where
data is either always increasing or always decreasing between stages/bars. An example of this would be a
graph of each stage of the sales process: from leads, to prospects, to opportunities, to closes. The graph
could show the number of transactions that made it to each stage, which is always going to decrease.
Combo – Use to combine two different chart types together for a set of data values, such as a clustered
column and a line chart.
Most of these chart types have both two-dimensional and three-dimensional choices. Three-dimensional
charts can be more interesting to look at, but may be more difficult to read because they tend to look
crowded.
To change the chart type, click the chart to access chart mode, and then use one of the following methods
to open the Change Chart Type dialog box (Figure 5-15):
• On the Chart Tools Design tab, in the Type group, click Change Chart Type, or
• right-click any blank area of the chart, and then click Change Chart Type.
1. Open Advertising and Promotions Expense.xlsx located in the StarterFiles folder, and save it as My
Advertising and Promotions Expense.xlsx in the MyProjects folder.
2. Click any cell in the range A5:J10, then on the Insert tab, in the Charts group, click the See All Charts
dialog box launcher.
3. In the Insert Chart dialog box, click the All Charts tab, click Area, click the Stacked Area icon, click the
second chart image (the one on the right), and then click OK.
4. Click and drag the chart to a new location on the worksheet with the upper left corner in cell A14.
5. Click and drag the bottom right corner handle down to cell J34.
Notice that the stacked area chart shows the relative sizes of the total expenses for each city, and that
the total height is the combined total.
7. Open the Insert Chart dialog box and display the All Charts tab.
9. Click and drag the chart to a new location on the worksheet with the upper left corner in cell K1.
10. Click and drag the bottom right corner handle up to cell Q13.
Notice that the histogram creates two columns that roughly divide the values in the Total row into halves.
Four of the total expense values fall in the lower half, and five of the total expense values fall in the upper
half.
11. With the histogram chart still selected, on the Chart Tools Design tab, in the Type group, click Change
Chart Type.
Notice that the funnel chart displays bars whose sizes reflect the total expense values for each year
relative to one another.
PMT Calculate the payment required for a given principal, interest rate, and number of time periods.
NPER Calculate the number of periods left on an investment; for example, the amount of time before
a set amount of money is made on an investment, or the number of payments remaining on a
loan.
IRR Calculate the Internal Rate of Return of a stream of cash flows.
=PMT(interest,term,principal,ending balance,type)
When you enter the values for interest and term, ensure that you express them in the same time units. For
example, if you want to find the monthly loan payment, you must ensure that both interest and term are
expressed in months. If you are given an annual interest rate, you must divide that value by 12 to calculate
the monthly interest rate. If the term is also expressed in years, then you must also multiply that value by 12
to calculate the total number of months (which is also the number of payments to be made).
For example, to calculate the monthly payment for a loan with an annual interest rate of 6% and a term life
of five years, the arguments used in the PMT function are:
Note: The PMT function cannot be used to correctly calculate mortgage payments in some countries, such
as Canada, where interest on residential mortgages is calculated semi-annually, not in advance. As a result,
the monthly payment amount is lower because the interest is not compounded monthly. The PMT function
does correctly calculate the mortgage payments in other countries where interest is compounded monthly,
such as the United States.
In general, Excel calculates the Total per Term by using the number of monthly payments multiplied by the
amount of the monthly payment. The Total Interest paid is based on the Total per Term minus the amount
of the Loan.
For example, suppose you have the following data and want to calculate the number of periods (months)
you will need to pay off a loan (Figure 5-16).
In this scenario, you make an initial payment of $1,500 and then make monthly payments of $375. The loan
amount is $5,000 with an annual interest rate of 5%. You want to forecast the number of pay periods (months)
it will take to pay off the loan. The formula to calculate this value is:
=NPER(B4/12,B5,B6,B7,0)
The result of the NPER function forecasts that it will take about 9 months to pay off the loan (Figure 5-17).
1. Open Monthly Payments.xlsx located in the StarterFiles folder, and save it as My Monthly
Payments.xlsx in the MyProjects folder.
A loan analysis table enables you to see the amount of principal and interest that is paid on a loan monthly
or yearly. Once completed, the spreadsheet can be used to quickly determine the payments required for any
loan amount, interest rate, and term.
2. Enter the following data in column B for the loan payment calculation:
Amount of Loan 5,000
Annual Interest Rate .06
Term (months) – NPER 12
Ending Balance 0
Payment Type 0
Payment/Month =PMT(B2/12,B3,-B1,B4,B5)
Total Payments =B7*B3
Total Interest =B8-B1
Notice that the interest rate used here is for a full year, but the term is in months. The interest rate must
be converted into a monthly rate. The loan will be fully paid off at the end of the term, so the ending
balance will be zero.
Note: Because the Ending Balance and Payment Type values are both zero, the last two arguments of
the function could be omitted in this case.
5. In cell D13, enter: =B13*$B$2/12 to calculate the amount of interest paid for the month.
This formula will show the amount of interest to be paid in the first month. You will be copying this
formula, which is why the annual interest rate cell (B2) is an absolute cell reference.
6. In cell E13, enter: =C13-D13 to calculate the amount of the loan paid for this month by subtracting the
interest paid from the monthly payment.
7. In cell F13, type: =B13-E13 to calculate the remaining balance left to be paid by subtracting the amount
paid towards the loan from the beginning balance of the loan for the current month.
8. In cell B14, type: =F13 to represent the Ending Balance of the first month.
The ending balance in cell F24 (after the last payment is made) is $0.00, showing that the loan has been
completely paid off.
Because the IRR function, which you will add in step 14, requires the initial principal to be included in the
range of cells as a negative number, the loan amount must be added at the top of the list of payments.
The NPER function forecasts that the amount of time it will take to pay off a $5,000 loan with a 6% annual
interest rate by making monthly payments of $325 is approximately 16 months.
Nesting Functions
Objective 3.1.1, 3.4.3
Excel functions are very flexible because they allow you to nest (or embed) one function inside another one.
This is a very useful feature because Excel functions are designed to perform only one calculation. For
example, the formula =MID(A1,6,10) will extract ten characters from the text string in cell A1, starting from
character #6. If cell A1 contained the text string “Adam Smith”, then this formula will return the second word
“Smith”. However, if the cell was changed to “Joe Zhukov”, the result will be “hukov”. The FIND function can
be used to automatically adjust to different text:
=MID(A1,FIND(" ",A1)+1,10)
This FIND function will search the text string for the location of the blank space and return it to the MID
function to indicate where to begin extracting characters. The “+1” is used to start at the next character to
the right of that blank space in the text string.
You are not limited to nesting or embedding only one function inside another. You can nest up to 64
functions.
When you need to nest logical functions together, be sure to build them slowly, one function at a time.
Nested functions are complex: the arguments, commas, and brackets must be in the right place to prevent
them from being rejected by Excel, or from returning incorrect results.
Another function commonly used for nesting is IF. For example, a simple IF function will evaluate one logical
test, and then return either one value or another value.
=IF(A1=10,"text A","text B")
This simple IF function will not permit you to choose from three different values. The logical test will return
one of only two possible results: TRUE or FALSE. To work around this limitation, you can nest functions. An
example of a nested IF function would look as follows:
In this example, the following values will be displayed when the conditions are met:
If A1 contains Then this will display
10 text A
20 text B
Any other value text C
1. Open Nesting Functions.xlsx located in the StarterFiles folder, and save it as My Nesting
Functions.xlsx in the MyProjects folder.
In this worksheet you will enter text formulas to extract the first names from column A and put them in
column B, then extract the family names from column A and put them in column C. Enter the first set of
formulas for row 4.
Cell Formulas
B4 =MID(A4,9,5)
C4 =LEFT(A4,6)
Using these formulas, the first person’s name is correctly separated into the first and last name
components. You will copy these same formulas into the remaining rows to extract the first and last
names for the remaining individuals.
3. Copy the formulas in cells B4:C4 down to the cell range B5:C12.
The results demonstrate that you will need to adjust the parameters of almost every formula to correctly
extract the names. The formulas will need to be changed again if any of the names in column A are
changed afterwards. However, there is a better way to perform this same task—by using nested
functions.
By looking at the names in column A, you will see that a comma always separates the first name from
the last name. You will change the formulas in cells B4 and C4 to calculate the position of the comma in
cell A4.
5. Enter the same formula into cell C4 (but do not copy it from cell B4): =FIND(",",A4)
When you look at the name in cell A4, you can see the last name is to the left of the comma. You can
then use the LEFT function to extract the last name from cell A4. The LEFT function requires two
parameters: the original text string, and the number of characters to extract. The second parameter will
be calculated for you by the FIND function, which you had just entered.
The results demonstrate that the FIND function returns the position of the comma, which follows
immediately after the last name. To extract the last name without the comma, simply subtract one from
the results of the FIND function.
Use the same technique to extract the first name, which is located to the right of the comma, using the MID
function. The MID function requires three parameters: the original text string, the starting position, and the
number of characters. The starting position can be calculated again using the FIND function.
Because the first name is to the right of the comma, then the number of characters to extract is simply the
number of characters to the right of the comma. This can be calculated by nesting yet another function to
calculate the total length of the text string and subtract the length of the last name. However, the MID
function is very forgiving; if you use a number that is greater than the number of characters available, it will
still only return what is there and will not add blank spaces at the end. You can therefore use any number of
your choice, but it must be big enough to extract enough characters. For this exercise, you will use a length
of 20 characters, which you can adjust if necessary.
Like the last name, the FIND function includes the comma in its calculation. Add 2 to the result to skip
over the comma and the blank space after it.
10. Copy the formulas in cells B4:C4 down to the cell range B5:C12.
The formula is designed to be flexible to handle any name changes, as long as the comma is in the
correct position.
This worksheet will be used to calculate the number of corporate rewards points to be given to frequent
travelers:
A good way of approaching this problem is to start with a very simple formula and then add to it in
pieces.
You can see that every customer has either 1 or 3 points assigned to them. The maximum that a customer
can get is 3 points, even though most of them should be getting more. Modify this formula so that a
second IF function is nested inside the first one. The full formula will be: =IF(D5<5,1,IF(D5<10,3,6))
15. Select cell F5 again, press F2, delete the 3 and replace it with: IF(D5<10,3,6)
Notice that the second IF function nested inside the other IF function uses the condition D5<10, even
though the 3 points applies only to customers with 5 to 9 bookings. The condition should therefore be
(D5>4) AND (D5<10). It turns out that the extra logic test (D5>4) is unnecessary because the nested
function is performed only if the first IF condition (D5<5) results in a FALSE value.
The points value are now getting closer to what they should be. The customers with less than 10 bookings
are correctly getting 1 or 3 points, but many of the remaining customers should be getting more than 6
points. The next version of the formula will be: =IF(D5<5,1,IF(D5<10,3,IF(D5<20,6,10)))
17. Select cell F5 again, press F2, delete the 6 and replace it with: IF(D5<20,6,10)
One more nested formula needs to be added to create the final formula:
=IF(D5<5,1,IF(D5<10,3,IF(D5<20,6,IF(D5<30,10,20)))). As you can see, this formula can appear
overwhelming when trying to enter it all at once.
19. Select cell F5 again, press F2, delete the final 10 and replace it with: IF(D5<30,10,20)
21. Look at each of the points values in column F to verify that they are correctly calculated.
Note: The VLOOKUP function will also produce the same results.
When you use the IF function, you are permitted to have only one logical test that results in a TRUE or FALSE
value. If you need to perform two or more different logic tests, then you must either nest the requisite number
of IF functions inside each other, or use an AND or OR function.
AND The AND function allows multiple logical tests to be performed, and all of them are combined
to return a single TRUE or FALSE value. The AND function returns a TRUE value only if all of
the logical tests are TRUE. It returns a FALSE value if any of the logical tests result in a FALSE
value.
AND(logical test 1, logical test 2, ...)
You can have up to 255 logical tests in an AND function.
NOT This function returns the logical opposite value of a logical result. That is, a TRUE value is
reversed to a FALSE, and a FALSE is reversed to a TRUE.
NOT(logical test)
You can enter only one logical value in this function.
OR Like the AND function, the OR function evaluates multiple logical tests to return a single TRUE
or FALSE value. Unlike the AND function, this function returns a TRUE value if any of the logical
tests are TRUE. It returns a FALSE value only if all of the logical tests result in a FALSE value.
OR(logical test 1, logical test 2, ...)
You can have up to 255 logical tests in an OR function.
1. Open AND OR Functions.xlsx located in the StarterFiles folder, and save it as My AND OR
Functions.xlsx in the MyProjects folder.
You will enter a formula to award the Gold designation if a customer had more than 25 bookings and spent
more than $75,000 in travel this year.
Using this formula, only two customers have qualified for the Gold membership. Try a different formula
to see how many customers would qualify for the Gold designation if a customer had more than 25
bookings or spent more than $75,000 in travel this year.
Try a third alternative formula to label any customer who has spent $75,000 or less in travel this year with a
Bronze designation. The formula can therefore be =IF(E5<=75000,"Bronze",""). However, you can also reverse
the logical test using the NOT function.
AVERAGEIF Calculate the average value of a range of cells in which the criterion value is met.
AVERAGEIF(criteria_range,criterion_value,average_range)
The average range is optional. If it is not specified, the criteria range is assumed to be the
average range.
COUNTIF Count the number of cells that contain a non-blank value in a range of cells where the
criterion value is met.
COUNTIF(criteria_range,criterion_value)
SUMIF Calculate the sum total of all cells containing a numeric value in a range of cells where the
criterion value is met.
SUMIF(criteria_range,criterion_value,sum_range)
The sum range is optional. If it is not specified, the criteria range is assumed to be the sum
range.
Note that the SUMIF is very different from the more common SUM function. With SUM, the numeric value in
all cells in the sum range are added to the sum total. With SUMIF, the cells are added only if the criterion
value is met.
These three conditional summary functions permit you to perform only one criteria test. If you need to
perform more than one criteria test at the same time, then a different version is needed.
AVERAGEIFS Calculate the average value of a range of cells in which the multiple criteria are met.
AVERAGEIFS(average_range,criteria_range 1,criteria 1,criteria_range 2,criteria 2…)
The average range is mandatory.
COUNTIFS Count the number of cells that contains a non-blank value in a range of cells where the
criteria are met.
COUNTIFS(range 1,criteria 1,range 2,criteria 2…)
SUMIFS Calculate the sum total of all cells containing a numeric value in a range of cells where the
criteria are met.
SUMIFS(sum_range,criteria_range 1, criteria 1,criteria_range 2,criteria 2…)
The sum range is mandatory.
In this function, the sum range is F4 to F207, the first criteria range is D4 to D207, and its corresponding
criterion value is “Visa”; the second criteria range is F4 to F207 and its corresponding criterion test is >100.
This means that a value in the cell range F4 to F207 is included in the sum total only if both criteria tests are
evaluated as true. For example, the value in cell F4 is included if D4 contains the word “Visa” and F4 contains
a value that is greater than 100. If D4 does not contain the word “Visa,” or if F4 is less than or equal to 100,
or both, then the value in F4 is not included.
Because these functions have multiple selection criteria, the sequence of the arguments is different from the
single criterion versions of these functions. The different sequence is necessary to allow multiple selection
criteria to be entered as arguments.
Newly available if you have Office 2019 or an Office 365 subscription, you can also use different versions of
the IF, MAX, and MIN functions if you need to perform more than one criteria test at the same time. The
SWITCH function is also new to these versions of Office.
IFS Returns a value that corresponds to the first TRUE condition when testing one or more
criteria.
IFS(test 1,value 1,test 2,value 2…)
You can use IFS in lieu of multiple nested IF statements.
MAXIFS Returns the largest numeric value when testing one or more criteria in a range of values.
MAXIFS(max_range,range 1,criteria 1,range 2,criteria 2…)
MINIFS Returns the smallest numeric value when testing one or more criteria in a range of values.
MINIFS(min_range,range 1,criteria 1,range 2,criteria 2…)
SWITCH Evaluates one value (the expression) against a list of values and returns the result that
corresponds to the first matching value.
SWITCH(expression,value 1,result 1,value 2,result 2…, “value if no match”)
If there is no match, an optional default value may be returned.
1. Open Summary Functions.xlsx located in the StarterFiles folder, and save it as My Summary
Functions.xlsx in the MyProjects folder.
You will enter the first set of conditional summary formulas that will calculate statistics for all customers who
spent over $50,000. These formulas are straightforward because they only have one criterion: sales in column
E is greater than $50,000.
Notice that the SUMIF and AVERAGEIF conditional formulas used here perform their calculations on the
same column in which the selection criteria are applied. In other words, these formulas select only those
cells that meet the stated criteria and then perform the COUNT, SUM, and AVERAGE calculations on only
those cells. The significance of this will become clearer as you examine the next sets of conditional
formulas.
Suppose these statistics are similar to the first set, but the criterion is that the customer is a Gold customer.
However, a Gold customer may have spent less than $50,000 this year, such as customers #7 and #11. Other
customers have spent more than $50,000, but are not Gold customers, such as customers #4 and #12.
These are the same conditional formulas as the first set, except that an additional argument has been
added to the SUMIF and AVERAGEIF. In this variation, the criteria are applied to the cells in column F (=
“Gold”), but the SUM and AVERAGE are applied to the corresponding cells in column E, which is where
the sales amounts are located. The average value can be verified by dividing the sum value into the count
value. In contrast, the first set of conditional summary formulas calculated the statistics on the same
column E on which you are applying the selection criteria.
These formulas are even more complex because they have two criteria: the sale must be with a Gold customer
and the sales amount must be greater than $50,000. These functions are different than the ones used in the
first and second set of formulas.
Notice that the sequence of the parameters for the sum and average formulas is different in the single-
criterion and multiple-criteria versions.
Also notice that only five customers met the selection criteria. This is because not all Gold customers
spent more than $50,000, and not all customers who spent more than $50,000 are Gold customers.
The IFS function allows you to run logical tests for multiple criteria without the need to nest multiple IF
functions. In this example, you are labeling cities with populations greater than or equal to 5 million as
“Megacity”; cities with populations greater than or equal to 2 million (but under 5 million) as “Large”,
and cities with populations greater than or equal to 1 million (but under 2 million) as “Medium”.
The MAXIFS function allows you to find the maximum value for multiple criteria at the same time. In this
example, you are finding the maximum number of tour packages for Group 1 in 2020. The cell range
D5:D18 contains the value you want to display. The cell range A5:A18 represents the first criteria, and
cell F5 specifies the first criteria’s value (2020). The cell range B5:B18 represents the second criteria, and
cell G5 specifies the second criteria’s value (Group 1).
The MINIFS function allows you to find the minimum value for multiple criteria at the same time. In this
example, you are finding the minimum number of tour packages for Group 2 in 2020.
The SWITCH function evaluates an expression against a list of values and returns the result that
corresponds to that value. In this example, cell A5 contains the expression (Australia). The first
value/result pair says that, if the value is Australia, the result is Sydney; the second value/result pair says
that, if the value is Asia, the result is Hong Kong; and so on. The last value “N/A” says that, if there is no
match, the result is N/A.
Spreadsheets become invaluable when you need to perform a what-if analysis, which involves repeating
the calculation of a set of formulas many times using different numbers. The trial-and-error method of doing
calculations is commonly used when there are multiple competing demands, and users try to find the best
compromise from among the many choices they can make. “What-if” describes the thinking process that
users face: “What if I change this number? Then what will the result look like?”
Because spreadsheets can recalculate a large number of formulas and display the results simultaneously,
their introduction rendered the traditional manual method of performing a what-if analysis obsolete. This
capability saved a tremendous amount of manual work and virtually eliminated calculation errors.
On the Data tab, in the Forecast group, click What-If Analysis, and then click Goal Seek to open the Goal Seek
tool (Figure 5-18). This tool is used to automate the entire process of changing one variable while calculating
a formula and trying to match the desired value. In a break-even situation, you can set the Goal Seek tool to
make all necessary changes to the number of units produced to attain a zero profit. Using this tool, you can
easily determine the impact of a 10% increase in labor cost on the number of units needed to break even.
By changing Select the cell in which you want Excel to display the variable result of your goal-seeking.
cell This cell must not contain a formula.
When using the Goal Seek tool, keep the following in mind:
• The Goal Seek feature is a tool; it is not a function. That is, it changes the value of the variable cell to
achieve the desired goal. If you change any of the values or formulas involved with the results, you must
run the Goal Seek tool again.
• The cell displaying the outcome must contain a formula that is dependent on the variable cell, either
directly or indirectly.
• You can reverse any changes you make with the Goal Seek tool by using the Undo feature.
1. Open Whale Watching Goal Seek.xlsx located in the StarterFiles folder, and save it as My Whale
Watching Goal Seek.xlsx in the MyProjects folder.
Tolano Adventures is investigating the possibility of launching a new company that will provide whale-
watching tours to its own customers as well as other travel agencies’ customers.
The cost of renting the boats is estimated to be about 25% of revenues, and fuel is another 35%. The
remaining costs are fixed monthly expenses for salaries, a small office near the pier, and various boat-related
expenses.
Use the Goal Seek tool to determine how much revenue is required to reach a break-even point (Net
Income=0.00).
3. On the Data tab, in the Forecast group, click What-If Analysis, and then click Goal Seek.
The Goal Seek dialog box appears with the Set cell field referring to the answer cell.
5. Select the By changing cell field and type: B3 or use the mouse to select cell B3.
The Goal Seek tool displays the result in the Goal Seek Status dialog box. If Excel is able to find a solution,
the Target value and Current value will be the same. The Goal Seek Status dialog box should appear as
follows:
7. Click OK in the Goal Seek Status dialog box to accept the results of your goal-seeking.
Use the Goal Seek tool to determine how much revenue would be required to generate a profit of $5000 if
rent and moorage fees increase.
9. Select cell B16, then on the Data tab, in the Forecast group, click What-If Analysis, and then click Goal
Seek.
10. Select the To value field and set the value to: 5000.
11. Select the By changing cell field and type: B3 or use the mouse to select cell B3.
13. Click OK in the Goal Seek Status dialog box to accept the results of your goal-seeking.
You would need to bring in $35,250 to generate $5000 in profit in the face of increasing expenses.
15. Select cell B4 and confirm the formula =PMT(B2/12,B3,-B1) has been entered.
Let’s assume that you have an opportunity to purchase a boat suitable for running your business. You do not
want to pay more than what you are currently spending on your boat rental, but you are willing to pay the
loan off over a reasonable period of time that does not exceed 30 months. As the worksheet currently shows,
you need to lower the monthly payment significantly, and increase the number of payments.
16. With cell B4 still selected, set the following Goal Seek values:
Field Value
Set cell B4
To value 8812.50
By changing cell B3
17. Click OK to initiate the Goal Seek analysis, and click OK again to close the Goal Seek Status dialog box.
When you create a scenario, you identify the cells to be changed. The Scenario Manager then lists the cells
and values. To make the Scenario Manager easier to use, you should create range names for all the cells you
expect to change. This allows Excel to display the cell names instead of cell addresses.
Once you have created your scenarios, use the Scenario Manager to display and switch from one scenario to
another or to add more scenarios as you continue your what-if analysis. You can also modify existing
scenarios or delete scenarios. To open the Scenario Manager dialog box (Figure 5-19), on the Data tab, in
the Forecast group, click the arrow for What-If Analysis, and then click Scenario Manager.
An important limitation of scenarios is that worksheet cells identified as Changing cells become fixed for all
scenarios. Once you have set up at least one scenario, you cannot add cells or remove them from this list.
You can compare the results of all scenarios at the same time by clicking the Summary button in the Scenario
Manager dialog box to create a Scenario Summary. The summary displays the input values and the result
cells that you select from your worksheet, as shown in Figure 5-20.
1. Open Charter Flight Scenarios.xlsx located in the StarterFiles folder, and save it as My Charter Flight
Scenarios.xlsx in the MyProjects folder.
Tolano Adventures uses this worksheet to decide the price of a charter flight package offering. The travel
company purchases all of the seats on a charter airline and sells the seats to its customers. The costs are set
by the charter airline, airports, catering company, and so on. However, Tolano has to use their best guess on
what price to charge and how many seats will be sold at that price.
You will use the Scenario Manager to help decide which price will result in the highest profit for the company.
2. On the Data tab, in the Forecast group, click the arrow for What-If Analysis, and then click Scenario
Manager.
5. Click in the Changing cells field and delete the cell reference that is currently there.
6. Select cell A2 on the worksheet, and then press and hold the CTRL key while selecting the cell range
B4:B5.
Cell A2 is not essential for scenarios; it is simply a cell that displays a descriptive comment whenever a
scenario is activated for a worksheet.
You may also want to enter your own information in the comment field. By putting in some details (such
as assumptions and explanations), you could potentially save many hours when you are using and
changing the scenarios at a later date.
8. Click Add to save this scenario. The Add Scenario dialog box displays again.
9. In the Scenario name field, type: Discount pricing and click OK.
10. Change the values in the Scenario Values dialog box as follows:
$A$2 Discount Pricing
$B$4 140
$B$5 599
12. In the Scenario name field, type: Premium pricing and click OK.
13. Change the values in the Scenario Values dialog box as follows:
$A$2 Premium Pricing
$B$4 75
$B$5 799
15. Select the Premium pricing scenario, and then click Show.
16. Click Show for each of three scenarios on the worksheet and observe the changes to the worksheet.
18. Select cell B6 and, on the Formulas tab, in the Defined Names group, click Define Name.
Note: If you create names for these cells, the Scenario Values dialog box displays these names instead
of the cell reference. You may find these range names more meaningful than cell references.
20. Repeat steps 18-19 for cells B13 (Total_Costs) and B15 (Net_Profit).
21. On the Data tab, in the Forecast group, click the arrow for What-If Analysis, and then click Scenario
Manager.
24. Select cell B6 on the worksheet, and then press and hold the CTRL key while selecting cells B13 and B15.
The Result cells field is used to select the cell(s) in the worksheet that display the results of the scenario.
These cells are important because they contain formulas that show the results of each scenario. In this
exercise, the important result cells are the Total Revenue, Total Costs, and Net Profit cells. You can include
as many or as few result cells as you wish.
Notice that the cells that you had named earlier appear on this summary with those names, making the
table more meaningful to you.
A better solution is to set up a Watch Window to display the current value of these cells. To open the Watch
Window (Figure 5-21), on the Formulas tab, in the Formula Auditing group, click Watch Window. Even if you
move around the worksheet and workbook, the Watch Window conveniently displays the cells that you want
to watch.
The Watch Window is especially useful in a what-if analysis involving large spreadsheets.
1. Open Personnel Bonus.xlsx located in the StarterFiles folder, and save it as My Personnel Bonus.xlsx
in the MyProjects folder.
In this worksheet, each employee’s annual bonus is calculated using the bonus rate at the top of the
worksheet. The bonus rate is limited to the amount of money available to pay—$200,000 for the purpose of
this exercise. Column D calculates each employee’s bonus. The total bonus amount is at the bottom of the
list, but you will need to adjust the bonus rate while watching the total bonus amount. You can accomplish
this by setting up a cell Watch Window.
2. On the Formulas tab, in the Formula Auditing group, click Watch Window.
3. Make the Watch Window bigger by clicking and dragging the bottom right corner of the Watch Window.
5. With the contents selected in the selection box, scroll down in the worksheet and select cell D36.
The Add Watch dialog box now shows this cell reference:
8. Move the Watch Window to an area of the worksheet where you can see it, but you can update cell B1
easily.
9. Change the bonus rate value in cell B1 until cell D36 is as close to $200,000 as possible (you can exceed
that amount by no more than $499).
12. Close the Watch Window, and save and close the workbook.
Lesson Summary
Now that you have completed this lesson, you should be able to:
Add a secondary vertical axis. Use conditional summary functions.
Use advanced chart types. Use the Goal Seek tool to perform what-if
Use financial functions. analysis.
Nest functions inside other functions. Use the Scenario Manager to perform what-if
analysis.
Use conditional logic functions.
Use the cell Watch Window.
Key Terms
Term Definition
Conditional Logic A type of function used in situations in which you want to perform one of two different
calculations, depending on which value is in one or more cells other than the ones in
which the logical functions are located.
Conditional Summary A type of summary function that is applied only to a given range of cells that meet a
specific criteria.
Term Definition
Goal Seek A tool you can use to automate the entire process of changing one variable while
calculating a formula and trying to match the desired value.
Nesting Embedding one function inside of another one to yield a value that is the result of
multiple calculations.
Scenario Manager A tool that enables you to determine the impact on calculations of changing values
without changing the actual data. You can store a set of values as a result of multiple
scenarios and compare them.
Secondary Y-Axis The secondary Y-axis appears on the far right of a chart. In a chart with dual axes, you
can tie some of the data series to the primary axis on the left, and the remaining series to
the secondary axis on the right.
Watch Window A small pop-up window that displays the current value of selected worksheet cells. It is
useful when working with large worksheets; the watch window displays these cell values
regardless of what part of the worksheet you have currently displayed on the screen.
What-if Analysis A process that involves repeating the calculation of a set of formulas many times using
different numbers. It is a trial-and-error method that asks: “If I change this number, how
does that affect the result?”
Quiz Questions
For each question, select the best answer.
1. What type of element can you add to a chart that will allow you to display two types of data, each requiring
its own scale?
a. Data labels
b. A legend
c. A trendline
d. Dual axes
2. Which chart type can you use to show how often each different value in a set of data occurs?
a. Waterfall
b. Histogram
c. Funnel
d. Sunburst
3. Which chart type can you use to track a set of data that is shrinking or growing?
a. Radar
b. Funnel
c. Treemap
d. Sunburst
a. 16
b. 32
c. 64
d. 128
a. The AND function returns a TRUE value only if all of the logical tests are TRUE.
b. The AND function returns the logical opposite value of a logical result.
c. The AND function returns a TRUE value if any of the logical tests are TRUE.
d. You can have up to 5 logical tests in an AND function.
9. Which of the following conditional summary functions will perform more than one criteria test at the same
time?
a. SUMIF
b. AVERAGEIFS
c. COUNTIF
d. All of the formulas listed will perform more than one criteria test at the same time.
10. Which of the following statements about the Goal Seek tool is TRUE?
11. Which of the following tasks can make the Scenario Manager easier to use?
a. The ability of one worksheet cell to monitor the value of another cell, and perform an action if it
changes.
b. A special type of worksheet cell that displays each step of a macro as it is executed.
c. A special type of worksheet cell that displays the current time of day.
d. An Excel feature that allows you to always see the current value of one or more worksheet cells in a
small pop-up window no matter where you are in the workbook.
Microsoft ®
Excel
Expert Certification Guide
The AutoFill feature performs the same function, except that it takes a guess on what the incremental value
is. For example, if you select two cells containing the values 1 and 3, the autofilled cells will have the values
5, 7, 9, and so on because Excel has determined the increment is 2. If you select only one cell containing the
value 1, the autofilled cells will all contain the value 1. If you select a cell containing the value Monday, the
autofilled cells will be filled with Tuesday, Wednesday, and so on.
The Fill Series feature allows you to have more direct control over how much to increment each subsequent
cell using only one starting cell. On the Home tab, in the Editing group, click Fill, and then click Series to open
the Series dialog box (Figure 6-1).
You must pay careful attention to selecting the combination of Type, Date unit, and Trend option buttons to
obtain the desired results. The following table explains the series types you can specify.
Linear Excel will add a cell value and the Step value together, and place the sum in the next blank cell
in the selected range.
Growth Excel will multiply a cell value by the Step value, and place the product in the next blank cell in
the selected range.
Date Excel will open the Date unit section in the dialog box for you to select an option. By default,
the Day option is selected. Excel will then add a cell value with the Step value together and
place the sum in the next blank cell in the selected range.
AutoFill This option is the same as the Linear type, but Excel will automatically determine the correct
Step value to calculate each value to be placed in the blank cells of the range. This option works
best with at least two starting values.
Excel will continue calculating values in blank cells until there are no more cells remaining in the selected
range, or the Stop value is reached.
The Trend check box can be used as an alternative to entering a Step value of your own for the Linear and
Growth types. It will perform a regression analysis for a linear or exponential best-fit – for Linear or Growth,
respectively – using the starting values that are in the selected range. The blank cells are then filled with the
calculated step value. This option requires at least two cells in the selected range with starting values.
The Date option button will allow you to add the Step value to the day, weekday, month, or year component
of the date value in the starting value. In Figure 6-2, the start value of 20-Jan-20 is copied into the cell range
B2:E2. The Fill Series tool is then used with a step value of 2 to fill downwards to row 7 in each respective
column using the Day, Month, Year, and Weekday options.
In this example, the Fill Series was applied in columns. Excel will automatically select the correct Series option
for you based on the cell range you selected. You can override this selection by selecting the Rows or
Columns option.
1. Open Fill Series.xlsx located in the StarterFiles folder, and save it as My Fill Series.xlsx in the MyProjects
folder.
3. On the Home tab, in the Editing group, click Fill, then click Series.
5. Select cells C4:C18, then on the Home tab, in the Editing group, click Fill, then click Series.
6. In the Step value field, replace the 1 with the value of 4, then click OK.
7. Select cells D4:D18, then on the Home tab, in the Editing group, click Fill, then click Series.
8. In the Step value field, replace the 1 with the value of -4, then click OK.
9. Select cells E4:E18, then on the Home tab, in the Editing group, click Fill, then click Series.
11. Select cells F4:F18, then on the Home tab, in the Editing group, click Fill, then click Series.
13. In the Step value field, replace the 1 with the value of 4, and click OK.
15. Select cells G4:G18, then on the Home tab, in the Editing group, click Fill, then click Series.
17. In the Step value field, replace the 1 with the value of 4.
18. In the Stop value field, enter: 100000, and click OK.
19. Select cells H4:H18, then on the Home tab, in the Editing group, click Fill, then click Series.
21. In the Step value field, replace the 1 with the value of -4, and click OK.
In order to use this feature, you must use the column to the immediate right of the column(s) from which
you want Flash Fill to obtain its data. The target cells must also be empty.
After filling out the information, use the column immediately to the right to type how you want the
information extracted, combined, or re-sequenced. Make sure the cell in which you typed is the active cell
and then, on the Home tab, in the Editing group, click the Fill arrow, then click Flash Fill. The cells below the
active cell will follow the same pattern using the data in the cells on the left, as shown in Figure 6-3.
n
n
n
n
n
n
n
1. Open Customer List Flash Fill.xlsx located in the StarterFiles folder, and save it as My Customer List
Flash Fill.xlsx in the MyProjects folder.
Your first task is to combine all of the first, middle, and last names in columns A to C together as one name
in column D. Start by entering the first name.
When you start entering the second name, Excel will recognize the pattern from the first row and apply it to
the remaining rows.
3. Select cell D3, type: B but do not press any more keys.
The Flash Fill feature then completes the rest of the customer’s name in not only this cell, but also every
cell below, saving you a lot of work. At this point, the flash fill data is only tentative—it is displayed in a
light gray color to show what they will look like—and you need to confirm your acceptance.
4. Press ENTER to let the Flash Fill feature complete the data entry for you.
5. Select cells D3:D15, and press the DELETE key to delete all of these entries.
6. Select cells D2:D15, then on the Data tab, in the Data Tools group, click Flash Fill.
You can also use the Flash Fill feature to pick out a specific word from a text string such as a name. For
example, extract just the first name from column D.
8. Select cell E3, type: B and press ENTER to accept the Flash Fill data.
Now pick out the middle name from column D, if there is any.
10. Select cell F3, type: C and press ENTER to accept the Flash Fill data.
Notice that the names that did not have a middle name did not appear in the flash fill list of names.
12. Select cell G3, type: H and press ENTER to accept the Flash Fill data.
You can also change the pattern of the middle name to just the first letter.
14. Select cell F2, and enter: S. (uppercase letter “S” followed by the period at the end)
15. Select cell F3, type: C and press ENTER to accept the Flash Fill data.
This same technique can be applied in reverse to combine the contents of multiple cells together.
18. Select cell D3, and type: B so the worksheet appears similar to the following.
Numeric values can also be re-patterned as text strings, such as phone numbers.
21. Select cell J3, and type: ( so the worksheet appears similar to the following:
• On the Data tab, in the Data Tools group, click Remove Duplicates.
• On the Table Tools Design tab, in the Tools group, click Remove Duplicates.
Use the Remove Duplicates dialog box (Figure 6-4) to specify the criteria to remove duplicate rows.
You can select all columns or only selected columns to be used for comparing the data. For example, you
can scan a data table containing customer numbers, names, and addresses to find any rows where the same
customer is listed two or more times. Alternatively, you can select just the last name and first name columns
to find and remove duplicate rows.
On the other hand, Excel will look only for identical data when comparing rows. For example, Excel will
consider two rows as different if the address in one row contains “1234 Miller Road” and the other row
contains “1234 Miller Rd.”. Every blank space, comma, number, and other character in each cell is used to
find exact matches.
1. Open Customer List Duplicates.xlsx located in the StarterFiles folder, and save it as My Customer List
Duplicates.xlsx in the MyProjects folder.
2. Scan through the data to see if you can spot any duplicates.
4. Click the Data tab and, in the Data Tools group, click Remove Duplicates.
A message box appears with the message: “No duplicate values found.”
That should be enough to confirm that there are no duplicate rows in the data. Or maybe we did not use
the command correctly.
7. On the Data tab, in the Data Tools group, click Remove Duplicates.
8. Deselect the Customer # check box to turn it off and click OK.
A message box appears with the message: “3 duplicate values found and removed; 25 unique values
remain.”
By comparing the results from the original table, customers 16, 26, and 27 were found to be duplicates.
Outlining Data
Outlining Data Using Automatic Subtotals
Objective 2.2.4
Many worksheets become very large due to the sheer amount of information needed for analysis. Often,
summary totals are added for each major group of data as well as grand totals. The end result can be a
worksheet that is difficult to see from one end to another.
To help organize the data, Excel provides an automatic outlining tool that enables you to insert subtotals
whenever the selected field changes in value. You can make a very big worksheet easier to understand by
setting it up so that you see only the subtotals for each group of data.
With the Outline feature turned on, you can quickly expand all or selected groups of data and collapse them
again. Before creating the subtotals, an important step is organizing the data by column or row to group
these related rows together. Otherwise, the results will not make much sense.
The first step is to sort the data so that the subtotals are displayed for the data groups you want. Sorting
information is quick and easy when using the sort feature. Select a cell anywhere in the column or row by
which you want the information sorted, and on the Data tab, in the Sort & Filter group, click the Sort A to Z
button to automatically sort the data.
Now that the data is sorted by the desired category, the worksheet
is ready to add subtotals. On the Data tab, in the Outline group,
click Subtotal. When the Subtotal dialog box appears (Figure 6-5),
you can choose the criteria for which to create subtotals. For
example, if you have a large worksheet listing every sales
transaction for 12 months, and you need to know how many sales
were made with each type of credit card, you would first sort the
information by credit card, and create subtotals using the options
in the Subtotal dialog box.
In this example, after clicking OK, outlining features would appear to the left of the cells. The data is
categorized by three different levels. Clicking the 3 over the outlining bars shows all the data with the
subtotals in bold at the end of each category (Figure 6-6).
At each subtotal, a mark appears under the 2 in the outline. When you click the 2, only the subtotals and
grand total appear (Figure 6-7). The row numbers show the cells in which the subtotals are located and the
outlining markers (+ under the 2) show how many subtotals there are on the sheet. This can be a great time
saver for finding pertinent information without the need to scroll through hundreds or thousands of rows.
Finally, by clicking the 1 at the top of the outlining section, only the grand total appears, because that is the
last level of the outline.
You can also create multiple subtotals for a single column or several layers of columns. For example, you can
calculate the sum, average, and variance subtotals for as many numeric columns as you require. You must
add each different type of subtotal as a separate row to identify the type of subtotal.
You can create a more complex type of multiple subtotals by nesting them. For example, suppose you have
a sales report listing every sales transaction for a year. As long as you have a separate column for the month
value, you can create subtotals based on the month. You can then create another layer of subtotals based
on the date of each sale, which is in a different column. Assuming that you will have multiple sales each day,
you can nest your subtotals by the day of each month and by the month of the year. The outline feature then
allows you to quickly open or collapse your worksheet at the year, month, or day level.
The key difference in creating multiple subtotals is how you use the Replace current subtotals option in the
Subtotal dialog box. When creating the first (or only) subtotal for a worksheet, ensure that this check box is
selected. When creating subsequent subtotals, ensure that this check box is deselected.
1. Open Sales Subtotals.xlsx located in the StarterFiles folder, and save it as My Sales Subtotals.xlsx in
the MyProjects folder.
2. Scroll down the worksheet to see how many rows of data are present.
4. Click the Data tab and, in the Sort & Filter group, click Sort A to Z.
6. In the Subtotal dialog box, click the drop-down arrow for At each change in and select Payment Type.
7. In the Use function list box, click the drop-down arrow and select Sum.
8. In the Add subtotal to list, select the Amount Paid check box to turn it on, and deselect all other check
boxes in this list.
9. If necessary, select Replace current subtotals and Summary below data to turn them on, and deselect
Page break between groups.
10. Click OK. Then scroll down the worksheet to see how the data appears.
Notice that the worksheet now has three outline levels at the left side. Each of these numbers
corresponds to a different level of detail: clicking 1 compresses the data rows so that only the grand
total is displayed. Clicking 2 also compresses the data rows but displays the subtotal rows and grand
total. Clicking 3 shows all data rows for that level as well as the subtotals and the grand total.
11. Click 1 at the top of the outline section, and then scroll up to the top of the worksheet.
The + and - buttons work the same way as in File Explorer—clicking the + opens the level and shows
the data in the next level; clicking the - collapses the details.
13. Scroll down (or up) and click the - to the left of the Mastercard Total and then scroll up the worksheet
for a few more rows.
14. Click 2 at the top of the outline section, and then scroll up to the top of the worksheet.
The worksheet displays only the subtotal rows and the grand total row.
Note: When you remove some subtotals, you remove all subtotal functions. You cannot remove some
subtotals and keep the rest.
16. Click any cell in the data area to ensure that it is selected, then on the Data tab, in the Outline group,
click Subtotal.
17. In the Subtotal dialog box, click the Remove All button to clear the subtotals.
You can also calculate two different types of subtotals for the same (or different) column(s) in the
worksheet at the same time.
19. Verify that the Subtotal dialog box has the following settings and click OK:
At each change in Payment Type
Use function Sum
Add subtotal to Amount Paid
Replace current subtotals On
Summary below data On
20. On the Data tab, in the Outline group, click Subtotal again.
21. In the Subtotal dialog box, configure the following settings and click OK:
At each change in Payment Type
Use function Count
Add subtotal to Amount Paid
Replace current subtotals Off
Summary below data On
Notice that when you are adding another subtotal to an existing one, you need to deselect the Replace
current subtotals check box.
22. Scroll down the data and see how the subtotal values appear. Each payment type should have a count
subtotal and a sum subtotal.
To create an outline of a worksheet using this manual grouping method, you must adhere to the following
guidelines:
• The worksheet must already contain summation formulas including SUM, SUBTOTAL, or simple addition
(+) operators in the rows and/or columns where they need to be.
• Although Excel assumes the summary formulas will refer to the data above or to the left of the cell in
which you place the formula, you can override these assumptions by changing the settings. On the Data
tab, in the Outline group, click the Outline dialog box launcher to display the Settings dialog box (Figure
6-9).
By default, Excel assumes that the subtotals will appear to the right of and/or below the grouped data.
Deselect the check boxes if the summary formulas are in the opposite direction.
• You can have only one outline for each worksheet.
1. Open Sales Group Ungroup.xlsx located in the StarterFiles folder, and save it as My Sales Group
Ungroup.xlsx in the MyProjects folder.
2. Scroll down and select row 180. On the Home tab, in the Cells group, click Insert.
5. Select rows 2 to 179. You can select this group of rows by starting at the bottom with row 179 and select
the rest of the rows in an upward direction, or scroll to the top of the worksheet, start with row 2, and
select downwards.
6. Click the Data tab and, in the Outline group, click Group.
The group outline bar is now displayed for the January rows.
7. Scroll down and select row 339. Then, on the Home tab, in the Cells group, click Insert.
How did you know the range for this SUBTOTAL would start at row 181? Because you made note of that
in step 4.
9. Select rows 181 to 338 and then, on the Data tab, in the Outline group, click Group.
10. Click - at the left of the headers for rows 339 and 180 to collapse both groups created so far.
You still have another 10 months’ worth of data to group, and the process is beginning to appear tedious
and error prone because the SUBTOTAL function must reference the correct cell range. For the remaining 10
months, you can use the same steps but in a different sequence to help streamline the process.
11. Scroll down and insert a new blank row at row 500.
12. Select rows 340 to 499 and then, on the Data tab, in the Outline group, click Group.
When selecting the rows to be grouped together, be sure to not include the blank row in the group.
Note: If you have accidentally left out one or more rows of data, select these missing rows, then, on the
Data tab, in the Outline group, click Group. Excel automatically adds these cells to the group.
14. Click - at the left of the row header to collapse this group. Alternatively, click 1 (to the left of the column
label row).
The Ribbon contains the commands and tools that most users will need. By default, all tabs are displayed
except one—the Developer tab. You can display hidden tabs by customizing the Ribbon.
You can use one of the following methods to customize the Ribbon:
• Click File, click Options, and then click Customize Ribbon; or
• right-click anywhere on the Ribbon, then click Customize the Ribbon.
Both methods will open the Customize Ribbon page of the Excel Options dialog box (Figure 6-10).
If you want to display the Developer tab, in the Customize the Ribbon list on the right side of the dialog box,
select the Developer check box, and then click OK. To hide a Ribbon tab, deselect the appropriate check box
and click OK.
3. In the Customize the Ribbon list on the right side of the screen, select the Developer check box (if
necessary) to turn it on.
4. Deselect the Power Pivot check box (if necessary) to turn it off, then click OK.
7. Move the Excel Options dialog box down so that you can view all the buttons on the Developer tab in
the Ribbon.
8. In the Excel Options dialog box, click the Open Tree (+) button for Developer, and then click the Open
Tree button for Controls.
Notice that the various levels and commands shown in the dialog box match the commands and groups
in the Developer tab in the Ribbon.
9. Click the Choose commands from drop-down arrow and click Commands Not in the Ribbon.
10. Scroll down this list of commands to view the many commands that are available.
Notice the Add button is no longer grayed out, indicating that you can add this command to the Ribbon.
12. In the Customize the Ribbon list on the right side of the screen, select the Power Pivot check box to add
it back to the Ribbon, then click OK.
Creating Macros
The term macro typically refers to a set of actions that can be recorded and then executed with a single
command. This capability is very useful when you are performing tasks that must be repeated on different
cells in a workbook. You can create macros to perform almost any command that you can access from the
Ribbon. Typically, you use macros to format cells, copy data from one cell range to another, or update charts
and pivot tables.
The building blocks that perform the work inside a macro are components of a programming language called
Visual Basic for Applications, or VBA.
To make it simple to create macros, Excel provides a tool to record your actions and keystrokes, storing the
information in a macro for later execution. This is extremely useful if you do not have time to learn the VBA
language.
You can execute a macro in many ways. You can run the macro by name, create a shortcut key combination
to run the macro, assign the macro to the Quick Access Toolbar or to a command button, or set it up as an
auto-execute macro (that is, a macro that runs automatically whenever the workbook is opened).
You can access basic macro features by clicking the Macros arrow on the View tab in the Macros group. You
can access more advanced macro features in the Code group on the Developer tab.
When you open a macro-enabled workbook (and the default security settings are in effect), the macros are
automatically disabled and you must enable the content (assuming you have sufficient rights on the system)
before you can run the macros (Figure 6-11).
When macros are disabled, you can click the Enable Content button to enable them. You can also click the
Macros have been disabled link in the security bar to go to the Info page of the Backstage (Figure 6-12).
From here, you can click the Enable Content button and specify to enable all content or specify which active
content to enable for the current session only.
If you are unsure of the content, always scan the file with the antivirus program installed on your system
before opening the workbook and enabling the content.
To examine or change the macro security level, click the Developer tab and, in the Code group, click Macro
Security to open the Macro Settings page of the Trust Center dialog box (Figure 6-13).
Disable all macros without notification – All macros are disabled and you are not notified via a security
alert.
Disable all macros with notification – All macros are disabled, but security alerts appear if there are macros
present in the workbook, allowing you to enable macros on an individual workbook basis. (This is the default
setting.)
Disable all macros except digitally signed macros – Allows only macros that include a digital signature to
run, and then, only if the publisher is listed in your list of Trusted Publishers. If the publisher of a signed
macro is not in your list of Trusted Publishers, you are prompted to enable the signed macro and to trust the
publisher.
Enable all macros (not recommended; potentially dangerous code can run) – All macros can run. This
setting is not recommended because it makes your computer vulnerable to any malicious code hidden inside
a macro.
Trust access to the VBA project object model – Choose whether to allow programmatic access to the
Visual Basic for Applications (VBA) object model. That is, if you enable this option, you are allowing code to
read and possibly insert new code into an existing VBA module. By default, access is denied preventing
unauthorized programs from building harmful self-replicating code.
You should always maintain a sufficient level of security for macro-enabled workbooks and exercise caution
when enabling content. Be certain that the workbooks come from a trusted source.
Running Macros
If a macro has been assigned to a toolbar button or to a keyboard shortcut, you can run the macro using
these options.
Remember that you must enable macros in a workbook (click Enable Content in the notification bar) before
you run them. If you attempt to run a macro that is currently disabled, an error message appears (Figure
6-14).
Figure 6-14: Microsoft Excel macros have been disabled error message
Any macro that is available in a workbook can also be accessed via the Macros dialog box. From this dialog
box, you can run, step through, edit, create, or delete macros.
Macro name – Displays the name of the currently selected macro. If no macros have been defined, this
field is blank. The list box shows all the macros available for the current workbook. The contents of the
list box are affected by the value in the Macros in field.
Macros in – Lists the open workbooks and the Personal Macro Workbook (PERSONAL.xlsb). When you
create a new macro, you must specify where you want to store it. When you want to run a macro, specify
where you want to find the macros.
Description – Displays the description for the currently selected macro.
Run – Runs the selected macro.
Step Into – Opens the Visual Basic Editor and steps through each line of code. This allows you to view
the effect of each step in the macro.
Edit – Opens the selected macro in the Code window of the Visual Basic Editor, so you can modify your
macro.
Create – Opens a new module in the Code window so you can create a new macro by typing visual basic
code.
Delete – Removes the selected macro. To keep macros easy to manage, consider deleting macros you
no longer need.
Options – Opens the Macro Options dialog box where you assign or re-assign a shortcut key and/or
edit the macro description.
The Macro Settings page of the Trust Center dialog box opens.
3. In the Macro Settings section, ensure that Disable all macros with notification is selected.
4. In the Developer Macro Settings section, select the Trust access to the VBA project object model check
box, if necessary.
5. Click OK.
6. Open the Sparkline Macro.xlsm macro-enabled workbook from the ResourceFiles folder.
A notification that macros have been disabled appears below the Ribbon.
7. Click the Developer tab, then in the Code group, click Macros.
8. In the Macro dialog box, ensure that the macro is selected, then click Run.
You are not able to run the macro because it has been disabled.
10. Close and then re-open the Sparkline Macro macro-enabled workbook in the ResourceFiles folder.
13. In the Macro dialog box, ensure that the Sparks macro is selected, then click Run.
The macro code is executed and Excel inserts sparkline charts into column J.
14. Save the workbook as My Sparkline Macro.xlsm in the MyProjects folder, and then close it.
Recording Macros
Objectives 3.6.1, 3.6.2
The quickest way to create a macro in Excel is to use the Macro Recorder. Once turned on, the Macro
Recorder will track your Ribbon selections and activities on the worksheets. It will continue recording until
you turn it off. After the recording is stopped, Excel converts the macro into a VBA program.
• On the View tab, in the Macros group, click Macros, and then click Record Macro; or
• on the Developer tab, in the Code group, click Record Macro; or
• click the macro recording button ( ) at the left end of the status bar.
All of these methods will open the Record Macro dialog box (Figure 6-16).
Macro name Identifies the macro. The first character of the name must be an alphabetic character.
The rest of the name can be any combination of letters, numbers, and the underscore
character. You are not permitted to use any other character or blanks.
Shortcut key Activates the macro in the worksheet by assigning a letter key as a shortcut. You can
use only one uppercase or lowercase alphabetic character. It cannot be a number or a
special character such as # or @. If you use one of Excel’s default shortcut keys (such as
CTRL+P to print), the macro will override the default command while the worksheet
containing your macro is open.
Store macro in Selects where to store the macro. If the macro is stored in This Workbook, it will be
available only within the current workbook. Storing the macro in the Personal Macro
Workbook makes it available in any workbook that is opened on your computer.
Description Allows you to enter additional information about the macro.
Once the record mode is active, every keystroke you type, every keyboard key you press, and every option
you click will now be recorded in the macro. This is similar to turning on the Record button on a video camera,
which records every movement you make until you turn off the record mode.
When you have finished recording the steps for the macro, stop the record mode by using one of the
following methods:
To avoid this problem, you should generally choose the CTRL+SHIFT combination (upper case alphabetic
characters) instead. If you do select a shortcut key with only the CTRL key, avoid the following letters:
You must choose to continue saving the workbook as a standard workbook without the macros, or click No
and change the workbook type to a macro-enabled workbook.
Note: The macro protection feature in Excel detects only the presence of macros in a workbook. It cannot
determine if a macro contains a virus. You must use antivirus software to detect and remove macro viruses.
1. Open Balance Sheet Macro.xlsx located in the StarterFiles folder, and save it as My Balance Sheet
Macro.xlsx in the MyProjects folder.
2. Select cell B5 and then, on the View tab, in the Macros group, click the Macros arrow, and click Record
Macro.
3. In the Macro name field, type: Title and press TAB to move to the Shortcut key field.
4. Press and hold the SHIFT key, type: A, and then release the SHIFT key. Notice that the shortcut key
changes from Ctrl+ to Ctrl+Shift+.
6. Click OK.
Note: If you enter a lower-case alphabetic character (that is, a to z), you only need to use the CTRL key
to activate the macro. If you enter an upper-case letter (A to Z), you must use both the CTRL and SHIFT
keys to activate the macro. The Shortcut key indicator will change if you enter an upper-case letter.
At the left end of the Excel Status Bar, the macro indicator is displayed. By pointing at it, you will see the
current macro state.
Starting from this point, any actions that you perform on the workbook will be recorded in the macro.
7. On the Home tab, in the Font group, click Bold. Then in the Alignment group, click Center.
8. On the View tab, in the Macros group, click the Macros arrow, and then click Stop Recording.
11. Click on the Excel Status Bar to open the Record Macro dialog box again.
12. In the Macro name field, type: Numbers, press TAB to access the Shortcut key field, press and hold the
SHIFT key, type: N, and then click OK.
13. Select cells B7:B11 and then, on the Home tab, in the Number group, click the Number Format dialog
box launcher.
14. In the Format Cells dialog box, select the Number category and reduce the Decimal places to 0. Select
the Use 1000 Separator (,) check box to turn it on, and then click OK.
15. Click on the Excel Status Bar to stop the macro recording.
Notice that the formatting was performed again for the cell range B7:B11. This macro will work only on
those cells because they were selected while the macro was being recorded. As a result, the macro will
not apply formatting to other cells in the workbook.
You can fix this problem easily using one of two methods. Select all cells before recording a macro (this
is usually the easier method); or use the Relative Reference option button while recording the macro.
18. Select cells B7:B11 if necessary. Then on the Home tab, in the Editing group, click Clear, and click Clear
Formats.
19. On the View tab, in the Macros group, click the Macros arrow, and then click View Macros.
Excel displays a message box with the warning “Do you want to delete macro Numbers?”
22. With cells B7:B11 still selected, click on the Excel Status Bar to open the Record Macro dialog box.
23. In the Macro name field, type: Numbers, and then click OK.
24. On the Home tab, in the Number group, click the Number Format dialog box launcher.
25. In the Format Cells dialog box, select the Number category, and reduce the Decimal places to 0. Select
the Use 1000 Separator (,) check box to turn it on, and then click OK.
26. Click on the Excel Status Bar to stop the macro recording.
27. On the View tab, in the Macros group, click the Macros arrow, and then click View Macros.
29. In the Macro Options dialog box, type: n in the Shortcut key field, and then click OK.
31. Select cells D7:D11, and then press CTRL+N (you do not need the SHIFT key because you did not use
it when defining your shortcut key for this macro).
32. Click File, click Save As, and then navigate to the MyProjects folder.
Excel displays a warning message stating that your workbook contains a VB project and therefore can’t
be saved as a macro-free workbook. You need to change the workbook type to a macro-enabled
workbook.
35. In the Save As page, change the Save as type to Excel Macro-Enabled Workbook, and then click Save.
36. Create a new blank workbook and close the My Balance Sheet Macro.xlsm workbook.
A security warning is displayed to inform you that this workbook contains a macro. Since you know you
created this workbook, you can assume that it is still safe to use.
If you open this workbook again on this computer, Excel will no longer display the security warning
message. By clicking the Enable Content button, you have tagged the workbook as “safe.” Other users
will still see the security warning message if they open this workbook for the first time.
All the code for the macro appears between the Sub and End Sub statements.
The text immediately following the Sub statement is the macro name. If you simply want to rename a macro,
change the name in this line, save your change and exit the editor. (Be careful not to change the word Sub
or the space that follows it.)
You can improve the speed, efficiency, and accuracy of your macro by removing unnecessary properties or
changing code elements. For example, when you record a step that selects an option from a dialog box, the
macro records all the settings in the dialog box. To speed up your macro, you can remove the unnecessary
properties by deleting those lines of code.
A basic understanding of the Visual Basic programming language is helpful but, for the purposes of this
courseware, you will learn simple editing procedures. This topic is included as an introduction to editing
macros. If you are unfamiliar with Visual Basic or do not plan to learn it, you may want to re-create your
macros whenever a change is required.
Within the code window, move the cursor to the location at which you want to make changes and use one
of the following methods:
• To replace existing text in the code, select the text and type the replacement text.
• To enter code, begin typing. If a drop-down list appears, move through the list of options to select the
appropriate code.
• To delete text, select the text and press DELETE.
• To insert a line of code, move the cursor to the beginning of the line where you want to insert the new
line of text and press ENTER. Inserting a blank line will help you to identify where the new code will be
placed. Move to the blank line and enter the line of code.
• To indent the line of code, press TAB.
• To turn a line of code into a comment, type a single apostrophe at the beginning of the line.
• click the (View Microsoft Excel) button in the Visual Basic toolbar; or
• press ALT+F11.
To close and exit the Visual Basic window, use one of the following methods:
• Click File, and then click Close and Return to Microsoft Excel; or
• click the Close button for the Microsoft Visual Basic window.
Note: If you simply want to assign/re-assign a shortcut key or add/modify a description for the macro,
open the Macros dialog box, then click the Options button to open the Macro Options dialog box, in which
you can edit these macro options.
1. Open Pie Chart Macro.xlsm located in the StarterFiles folder, and save it as My Pie Chart Macro.xlsm
in the MyProjects folder.
3. On the Developer tab, in the Code group, click Macros, then in the Macro dialog box, select PieChart
and click Run.
The macro inserts a pie chart and applies a color scheme and style.
4. Select the chart if necessary, then on the Chart Tools Design tab, in the Location group, click Move Chart.
5. In the Move Chart dialog box, click New sheet, and then click OK.
6. Click Sheet1.
8. In the Macro dialog box, select PieChart, then click Options to open the Macro Options dialog box.
10. Click in the Description field and type: Insert a pie chart.
12. With the PieChart macro still selected in the list box, click Edit to open the Visual Basic Editor.
13. Within the macro code, locate the command ActiveChart.ChartColor = 21 and change it so that it reads:
ActiveChart.ChartColor = 12
14. Within the macro code, locate the command ActiveChart.ChartStyle = 257 and change it so that it reads:
ActiveChart.ChartStyle = 258
15. Press CTRL+S, then click the close button to return to the Excel window.
The macro inserts a pie chart and applies the new color scheme and chart style.
To save yourself time and effort entering every macro from scratch into every workbook, you can simply copy
them from one workbook to another using the Visual Basic Project Explorer.
On the Developer tab, in the Code group, click Visual Basic. If necessary, click View, then click Project Explorer
to ensure that the Project pane appears at the left side of the Microsoft VBA window, as shown in Figure 6-
19.
Assume in our example that Romance At Sea.xlsm contains a macro that you want to copy into Hawaiian
Advenure.xlsx. Click the Plus symbol next to VBAProject (Romance At Sea.xlsm) to open its tree structure,
drag Module1 at the bottom of the tree and drop it on VBAProject (Hawaiian Adventure.xlsx). This action will
create a new Modules folder under VBAProject (Hawaiian Adventure.xlsx). Click the Plus symbol next to it
and you will see a Module1 macro under VBAProject (Hawaiian Adventure.xlsx). You can double-click both
Module1’s to open them in separate Code windows to confirm that the macros are identical in both
workbooks, as shown in Figure 6-20.
Figure 6-20: Microsoft Visual Basic Project pane with workbook code windows open
1. Open Romance At Sea.xlsm located in the StarterFiles folder, and save it as My Romance At Sea.xlsm
in the MyProjects folder.
2. Click the Enable Content button, and then select the cell range A5:D13.
4. Select the macro listed in this dialog box and click Run.
5. If necessary, click any blank cell away from this cell range to see the results of the macro.
6. Open Hawaiian Adventure.xlsx located in the ResourceFiles folder, and save it as My Hawaiian
Adventure.xlsx in the MyProjects folder.
8. If necessary, click View, then click Project Explorer to ensure that the Project pane is displayed on the
left side of the Microsoft VBA window.
9. If necessary, click the Open Tree (+) icon at the VBAProject (My Romance At Sea.xlsm) and Modules levels
to open them up.
10. Double-click Module1 under VBAProject (My Romance At Sea.xlsm) to open this VB code window.
11. Click Module1 under VBAProject (My Romance At Sea.xlsm), and then drag it to VBAProject (My
Hawaiian Adventure.xlsx).
12. Click the Open Tree (+) icon for the newly-created Modules tree under VBAProject (My Hawaiian
Adventure.xlsx), and then double-click Module1 to view its contents.
13. In the Microsoft Visual Basic for Applications window, click File, then click Close and Return to
Microsoft Excel.
14. With the My Hawaiian Adventure workbook as the active workbook, click File, click Save As, and then
navigate to the MyProjects folder.
15. In the Save As page, click the Save as type drop-down arrow, select Excel Macro-Enabled Workbook,
and then click Save.
17. Open My Hawaiian Adventure.xlsm located in the MyProjects folder, and then click Enable Content to
enable the macro.
19. On the View tab, in the Macros group, click the Macros arrow, then click View Macros.
20. Select the macro listed in this dialog box, and click Run.
21. Click any blank cell away from this cell range to see the results of the macro.
Lesson Summary
Now that you have completed this lesson, you should be able to:
Key Terms
Term Definition
AutoFill A method of copying data and formulas or creating data series by dragging the lower
right corner of a cell or range.
Flash Fill A feature that will extract, combine, and/or re-sequence cell contents from one or more
cells to create new values.
Macro A set of actions that can be recorded and then executed with a single command.
Term Definition
Macro Recorder A feature that enables you to track your Ribbon selections and activities on the
worksheets to create a macro. See Macro.
Outline A feature that enables you to quickly expand all or selected groups of data and collapse
them again.
Visual Basic Editor A feature that enables you to edit macros by making changes to the macro code, which
is written in the Visual Basic programming language.
Quiz Questions
For each question, select the best answer.
1. Which of the following is an advantage of using the Fill Series feature as opposed to the AutoFill feature?
a. The Fill Series feature lets you apply formatting as you fill the range.
b. The Fill Series feature automatically inserts Quick Analysis Data Bars.
c. The Fill Series feature gives you control over how much to increment each subsequent cell.
d. The Fill Series feature allows you to select from up to 3 scenarios as you fill the range.
2. Which of the following statements about the Flash Fill feature is TRUE?
a. You can use Flash fill to combine and re-sequence data; but you cannot use it to extract data.
b. You can use Flash fill to extract and combine data; but you cannot use it to re-sequence data.
c. You can use Flash fill to extract and re-sequence data; but you cannot use it to combine data.
d. None of these statements about the Flash Fill feature are true.
3. Sarah is using the Remove Duplicates feature to remove duplicate rows in her address list. She knows there
are duplicate entries for Zachary B who lives on Miller Road. What can she expect when using the feature?
a. Excel will skip duplicate entries if they are not identical in every way.
b. Excel will skip duplicate entries if one contains a comma and one does not.
c. Excel will skip duplicate entries if one contains an extra blank space and one does not.
d. Excel will skip duplicate entries if one contains an extra period and one does not.
7. Where can you find a setting that will configure Excel to disable all macros without any notification?
a. 1st macro
b. FirstMacro
c. F!rstM@cro
d. All of the names listed are valid names for a macro.
10. If you want to modify the shortcut key assigned to a macro, you can ___________________________________.
11. Dean created several macros in his TaxPrep-Q1 workbook. How can he use these macros in his TaxPrep-Q2
workbook?
Microsoft ®
Excel
Expert Certification Guide
Appendices
Appendix A
Courseware Mapping
Appendix B
Glossary of Terms
Appendix C
Index
Comment – Similar to a post-it note in which you can Global Options – Options and settings you can specify
annotate a worksheet by entering information for in Excel that affect all workbooks.
yourself or others to review. Goal Seek – A tool you can use to automate the entire
Conditional Formatting – A feature that enables you to process of changing one variable while calculating a
change the appearance of a cell, depending on that cell’s formula and trying to match the desired value.
value. Grouping – A feature you can use to simplify a large
Conditional Logic – A type of function used in table or pivot table by condensing data into logical
situations in which you want to perform one of two groups (for example, grouping date values by month,
different calculations, depending on which value is in quarter, or year).
one or more cells other than the ones in which the Insert Function – The feature that Excel provides to
logical functions are located. help you select the desired function to perform
Conditional Summary – A type of summary function calculations.
that is applied only to a given range of cells that meet Link – The process of referencing cells or worksheets in
a specific criteria. a “source” workbook, so that changes made in the
Consolidating data – The process of summarizing source workbook will automatically change in the
multiple ranges of data into a single range. You can linked workbook.
consolidate data from different areas within a Macro – A set of actions that can be recorded and then
worksheet, from other worksheets in the same executed with a single command.
workbook, or from other workbooks. Macro Recorder – A feature that enables you to track
Data Series – Each set of data used in a graphical chart. your Ribbon selections and activities on the worksheets
Data Slicers – Buttons you can click to filter the data in to create a macro. See Macro.
a table or pivot table. Macro-enabled Workbook – A workbook in which
Data Validation – A feature that helps you set up one or more macros is saved.
validation checks in cells; for example, numbers only, Nesting – Embedding one function inside of another
list of inventory items available only, and so on. one to yield a value that is the result of multiple
Display Language – Refers to the language-specific calculations.
text used in menus, tool tips, and the Help system. Outline – A feature that enables you to quickly expand
all or selected groups of data and collapse them again.
Appendix C: Index
SUMIF, 158
+ F AVERAGEIFS, 158
+Body and +Heading Fonts, 23 Fill Series, 175 COUNTIFS, 158
Filling Data SUMIFS, 158
A Series, 176 AVERAGEIFS, 159
Analysis Tools Flash Fill, 178 COUNTIFS, 159
Goal seek, 162 Fonts SUMIFS, 159
Scenarios, 166 +Heading and +Body, 23 SWITCH, 159
Watch window, 170 Formatting
AND, 156 Custom cells, 9 G
AutoFill, 176 Pivot Table data, 71 Global Options, 131
Automatic Subtotals, 182 Formulas Goal Seek, 162
AVERAGEIF, 157 Display formulas, 56
AVERAGEIFS, 158, 159 Error checking tool, 49 H
Linking external workbooks, 106
HLOOKUP, 40
C Manual checking, 56
HOUR, 46
Modifying links in workbooks, 108
Cell Watch, 170
Chart Referencing other worksheets, 105
Removing workbook links, 110
I
Chart types, 140 INDEX, 36
Tracing formula errors, 53
Charts, 137 Inserting current date, 46
Secondary axis, 138 Functions
DATE, 45 Inserting current time, 46
CHOOSE, 34 International Formats, 16
DATEVALUE, 45
Comments, 115 Currency and number, 16
Creating, 116 DAY, 45
DAYS, 45 Currency symbols, 18
Deleting, 118 Date and time, 19
FV, 148
Moving between, 117 IRR, 148
Office 2019 Professional Plus, 118 HOUR, 46
IRR, 148
Replying to, 117
MINUTE, 46 L
Conditional Formatting, 1
MONTH, 45 Linking
Managing rules, 3
Nesting, 152 External workbooks, 106
New Formatting Rule dialog box,
NOW, 45 Links
2
NPER, 148, 149 Modifying in workbook, 108
Using a formula, 6
NPV, 148 Removing from workbooks, 110
Conditional Logical Functions
PMT, 148 Lookup, 34
AND, 156
PV, 148 Lookup functions
NOT, 156
SECOND, 46 Vector, 34
OR, 156
TIME, 46
Consolidating Data, 112
COUNTIF, 158 TODAY, 45 M
COUNTIFS, 158, 159 WEEKDAY, 46 Macros, 190
WORKDAY, 46 Assignng shortcut keys, 195
Custom Cell Formats, 9
Accounting, 13 YEAR, 45 Copying, 201
Date and time, 14 Functions, 29 Creating, 194
CHOOSE, 34 Editing, 199
Number, 10
Correct Syntax, 30 Running, 192
D Date and time, 45 Saving with a workbook, 195
HLOOKUP, 40 Security, 190
Data Slicers, 78
INDEX, 36 Sharing, 199
Data Validation, 57
Inserting, 31 MATCH, 39
DATE, 45
Lookup, 34 MINUTE, 46
DATEVALUE, 45
MATCH, 39 MONTH, 45
DAY, 45
Nesting, 31
DAYS, 45
Dependent Worksheets, 106
VLOOKUP, 42 N
Functions Nesting functions, 31
Display Language, 21
Financial, 148 NOT, 156
Duplicate Rows, 181
Conditional logic, 156 NOW, 45
E Conditional summary functions,
157
NPER, 148, 149
NPV, 148
Editing Language, 21 AVERAGEIF, 157
Error checking tool, 49 COUNTIF, 158
O T
Options TIME, 46
Global, 131 TODAY, 45
Workbook-specific, 131 Trace dependent cells, 53
OR, 156 Trace precedent cells, 53
Outlining, 182 Tracing Formula Errors, 53
Automatic subtotals, 182
Grouping and ungrouping data, V
186 Vector, 34
Visual Basic Editor, 199
P Saving changes, 200
Passwords, 122 VLOOKUP, 42
Worksheet, 124
Pivot Charts W
Changing options, 95 WEEKDAY, 46
Creating, 91 What-If Analysis, 162
Drilling down, 98 Workbook-Specific Options, 131
Styles, 99 WORKDAY, 46
Pivot Tables, 65
Calculated fields, 86 Y
Creating, 66
YEAR, 45
Customizing, 73
Data Slicers, 78
Drilling down, 97
Filtering data, 74
Formatting, 71
Grouping data, 80
Manually grouping data, 82
PMT, 148
Protecting a workbook
Passwords, 122
Workbook protection, 130
Worksheet protection, 123
Protecting a Workbook, 122
Allow ranges for editing, 127
Passwords, 122
PV, 148
R
Referencing other worksheets, 105
Ribbon
Hidden tabs, 188
S
Scenario Manager, 166
Scenarios, 166
SECOND, 46
Secondary axis, 138
Serialized date value, 45
Source Worksheets, 106
Subtotal Function
Grouping and ungrouping data,
186
SUMIF, 158
SUMIFS, 158, 159
SWITCH, 159