0% found this document useful (0 votes)
132 views300 pages

Advance Spreadsheet Tools Book

The document is a lab manual for the course 'Advance Spreadsheet Tools' aimed at undergraduate and postgraduate students in Computer Science. It includes a syllabus, course objectives, detailed chapter contents, and evaluation methods, emphasizing practical applications of spreadsheet tools. The authors, Dr. Ramesh Saini and Pankaj Chaudhary, aim to simplify the subject matter for better understanding.

Uploaded by

leyofe7806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views300 pages

Advance Spreadsheet Tools Book

The document is a lab manual for the course 'Advance Spreadsheet Tools' aimed at undergraduate and postgraduate students in Computer Science. It includes a syllabus, course objectives, detailed chapter contents, and evaluation methods, emphasizing practical applications of spreadsheet tools. The authors, Dr. Ramesh Saini and Pankaj Chaudhary, aim to simplify the subject matter for better understanding.

Uploaded by

leyofe7806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 300

Unique

ADVANCE
SPREADSHEET
TOOLS

Dr. Ramesh Saini Pankaj Chaudhary


MBA, M.Com., MCA, M. Phil, Ph.D & NET Assistant Professor, M.Com. MBA (Finance),
H.O.D. Computer Department M.Phil (Commerce) Post B.Sc., DCA, CIC, NET
Kanya Mahavidyalaya, Kharkhoda, P.G. Deptt. of Ciommerce and Management
SONIPAT Arya P.G. College, PANIPAT

UNIQUE PUBLICATIONS
Panipat Office : 137/7, New Bhagat Nagar, Tehsil Town, PANIPAT, 25. B-Block,
TDI City, Sector 38/39, TDI, PANIPAT
Delhi Office : Plot No. 795, Paper Market, Ghazipur, Near Fruit and Vegetable Market, Delhi-91
Ph. : (M) 90342-62133, 97290-83112, 98968-65777, E-Mail : [email protected],
Website : http://unique publication.com
Published by:

Unique Publications
Panipat Office : 1. 137/7, New Bhagat Nagar, Tehsil Town, PANIPAT
2. 25. B-Block, TDI City, Sector 38/39, TDI, PANIPAT
Delhi Office: Plot No. 795, Paper Market, Ghazipur,
Near Fruit and Vegetable Market, Delhi-91
Ph. : (M) 90342-62133, 97290-83112, 98968-65777

Our Branch & Distributor

Shagun Book Shop


Thakar Basti, FATEHABAD
Phone : (M) 98123-36178, 81683-22147

© Copy Right Reserved with the Publishers

Published by Rajinder Kumar Insa


(Dedicate this Lab Manual Book to my beloved parents)

All rights Reserved. No part of this publication may be reproduced, stored in a retrieval system
or transmitted in any form or by an means (Electronic Mechanical, Photocopying, recording or
otherwise) without the prior permission of the publisher.
We are committed to serve students with best of our knowledge and resources. We have taken
utmost care and attention while editing and printing this practical book but we would beg to
state that Authors and Publishers should not be held responsible for unintentional mistake that
might have crept in. However, errors brought to our notice, shall be gratefully acknowledged
and attended too.

Registration
FORM F: [Under Rule 13 of the Punjab Shops and Commercial Establishments Act, 1958]
Reg. No.: PSA/REG/PPT/LI-Ppt-VI/0265062

Laser Typesetting & Title Design by :

Gateway Assignment
Delhi-110094
PREFACE
This book has originated from the fact that both teachers and students have to
refer to many different books and internet sites for their course of study in Advance
Spreadsheet Tools. Keeping this in mind the syllabus of the all Under Graduate and
Post Graduate in the field of Computer Science has been adopted as a guideline for
the preparation of this book. I have tried our best for making the subject matter
simple and easy.

This book has the primary aims to providing essential and detailed coverage
of Advance Spreadsheet Tools concepts to the all U. G. & P. G. students in computer
Science. I hope that this book will be helpful to all type of students.

The whole text book has been divided in Fourteen Chapters with detailed
examples.

My heartiest request to Dear Readers, if you have any query or suggestion


about any mistake and improvement in this book.

—Authors
 H.O.D. Computer Department,
 Kanya Mahavidyalaya, Kharkhoda (Sonipat)
ABOUT THE AUTHOR
Dr. Ramesh, Assistant Professor in Computer Science Department
in Kanya Mahavidyala, Karkhoda, Sonipat, Haryana has two decades of
distinguished academic, administrative and computer experience. He has
specialized in the field of rural marketing. He is complete his research in
2012 on Role of rural marketing in rural development. He has attended
and presented many research papers in national seminars/conference
in different colleges and university. He has contributed many research
articles in reputed publications.
SYLLABUS
DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS
KURUKSHETRA UNIVERSITY, KURUKSHETRA

SESSION: 2023-24
PART A – INTRODUCTION
Subject Computer Science
Semester I
Name of the Course Advance Spreadsheet Tools
Course Code B23-SEC-102
CourseType: (CC/MCC/MDC/CC- SEC
M/DSEC/VOC/DSE/PC/AEC/VAC)
Level of the course (As per Annexure-I
Pre-requisite for the course (ifany)
Course Learning Outcomes(CLO): After completing this course, the learner will
be able to:
1. create and format spreadsheets
2. create and format tables and applying
formulas in a spreadsheet
3. create charts and protect worksheets
4. create and use pivot charts and tables
5*. to implement various spreadsheet tools
practically.
Credits Theory Practical Total
2 1 3
Contact Hours 2 2 4
Max. Marks: 75(50(T)+25(P)) Time: 3 Hrs.(T), 3Hrs.(P)
Internal Assessment Marks: 20(15(T)+5(P))
End Term Exam Marks: 55(35(T)+20(P))
PART B – CONTENTS OF THE COURSE
Instructions for Paper- Setter
Examiner will set a total of nine questions. Out of which first question will be compulsory.
Remaining eight questions will be set from four unit selecting two questions from each
unit. Examination will be of three-hour duration. All questions will carry equal marks.
First question will comprise of short answer type questions covering entire syllabus.
Candidate will have to attempt five questions in all, selecting one question from each
unit. First question will be compulsory.
Practicum will be evaluated by an external and an internal examiner. Examination will
be of three- hour duration.

Contact
Unit Topics
Hours
I Manage Workbook Options and Settings: Create Worksheets
and Workbooks, navigate in Worksheets and Workbooks,
Format Worksheets and Workbooks, Customize Options and
Views for Worksheets and Workbooks, Configure Worksheets
and Workbooks for Distribution 6
Apply Custom Data Formats and Layouts: Apply Custom
Data Formats and Validation, Apply Advanced Conditional
Formatting and Filtering, Create and Modify Custom Workbook
Elements
II Create Tables: Create and Manage Tables, Manage Table Styles
and Options, Filter and Sort a Table
Perform Operations with Formulas and Functions: 6
Summarize Data by using Functions, Perform Conditional
Operations by using Functions, Format and Modify Text by
using Functions.
III Create Charts and Objects: Create Charts, Format Charts,
Insert and Format Objects
6
Manage Workbook Options and Settings: Manage Workbooks,
Manage Workbook Review Restrict editing
IV Create Advanced Formulas: Apply Functions in Formulas,
Look up data by using Functions, Apply Advanced Date and Time
Functions, Perform Data Analysis and Business Intelligence,
6
Define Named Ranges and Objects,
Create Advanced Charts and Tables: Create and Manage
PivotTables, Create and Manage Pivot Charts
V* Practicum:
Spread Sheet:
›› Use spreadsheet for basic data handling
›› Apply formulas to sheet for automation.
›› Use if-else to make certain decisions in a sheet.
›› Use Charts & Shapes for better visualization of data. 25
›› Use filters and data validation controls for control of data
›› Formatting data and spreadsheets
›› Creating and managing tables
›› Use Pivot table and charts
›› Use what-if analysis along with goal seek and scenarios

Suggested Evaluation Methods


Internal Assessment
›› Theory
End
 Class Participation: 4 Term Ex-
 Seminar/presentation/assignment/quiz/class test etc.:4 amination:
A three
 Mid-Term Exam: 7
hour exam
›› Practicum for both
 Class Participation: 2 theory and
 Seminar/Demonstration/Viva-voce/Lab records etc.:3 practicum.

 Mid-Term Exam: NA
PART C-LEARNING RESOURCES

Recommended Books/e-resources/LMS:
›› Help files from Apache Open Office, https://wiki.openoffice.org/wiki/Documentation
›› Channelle Andy, “Beginning OpenOffice 3: From Novice to Professional”, aPress
Publications
›› Beginning OpenOffice 3: From Novice to Professional, Andichannele, Apress.
›› Microsoft Office 2016 Step by Step: MS Office 2016 Step by Step, By Joan Lambert,
Curtis Frye
›› Getting Started with LibreOffice 5.0, Friends of OpenDocuments Inc., Http://
friendsofopendocument.com
›› Documentation from LibreOffice, https://documentation.libreoffice.org/en/english-
documentation/
›› Walter Holland, Microsoft Office 2013 Digital Classroom
›› Wayne L. Winston, Data Analysis and Business Modeling

*Applicable for courses having practical component.


CONTENTS
1. Program Fundamentals������������������������������������������������������������������������������������������15
›› Starting Excel 2010
›› What’s New in Excel 2010
›› Understanding the Excel Program Screen
›› Giving Commands
›› Using Command Shortcuts
›› Creating a New Workbook
›› Opening a Workbook
›› Previewing and Printing a Worksheet
›› Saving a Workbook
›› Closing a Workbook
›› Using Help
›› Exiting Excel
›› Program Fundamentals Review

2. Getting Started with Worksheets�������������������������������������������������������������������36


›› Navigating a Worksheet
›› Entering Labels and Values
›› Selecting a Cell Range and Entering Data in a Cell Range
›› Overview of Formulas and Cell References
›› Entering Formulas
›› Entering Content Automatically
›› Getting Started with Worksheets Review

3. Editing a Worksheet�����������������������������������������������������������������������������������������������48
›› Editing Cell Contents
›› Copying and Moving Cells
›› Controlling How Cells Are Moved or Copied
›› Collecting Items to Move or Copy
›› Checking Your Spelling
›› Inserting Cells, Rows, and Columns
›› Deleting Cells, Rows, and Columns
›› Using Undo and Redo
›› Finding and Replacing Content
›› Adding Comments to Cells
›› Editing a Worksheet Review

4. Formatting a Worksheet��������������������������������������������������������������������������������������68
›› Formatting Text
›› Formatting Values
›› Adjusting Row Height and Column Width
›› Working with Cell Alignment
›› Adding Cell Borders and Background Colors
›› Copying Formatting
›› Applying and Removing Cell Styles
›› Creating and Modifying Cell Styles
›› Using Document Themes
›› Applying Conditional Formatting
›› Creating and Managing Conditional Formatting Rules
›› Finding and Replacing Formatting
›› Formatting a Worksheet Review

5. Creating and Working with Charts�����������������������������������������������������������������93


›› Choosing and Selecting the Source Data
›› Choosing the Right Chart
›› Inserting a Chart
›› Editing, Adding, and Removing Chart Data
›› Changing Chart Data
›› Changing Chart Layout and Style
›› Working with Chart Labels
›› Changing the Chart Gridlines
›› Changing the Scale
›› Emphasizing Data
›› Using Chart Templates
›› Changing Chart Type
›› Using Sparklines
›› Creating and Working with Charts Review

6. Managing Workbooks������������������������������������������������������������������������������������������ 120


›› Using Workbook Views
›› Selecting and Switching Between Worksheets
›› Inserting and Deleting Worksheets
›› Renaming, Moving, and Copying Worksheets
›› Splitting and Freezing a Window
›› Creating Headers and Footers
›› Hiding Rows, Columns, Worksheets, and Windows
›› Setting the Print Area
›› Adjusting Page Margins and Orientation
›› Adding Print Titles, Gridlines, and Row and Column Headings
›› Adjusting Paper Size and Print Scale
›› Printing a Selection, Multiple Worksheets, and Workbooks
›› Working with Multiple Workbook Windows
›› Creating a Template
›› Managing Workbooks Review

7. More Functions and Formulas������������������������������������������������������������������������� 148


›› Formulas with Multiple Operators
›› Inserting and Editing a Function
›› AutoCalculate and Manual Calculation
›› Defining Names
›› Using and Managing Defined Names
›› Displaying and Tracing Formulas
›› Understanding Formula Errors
›› Using Logical Functions (IF)
›› Using Financial Functions (PMT)
›› Using Database Functions (DSUM)
›› Using Lookup Functions (VLOOKUP)
›› User Defined and Compatibility Functions
›› Financial Functions
›› Date & Time Functions
›› Math & Trig Functions
›› Statistical Functions
›› Lookup & Reference Functions
›› Database Functions
›› Text Functions
›› Logical Functions
›› Information Functions
›› Engineering and Cube Functions
›› More Functions and Formulas Review

8. Working with Data Ranges������������������������������������������������������������������������������� 188


›› Sorting by One Column
›› Sorting by Colors or Icons
›› Sorting by Multiple Columns
›› Sorting by a Custom List
›› Filtering Data
›› Creating a Custom AutoFilter
›› Using an Advanced Filter
›› Working with Data Ranges Review

9. Working with Tables������������������������������������������������������������������������������������������� 202


›› Creating a Table
›› Adding and Removing Data
›› Working with the Total Row
›› Sorting a Table
›› Filtering a Table
›› Removing Duplicate Rows of Data
›› Formatting the Table
›› Using Data Validation
›› Summarizing a Table with a PivotTable
›› Converting to a Range
›› Working with Tables Review

10. Working with PivotTables�������������������������������������������������������������������������������� 221


›› Creating a PivotTable
›› Specifying PivotTable Data
›› Changing a PivotTable’s Calculation
›› Filtering and Sorting a PivotTable
›› Working with PivotTable Layout
›› Grouping PivotTable Items
›› Updating a PivotTable
›› Formatting a PivotTable
›› Creating a PivotChart
›› Using Slicers
›› Sharing Slicers Between PivotTables
›› Working with PivotTables Review

11. Analyzing Data�������������������������������������������������������������������������������������������������������� 240


›› Creating Scenarios
›› Creating a Scenario Report
›› Working with Data Tables
›› Using Goal Seek
›› Using Solver
›› Using Text to Columns
›› Grouping and Outlining Data
›› Using Subtotals
›› Consolidating Data by Position or Category
›› Consolidating Data Using Formulas
›› Analyzing Data Review
12. Working with the Web and External Data������������������������������������������������ 263
›› Inserting a Hyperlink
›› Importing Data from an Access Database or Text File
›› Importing Data from the Web and Other Sources
›› Working with Existing Data Connections
›› Working with the Web and External Data Review

13. Working with Macros������������������������������������������������������������������������������������������ 274


›› Recording a Macro
›› Playing and Deleting a Macro
›› Adding a Macro to the Quick Access Toolbar
›› Editing a Macro’s Visual Basic Code
›› Inserting Copied Code in a Macro
›› Declaring Variables and Adding Remarks to VBA Code
›› Prompting for User Input
›› Using the If…Then…Else Statement
›› Working with Macros Review

14. Customizing Excel�������������������������������������������������������������������������������������������������� 289


›› Customizing the Ribbon
›› Customizing the Quick Access Toolbar
›› Using and Customizing AutoCorrect
›› Changing Excel’s Default Options
›› Creating a Custom AutoFill List
›› Creating a Custom Number Format
›› Customizing Excel Review
Program Chap
1
ter
Fundamentals
Microsoft Excel is a powerful spreadsheet program that allows you to make quick
and accurate numerical calculations and helps you to make your data look sharp
and professional. The uses for Excel are limitless: businesses use Excel for creating
financial reports, scientists use Excel for statistical analysis, and families use Excel
to help manage their investment portfolios.
If you’re moving from Excel 2003 or earlier to Excel 2010, you’ll see that Excel
has undergone a major redesign. You’ll still be familiar with much of the program’s
functionality, but you’ll notice a completely new user interface and many new
features that have been added to make using Excel more efficient.
This chapter is an introduction to working with Excel. You’ll learn about the
main parts of the program screen, how to give commands, use help, and about new
features in Excel 2010.

STARTING EXCEL 2010


EXERCISE
In order to use a program, you must
Start the Microsoft Office Excel 2010 program.
start—or launch—it first.
Windows Vista and Windows 7
1. Click the Start button. The Start menu
appears.
2. Click All Programs.
The left pane of the Start menu displays
the programs and menus installed on
your computer.
3. Click Microsoft Office.
4. Select Microsoft Office Excel 2010. The
Excel 2010 program screen appears.

Fig. 1.1. Programs menu in Windows 7.

Advance Spreadsheet Tools 15


Other Ways to Launch a Program: Click the Start button and type the

program name in the Search box. Click the program in the search results to
launch it.
Tips: If you use Excel 2010 frequently, you might consider pinning it to the
Start menu. To do this, right-click Microsoft Office Excel 2010 in the All
Programs menu and select Pin to Start Menu.
Windows7userscanalsopinaprogramtothetaskbar.Todothis,right-clicktheExcel

button in the taskbar and select Pin this program to taskbar from the contextual
menu.

WHAT’S NEW IN EXCEL 2010

Excel 2010 is very different from EXERCISE


previous versions. The table below Start the Microsoft Office Excel 2010 program.
gives you an overview of what to
expect.
Table 1.1: What’s New in Excel 2010
Customizable The Ribbon makes all the commands needed to work with a program
Ribbon readily available. The Ribbon was introduced in Excel 2007, but has
been improved in Excel 2010: now you can create your own tabs
and groups for the Ribbon. You can also rename or change the order
of default tabs and groups.
Backstage Backstage view is where you open, save, print, share, and manage
View your files and program options. To access Backstage view, click the
File tab on the Ribbon.
Workbook Three new tools help you manage, protect, and share your
Management workbooks: Recover previous versions lets you revert to an
earlier version of your workbook. Protected view helps protect
your computer from online attacks when opening files from the
Internet. The Trusted documents feature remembers which files
you trust so you aren’t prompted each time the file is opened.
Paste with Allows you to preview how pasted content will look with various
Live Preview paste options before you paste it.
More Themes Predefined styles and themes let you change the overall look and
and Styles feel of a worksheet in just a few clicks. Now Office 2010 has even
more themes you can apply to your documents.

16 Advance Spreadsheet Tools


Improved There are many new ways to edit pictures and images in your
Picture- documents.
Editing Tools Insert screen shots: You can take a screen shot or screen clipping
and add it to your documents.
Improved SmartArt: Now you can add SmartArt that uses
photographs.
Other tools: New picture editing tools let you refine the brightness,
contrast, or sharpness of a picture; add artistic effects; and control
cropping and compression.
Accessibility The Accessibility Checker lets you find and fix issues that can make
Checker it difficult for people with disabilities to read or interact with your
workbook.
Language Improved language tools let multilingual users set preferences for
Tools language settings in Office 2010.
Better Conditional formatting allows you to analyze Excel data with just a
conditional few clicks. New icon sets and formatting options for data bars are
formatting available to add to conditional formatting in your documents.
Improved Sparklines are tiny charts that fit within a cell. They are useful for
charts showing a snapshot of your data in a small amount of space.
Expanded charting limits: Now the number of data points in a
data series is only limited by available memory.
Double-click to format charts: In Excel 2010, you can instantly
access formatting options by double- clicking a chart element.
Macro recording for chart elements: You can use the macro
recorder to record formatting changes to charts and other objects.
Improved PivotTables are easier to use and are more responsive in Excel 2010.
PivotTables Multi-threading to speed up performance; the ability to fill down
labels; and new search features are some of the enhancements in
Excel 2010.
Slicers are a visual way to filter the data in PivotTables. When a
slicer is inserted, you use buttons to filter the data and display what
you need. Slicers also make it easy to see which filters are applied.
Improved Excel 2010 includes a set of more accurate functions for statistics.
functions Some existing functions have also been renamed so they better
describe what they do.

Advance Spreadsheet Tools 17


Improved A new search filter helps you to find what you need in large
filtering worksheets quickly. Search filters can be used in tables, PivotTables,
and PivotCharts. AutoFilter buttons also remain visible as you scroll
down in a table.
Equations in Excel 2010’s built-in Equation Tools make it easier to write and edit
text boxes equations by keeping them inside text boxes on a worksheet.

Understanding the Excel Program Screen


The Excel 2010 program screen may EXERCISE
seem confusing and overwhelming at
Understand and experiment with the different
first. This lesson will help you become parts of the Microsoft Office Excel 2010 screen.
familiar with the Excel 2010 program
screen as well as the new user interface.

A File tab: Contains basic file management commands—such as New, Open,


Save, and Close—and program options.

18 Advance Spreadsheet Tools


B Quick Access Toolbar: Contains common commands suchas Save and Undo.
You can add more commands as well.
C Title bar: Displays the name of the workbook you are working on and the
name of the program you are using.
D Close button: Click the close button in the Title bar to exitthe Excel program
entirely, or click the close button in the Ribbon to close only the current
workbook.
E Ribbon: The tabs and groups on the Ribbon replace themenus and toolbars
found in previous versions of Excel.
F Scroll bars: Use the vertical and horizontal scroll bars to view different
parts of the worksheet.
G Zoom slider: Click and drag the slider to zoom in or out of a window. You
can also use the + and – buttons.
H View buttons: Use these buttons to quickly switch between Normal, Page
Layout, and Page Break Preview views.
I Worksheet tabs: Workbooks have three worksheets by default. You can
move from one worksheet to another byclicking the worksheet tabs.
J Status bar: Displays messages and feedback on the current state of Excel.
Right-click the status bar to configure it.
K Name box: Displays the active cell address or object name. Click the list
arrow to enter formulas.
L Row and column headings: Cells are organized and referenced by row and
column headings (for example, cellA1).
M Active cell: You can enter or edit data in the active cell.
N Formula Bar: Allows you to view, enter, and edit data in the active cell.
Displays values or formulas in the cell.

GIVING COMMANDS

Excel 2010 provides easy access to EXERCISE


commands through the Ribbon. The Click each tab on the Ribbon to view its
Ribbon keeps commands visible while commands. Click the File tab to view Backstage
view.
you work instead of hiding them under
menus or toolbars.

Advance Spreadsheet Tools 19


Ribbon
The Ribbon is
made up of three basic
components: tabs,
groups, and buttons. It
is the primary way to
give commands in Excel.
Tabs: Commands
are organized into tabs
on the Ribbon. Each tab
contains a different set
of commands. There are
different types of tabs:
Command tabs:
These tabs appear by
default whenever you
Fig. 1.2. Elements of the Ribbon.
open the Excel program.
In Excel 2010, the Home, Insert, Page Layout, Formulas, Data, Review, and View
tabs appear by default.
Contextual tabs: Contextual tabs appear whenever you perform specific task,
or when a specific object is selected. The tabs offer commands relative to only that
object or task. For example, whenever you select an image, the Picture Tools tab
appears on the Ribbon.
Groups: The commands
found on each tab are
organized into groups of
related commands. For
example, the Font group
contains commands used
for formatting fonts. Click
the Dialog Box Launcher
( ) in the bottom-right
corner of a group to display
even more commands.

Fig. 1.3. Hiding the Ribbon gives you more room in the program window.

20 Advance Spreadsheet Tools


Some groups also contain galleries that display several formatting options.
Trap: Based on the size of the program window, Excel changes the appearance
and layout of the commands within the groups.
Buttons: One way to issue a command is by clicking its button on the Ribbon.
Buttons are the smallest element of the Ribbon. Click a button to give a command.
Tips: You can hide the Ribbon so that only tab names appear, giving you
more room in the program window. To do this, double-click the currently
displayed command tab. Or, right-click a Ribbon tab and select Minimize
Ribbon from the contextual menu. To display the Ribbon again, click any
tab.
File Tab
The File tab appears in the upper-
left corner of the program window.
When clicked, it opens Backstage view,
which is where you find commands
for basic file management, including
New, which creates a new file; Open,
which opens an existing file; Save,
which saves the currently opened file;
and Close, which closes the currently
opened file. This is also where you find
commands for controlling program Fig. 1.4. The Info tab in Backstage view.
options and sharing.
Tips: The File tab replaces the File menu and Office Button found in previous
versions of Excel.
Quick Access Toolbar
The Quick Access Toolbar appears to the right of the
File tab and provides easy access to the commands you
use most frequently. By default, the Save, Undo, and
Redo buttons appear on the toolbar; however, you can
Fig. 1.5. The Quick Access Toolbar.
customize this toolbar to meet your needs by adding
or removing buttons.

Advance Spreadsheet Tools 21


USING COMMAND SHORTCUTS

Command shortcuts provide other EXERCISE


ways to give commands in Excel. Memorize some common keystroke shortcuts.
Shortcuts can be a time-saving and Open a contextual menu in the main part of the
program window.
efficient alternative to the Ribbon. Use
shortcuts for the commands you use most frequently.
Keystroke Shortcuts Table 1.2: Common Keystroke Shortcuts
Without a doubt, keystroke <Ctrl> + <O> Opens a workbook.
shortcuts are the fastest way <Ctrl> + <N> Creates a new workbook.
to give commands in Excel. <Ctrl> + <S> Saves the current workbook.
They’re especially great for <Ctrl> + <P> Prints the worksheet.
issuing common commands, <Ctrl> + <B> Toggles bold font formatting.
such as saving a workbook. <Ctrl> + <I> Toggles italic font formatting.
In order to issue a <Ctrl> + <C> Copies the selected cell, text or
command using a keystroke object.
shortcut, you simply press a <Ctrl> + <X> Cuts the selected cell, text or
object.
combination of keys on your
keyboard. For example, rather <Ctrl> + <V> Pastes the selected cell, text or
object.
than clicking the Copy button
<Ctrl> + <Home> Moves the cell pointer to the
on the Ribbon to copy a cell,
beginning of the worksheet.
you could press and hold
<Ctrl> + <End> Moves the cell pointer to the
the copy keystroke shortcut, end of the worksheet.
<Ctrl> + <C>.
Contextual menus
A contextual menu displays a list of commands related
to a specific object or area. To open a contextual menu:
1. Right-click an object or area of the worksheet or
program screen.
A contextual menu appears, displaying
commands that are relevant to the object or area
that you right- clicked.
2. Select an option from the contextual menu, or
click anywhere outside the contextual menu to
close it without selecting anything.
Fig. 1.6. A contextual menu.

22 Advance Spreadsheet Tools


Mini Toolbar
The Mini Toolbar appears when you select text or data within a cell or the
formula bar, and contains common text formatting commands.
1. Select text or data within a cell or the formula bar.
The Mini Toolbar appears near the text or data you selected.
 Trap: Sometimes the Mini Toolbar can be hard to see due to its
transparency. To make the Mini Toolbar more visible, point to it.
Tip: To close the Mini Toolbar while text is still selected, press <Esc>.
2. Click a button on the Mini Toolbar. The
command is given in Excel.
Tip: If you don’t want the Mini Toolbar Fig. 1.7. The Mini Toolbar.
to appear every time you select text,
click the File tab and click Options. Click the Personalize category,
uncheck the Show Mini Toolbar on selection check box, and click OK.
A larger version of the Mini Toolbar and a contextual menu appear
when you right-click an object or area of the worksheet window.
Key Tips
Key Tips appear whenever you press
the <Alt> key. You can use Key Tips to
perform just about any action in Excel,
without ever having to use the mouse.
To issue a command using a Key Tip,
first press the <Alt> key. Tiny letters and
Fig. 1.8. Press the <Alt> key to display Key Tips.
numbers, called badges, appear on the
Quick Access Toolbar, and all of the tabs on the Ribbon. Depending on the tab
or command you want to select, press the letter or number key indicated on the
badge. Repeat this step as necessary until the desired command has been issued.

CREATING A NEW WORKBOOK

Creating a new workbook is one of EXERCISE


the most basic commands you need Create a new blank workbook. Then create a
to know in Excel. A new workbook new workbook from a Microsoft Office Online
automatically appears upon starting template.
Excel, but it’s also helpful to know
how to create a new workbook within the application. You can create a blank new

Advance Spreadsheet Tools 23


workbook, such as the one that appears when you open Excel, or you can create a
new workbook based on a template.
Create a New Blank Workbook
1. Click the File tab on the Ribbon and select New.
The New tab of Backstage view appears. By default, the Blank Workbook
option is already selected.
2. Make sure the Blank Workbook option is selected and click Create.
The new blank workbook appears in the Excel application screen.
››Other Ways to Create a Blank Workbook: Press <Ctrl> + <N>. Or, double-
click the Blank Workbook option in Backstage view.
Create a Workbook from a Template
1. Click the File tab on the
Ribbon and select New.
The New tab of Backstage view
appears. There are several
ways you can create a new
workbook from a template.
›› Recent templates: Select
a template in the Recently
Used Templates area and
click Create.
››Sample templates: Click this Fig. 1.9. The New tab of Backstage view.
category to view templates
that are already installed on your computer. Select the template you want to
use and click Create.
››My templates: Select My Templates to open a dialog box that displays
templates you have created and saved on your computer.
››New from existing: Select New from Existing to open a dialog box that
allows you to browse for a workbook on your computer that you want to base
a new workbook on. This is essentially like creating a copy of an existing file.
››Office.com Templates: Click a category to view templates that you can
download from Office Online. Find the template you want to use and click
Download.

24 Advance Spreadsheet Tools


OPENING A WORKBOOK

Opening a workbook lets you use a workbook that you or someone else has
previously created and then saved. This lesson explains how to open a saved workbook.
Open a Workbook
You can locate workbook on your computer and simply double-click it to open
it, but you can also open a workbook from within the Excel program.
1. Click the File tab and select Open.
The Open dialog box appears. Next, you have to tell Excel where the file you
want to open is located.
›› Other Ways to Open a Workbook: Press <Ctrl> + <O>.
2. Navigate to the location of the saved
file.
The Open dialog box has several
controls that make it easy to navigate
to locations and find files on your
computer:
›› Address bar: Click a location in
the Address bar to open it. Click
the arrow to the right of a location
to view a list of folders within that
Fig. 1.10. The Open dialog box. To open a file, you
location. Select a folder from the must first navigate to the folder where it is saved.
list to open it. Most new files are saved in the Documents folder
by default.
›› Folders List: Shortcuts to
common locations on your computer, such as the Desktop and Documents
library.
›› Search box: This searches the contents— including subfolders—of that
window for the text that you type. If a file’s name, file content, tags, or
other file properties match the searched text, it will appear in the search
results. Search results appear as you enter text in the search box.
3. Select a file and click Open.
Excel displays the file in the application window.
Tip: To open a workbook that has been used recently, click the File tab,
click Recent, and select a workbook from the Recent Workbooks list.

Advance Spreadsheet Tools 25


You can pin a workbook to the Recent Workbooks list so that it is always
available there. Click the Pin this document to the Recent Workbooks
list button next to the workbook that you want to always be available.
Click it again to remove the workbook from the Recent Workbooks list.

PREVIEWING AND PRINTING A WORKSHEET

Once you have created a worksheet, EXERCISE


and your computer is connected to a Preview and print the worksheet.
printer, you can print a copy. Before
you do this, it’s a good idea to preview how it’s going to look.
1. Click the File tab on the Ribbon and select Print.
Notice that the print settings and a preview of the document appear together,
with print settings on the left and a preview on the right.

Fig. 1.11. The Print settings and Print Preview as shown in Backstage view. Use the print settings in the
left column to control how the document is printed. Use the print preview area in the right column
to preview how the document will look when printed.
Tip: Use the scroll bar or the page navigation controls below the
preview to view other pages in the document.
Other Ways to Preview and Print: Press <Ctrl> + <P>.

26 Advance Spreadsheet Tools


After previewing the document, you can specify printing options, such as
which pages or the number of copies to print.
2. Specify printing options and click the Print button. The document is sent to
the printer.

SAVING A WORKBOOK

After you’ve created a workbook, you EXERCISE


need to save it if you want to use it Create a new workbook and save it with the
again. Also, if you make changes to a file name “Saved Workbook.” Type your name
workbook you’ll want to save it. You in cell A1 and save the workbook with a new
can even save a copy of an existing name: “Updated Workbook”.
workbook with a new name, to a
different location, or using a different file type.
Save a New Workbook
1. Click the Save button on the Quick Access Toolbar. The Save As dialog box
appears.
Other Ways to Save:
Press <Ctrl> + <S>. Or, click the File tab and select Save.
2. Specify the drive and/or
folder where you want
to save your workbook.
The Save As dialog box
has several controls
that make it easy to
navigate to locations on
your computer:
›› Address bar: Click
a location in the
Address bar to open
it. Click the arrow
to the right of a
location to view a
list of folders within
that location. Select
a folder from the list Fig. 1.12. The Save As dialog box. The Documents library is the default
location for saving, but you can change the save location as necessary.
to open it.

Advance Spreadsheet Tools 27


›› Folders List: Shortcuts to common locations on your computer, such as
the Desktop and Documents library.
›› Search box: This searches the contents— including subfolders—of that
window for the text that you type. If a file’s name, file content, tags, or
other file properties match the searched text, it will appear in the search
results. Search results appear as you enter text in the search box.
3. Enter the file name in the File name text box.
4. Click Save.
Save Workbook Changes
Once you make changes to a workbook you’ve saved before, you need to save it
again.
1. Click the Save button on the Quick Access Toolbar.
Any changes you have made to the workbook are saved.
Other Ways to Save: Press <Ctrl> + <S>. Or, click the File tab and select

Save.
Table 1.3: Common Excel File Formats
File Type Description
Excel Workbook (.xlsx) The default format for Excel 2010workbooks.
Excel Macro-Enabled This file format supports macrosin Excel 2010.
Workbook (.xlsm)
Excel 97- Excel 2003 Workbooks in this format can beused by all versions of
Workbook (.xls) Excel. Does not support XML.
PDF (.pdf) Use this format for files you want to share, but do not
want to be changed.
Web page (.htm, .html) This format is used to create Webpages.
XML Data (.xml) This file type is used exclusively for XML-enabled
workbooks.
CSV (.csv) Use this to share workbook data with other programs
or lists, suchas databases.

28 Advance Spreadsheet Tools


Save a Workbook Under a Different name and/or Location
You can save another copy of a saved document using a new name or in a new
location.
1. Click the File tab and select Save As. The Save As dialog box appears.
2. Enter a different name for the file in the File name text box
Navigate to a new location to save the file as necessary.
3. Click Save.
Save A Workbook as a Different File Type
Just as some people can speak several languages, Excel can read and write in other
file formats, making it easier to share information between programs.
1. Click the File tab and select Save As. The Save As dialog box appears.
2. Click the Save as type list arrow and select a file format.
3. Click Save.

CLOSING A WORKBOOK

When you’re done working on a workbook, EXERCISE NOTES


you need to close it. Exercise File: Any open workbook.
Exercise: Close all open workbooks.
1. Click the File tab on the Ribbon and
select Close.
The workbook closes. You can access the file again by opening it later.
Other Ways to Close a Workbook: Press <Ctrl> + <W>. Or, click the Close
button in the upper right corner of the workbook window (do not confuse
this with the program Close button on the title bar).
Tip: If you have multiple workbooks open, clicking the active workbook’s
Close button only closes that one workbook. The other workbooks
remain open in the window until you click their close buttons as well.
 Trap: The Close button located in the title bar closes only the active
workbook if there is more than workbook open. However, if there is
only one workbook open, it closes the workbook and causes you to exit
the Excel program entirely.

Advance Spreadsheet Tools 29


Fig. 1.13. Closing a workbook.

USING HELP

When you don’t know how to do EXERCISE


something in Excel 2010, look up Search the term “formulas”. Browse topics in
your question in the Excel Help files. the “Formulas” category of Help.
The Excel Help files can answer your
questions, offer tips, and provide help for all of Excel’s features.

30 Advance Spreadsheet Tools


Search for Help
1. Click the Microsoft Excel Enter search Browse help topic

Help button ( ) on the keywords here. categories.

Ribbon.
The Excel Help window
appears.
Other Ways to Open the

Help window: Press <F1>.
2. Type what you want to
search for in the “Type words
to search for” box and press
<Enter>.
A list of help topics appears.
3. Click the topic that best
answers your question.
Excel displays information Fig. 1.14. The Excel Help window.
regarding the selected topic.
Browse for Help
1. Click the Microsoft Excel Help button ( ) on the Ribbon.
The Excel Help window appears.
2. Click the category that you want to browse. The topics within the selected
category appear.
3. Click the topic that best answers your question.
Excel displays information regarding the selected topic.
Choose the Help Source
If you are connected to the Internet, Excel 2010 retrieves help from the Office
Online database by default. You can easily change this to meet your needs.
1. Click the Search button list arrow in the Excel Help window.
A list of help sources appears.
2. Select an option from the list.
Now you can search from that source.

Advance Spreadsheet Tools 31


Tip: Office 2010 offers enhanced ScreenTips for many buttons on the
Ribbon. You can use these ScreenTips to learn more about what a button
does and, where available, view a keystroke shortcut for the command.
If you see the message “Press F1 for more help”, press <F1> to get more
information relative to that command.
When you are working in a dialog box, click the Help button ( ) in the up
per right-hand corner to get help regarding the commands in the dialog
box.
Table 1-4. Help buttons
Back Return to the previous help topic.

Return to move forward to the next help topic after


Forward clicking Back.
Stop Stop the transfer of information from the online Help
database.
Refresh Refresh the page to correct page layout or get the latest
data.
Home Click here to return to the Help home page.

Print Click here to print the current help topic.

Change Font Click here to change the size of the text in the Help
Size window.

Show Table Click here to browse for help using the Table of Contents.
of Contents
Keep On Top Click here to layer the Help window so that it appears
behind all other Microsoft Office programs.

EXITING EXCEL

When you’re finished using Excel 2010, EXERCISE


you should exit it. Exiting a program Exit the Microsoft Office Excel 2010 program.
closes it until you need to use it again.
1. Click the File tab.
2. Click the Exit button.

32 Advance Spreadsheet Tools


The Excel program window closes.
Other Ways to Exit Excel: If there is only one Excel program window open,

click the Close button in the title bar. Or, right- click the Excel button on the
taskbar and select Close window from the Jump List.
Exit the Excel program

Exit the Excel program


Fig. 1.15. There are two ways to exit Excel.

Tip: Having too many programs open at a time could slow down your
computer, so it’s a good idea to exit all programs that aren’t being used.

Program Fundamentals Review


QUESTIONS
1. Excel automatically opens with Windows. (True or False?)
2. Which of the following is NOT a new feature in Excel 2010?
(a) Backstage view (b) Improved picture editing
(c) The Ribbon (d) Paste with Live Preview

Advance Spreadsheet Tools 33


3. The Ribbon can be hidden so that only tab names appear. (True or False?)
4. The File tab contains basic file commands. (True or False?)
5. What is the Quick Access Toolbar?
(a) There are no toolbars in Excel 2010.
(b) What appears when you select text.
(c) A customizable toolbar of common commands that appears above or below the
Ribbon.
(d) An extension of the Windows taskbar.
6. Which of the following is NOT a common keystroke shortcut in Excel?
(a) <Ctrl> + <Alt> + <Delete> (b) <Ctrl> + <S>
(c) <Ctrl> + <O> (d) <Ctrl> + <Home>
7. You can only create a new workbook by launching the Excel program. (True or False?)
8. To open a workbook, click the File tab and select .
(a) Open (b) Find
(c) Look in (d) Search
9. Print settings and print preview appear side by side in Backstage view. (True or False?)
10. When you save a workbook with a different name, the old workbook is deleted. (True
or False?)
11. You can close a workbook which one of the following ways?
(a) Press <Ctrl> + <C>.
(b) Click and drag the workbook window to the Recycle Bin.
(c) Click the workbook’s Close button.
(d) Press <Delete>.
12. What key can you press to get help in Excel?
(a) <Esc> (b) <Ctrl> + <H>
(c) <F1> (d) <F11>
13. Which of the following are ways to exit Excel? (Select all that apply.)
(a) Click the File tab and click Exit Excel.
(b) Click the Office Button and click Close Excel.
(c) Click the Close button on the title bar.
(d) Click the Close button on the Quick Access Toolbar.

ANSWERS
1. False. You must start Excel to begin using it.
2. (c) The Ribbon was introduced in Excel 2007, so it is not new in Excel 2010. It has been
improved, however, so that it is possible to customize tabs and groups on the Ribbon.

34 Advance Spreadsheet Tools


3. True. Double-click a tab to hide the Ribbon, then click any tab to view commands once
again.
4. True. The File tab contains basic file commands, similar to the File menu of previous
versions.
5. (c) The Quick Access Toolbar is a customizable toolbar of common commands that
appears above or below the Ribbon.
6. (a) <Ctrl> + <Alt> + <Delete> is a Windows command, not an Excel command.
7. False. It’s true that a new workbook appears automatically when you open Excel.
However, that is not the only way to create a new workbook.
8. (a) Select Open and then navigate to the saved file you want to open.
9. True. In Backstage view, print settings appear alongside a preview of how the document
will look when printed.
10. False. The original workbook remains intact, with its original name.
11. (c) Click the Close button or press <Ctrl> + <W> to close a workbook.
12. (c) Press <F1> to access help in Excel.
13. A and (c) Click the File tab and click Exit, or click the Close button on the title bar.

Advance Spreadsheet Tools 35


Getting Started Chap
2
ter
with Worksheets
This chapter will show you the most basic tasks in Excel: entering labels and
numbers, and entering formulas.

USING EXERCISE FILES

This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and closethe
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the
exercisesin a chapter can be performed in succession from the first lesson to the
last.

NAVIGATING A WORKSHEET

Before you start entering data into a worksheet, EXERCISE NOTES


you need to learn how to move around in one. Exercise File: Sales2-1.xlsx
You must make a cell active by selecting it Exercise: Practice moving around in
before you can enter information in it. You can the worksheet using both the mouse
make a cell active by using: and keyboard.

›› The Mouse: Click any Cells are referenced as A1,


cell with the white A2, B1, B2, and so on, with
crosspointer. the letter representing a
column and the number
›› The Keyboard: Move representing a row.
the cell pointer using
thekeyboard’s arrow keys.
To help you know where you are in a worksheet, Excel displays row headings,
indentified by numbers, on the left side of the worksheet, and column headings,
identified by letters, at the top of the worksheet. Each cell in a worksheet has its
36 Advance Spreadsheet Tools
own cell address made Cells are referenced as A1,
from its column letter A2, B1, B2, and so on, with
and row number—such the letter representing a
column and the number
as cell A1, A2, B1, B2, etc.
representing a row.
You can immediately
find the address of a cell Fig. 2.1. Examples of cell references.

by looking at the Name


Box, which shows the current cell address.
1. Click any cell to make Table 2.1: Navigation Shortcuts
it active. Press To Move
The cell address → or <Tab> One cell to the right.
appears in the name ↑ or <Shift> + <Tab> One cell to the left.
box.
↓ or One cell up.
Now that you’re <Shift> + <Enter>
familiar with moving
↓ or <Enter> One cell down.
the cell pointer with
the mouse, try using <Home> To column A in the current row.
the keyboard. <Ctrl> + <Home> To the first cell (A1) in the
worksheet.
2. Press <Tab>.
<Ctrl> + <End> To the last cell with data in the
The active cell is one
worksheet.
cell to the right of the
previous cell. Refer to <Page Up> Up one screen.
Table 2-1: Navigation <Page Down> Down one screen.
Shortcuts for more <F5> or Opens the Go To dialog box
information on <Ctrl> + <G> where you can go to a specific cell
navigating shortcuts. address.
Tip: Excel 2010 worksheets have 1,048,576 rows and 16,384 columns!
To view the off-screen portions ofthe worksheet, use the scroll bars.
Using the <Ctrl> key with arrow keys is very powerful. These key
combinations jump to the edgesof data. For example, if you have a group
of data in columns A-G and another group in columns R-Z, <Ctrl> + <→>
jumps between each group of data.

Advance Spreadsheet Tools 37


ENTERING LABELS AND VALUES

Now that you’re familiar with worksheet EXERCISE NOTES


navigation in Excel, you’re ready to start Exercise File: Sales2-1.xlsx
entering data. There are two basic types of Exercise: Type the label “Sales and
information you can enter in a cell: Expenses” in cell A1. Enter the
Labels: Any information not used in following labels in cell range A7:A11:
calculations. Labels are used for headings in Supplies, Office, Salaries, Utilities,
Total
columns and rows, and as data in columns and
Enter the following values in the cell
rows. Excel treats cell data containing letters
range D4:F4: 18500, 16500, 15500
or non-numerical punctuation as text and
Enter today’s date in B13.
automatically left-aligns it inside the cell.
Values: Numerical data, including:
numbers, percentages, fractions,
currencies, dates, or times, usually
used in formulas or calculations.
Excel treats information that contains
numbers, dates or times as avalue and
automatically right-aligns it in the cell.
Excel even treats dates as
values, makes it possible to perform
calculations and formulas on the
labels. For example, you can subtract
one date from another to find how
many days are between them. You can
control how dates appear with cell Fig. 2.2. A worksheet with labels and values.

formatting.
1. Select the cell where you want to enter data.
2. Type the data in the cell.
3. Press the <Enter> or <Tab> key.
The cell entry is confirmed and the next cell becomes active.
Other Ways to Confirm a Cell Entry: Click the Enter button on the Formula Bar.
If the contents do not fit in the cell, the text spills into the empty cell to the
right. If that cell is not empty, Excel truncates the data so only part of it is
visible.

38 Advance Spreadsheet Tools


Tips
Table 2.2: Examples of Valid
• If you want to start a Date and Time Entries
label with a number, type
October 17, 2010 5:45 PM
an apostrophe at the
10/17/10 5:45 AM
beginning of the label.
This tells Excel that the 10-17-10 5:45
cell contents are a label, (Excel assumes
5:45 AM)
not a value.
17-Oct-10 17:45
• AutoComplete can help
(5:45 PM on a
you enter labels. Enter 24-hour clock)
the first few characters Oct-17 (Excel assumes 17:45:20
of a label; Excel displays the currentyear.)
(5:45 PM and 20
the label if it appeared seconds)
previously in the column.
Press <Enter> to accept the entry or resume typing to ignore the
suggestion.
• You can reformat dates after entering them. For example, if you enter
4/4/12, you can easily reformat to April 4, 2012. This is covered in
another lesson.

SELECTING A CELL RANGE AND ENTERING DATA IN A CELL RANGE

Selecting a Cell Range


To work with a range of cells, you need to know how to select multiple cells.
1. Click the first cell you want to select in EXERCISE NOTES
the cell range and hold the mouse button. Exercise File: Sales2-2.xlsx
2. Drag to select multiple cells. Exercise: Select the cell range E7:F10
As you drag, the selected cells are and then enter the data below in cell
range E7:F10.
highlighted.
E F
3. Release the mouse button. The cell range
7 2500 1500
is selected.
8 400 400
Other Ways to Select a Cell Range:

9 7000 7000
Select the first cell of the cell range. Press
10 3000 3000
and hold the <Shift> key and select the
last cell of the cell range.

Advance Spreadsheet Tools 39


Tips
• To select all the cells in a worksheet, click the Select All button
where the row and column headers come together, or press <Ctrl>
+ <A>.
• To select multiple non-adjacent cells, select a cell or cell range and
hold down the <Ctrl> key while you select other cells.
Entering Data in a Cell Range
When you have to enter a lot of
data, selecting the range makes
data entry easier and faster.
Selecting a range of cells restricts
the cell pointer so it can only move
inside the selected range.
1. Select the range of cells in
which you want to enter
data.
By selecting a range, you
restrict where the cell
pointer can move and can Fig. 2.3. Entering text in a selected cell range.

concentrate on data entry instead of moving the cell pointer back and forth.
2. Enter the data in the first cell. Press <Tab> or <Enter> to move on to the
next cell. Table 2.3: Navigating in a Selected Cell Range
When the active cells reaches the Down <Enter>
end of a column or row, the next Up <Shift> + <Enter>
time your press <Tab> or <Enter>,
Right <Tab>
the cell pointer moves to the next
Left <Shift> + <Tab>
cell in the selected range.
3. Click any cell in the worksheet to deselect the range.
Click to select the entire worksheet.

OVERVIEW OF FORMULAS AND CELL REFERENCES

This lesson introduces formulas and the EXERCISE


different elements that are required to write a Exercise: Understand how formulas
formula. are used in Excel.

40 Advance Spreadsheet Tools


Values
Values are any numerical data
entered in a worksheet. Once values
are entered in the worksheet, they
can be used in formulas.
Formulas
Formulas are values, but unlike
regular values, formulas contain
information to perform a numerical
calculation, such as adding,
subtracting, or multiplying. A cell
with the formula =5+3 will display the result of the calculation: 8.
All formulas must start with an equal sign (=). Then you specify more
information: the values you want to calculate and the arithmetic operator(s) or
function name(s) you want to use to calculate the values.
›› Operators are the basic symbols used in mathematics: + (plus), - (minus), /
(divide), * (multiply). In Excel, you use these just as you would to write out a
math problem.
›› Functions are used more often in Excel. Functions are pre-made formulas
that you can use as shortcuts, or to perform calculations that are more
complicated.
Relative and Absolute Cell References
Formulas can contain
numbers, like 5 or 8, but more
often they reference the contents
of cells. A cell reference tells Excel
where to look for values you want
to use in a formula. For example,
the formula =A5+A6 adds the
values in cells A5 and A6.
Using cell references is
advantageous because if you
change the values in the referenced cells, the formula result automatically updates
using the new values. There are two types of cell references: relative and absolute.
Relative: Relative references refer to cells in relation to the cell that contains
Advance Spreadsheet Tools 41
the formula. When the formula is moved, it references new cells based on their
location relative to the formula. Relative references are the default type of
references in Excel.
Absolute: Absolute
references always refer to
the same cell, even when the
formula is copied. Absolute
references are indicated with
dollar signs ($A$1) in formulas.
Pressing <F4> changes a cell
reference to absolute.

ENTERING FORMULAS

This lesson takes a look at how to enter EXERCISE NOTES


formulas in a cell. A formula starts with Exercise File: Sales2-3.xlsx
an equal sign, followed by: Exercise: In cell B11, total the values in B7:B10
In cell G4, multiply F4 by G2, making G2 an
›› Values or cell references joined
absolute cell reference.
by an operator.
In cell G7, multiply F7 by G2, making G2 an
Example: =5+3 or =A1+A2 absolute cell reference.
›› A function name followed by In cell C11, AutoSum the column C expense
parentheses containing values.
function arguments. Functions are the most common way to enter formulas
in Excel.
Example: =SUM(A1:A2)
Enter a formula with an operator
1. Click a cell where you want to
enter a formula.
2. Type =, then type cell references
and operators. You can also enter
the formula in the Formula Bar.
3. Press <Enter>.
The formula calculates the result
and displays it in the cell where
you entered it.
Fig. 2.4. Entering a formula in a worksheet.

42 Advance Spreadsheet Tools


Enter a Formula with a Function
1. Click a cell where you want to enter a formula.
2. Click the Insert Function button in the Formula Bar.
If you know the name of the function you want to use, you can type it out
instead of selecting it Table 2.4: Examples of Operators and Functions
from the Function button.
= All formulas start with an equal sign.
Other Ways to Enter
+ =A1+B1
a Function: Click the
Formulas tab on the - =A1-B1
Ribbon and click the * =B1*2
Insert Function button
/ =A1/C2
in the Function Library
group. SUM =SUM(A1:A3)
3. Select the function you AVERAGE =AVERAGE (A2,B1,C3)
want to use and click OK.
COUNT =COUNT(A2:C3)
The Function Arguments
dialog box appears.
4. Enter the function arguments and click OK. The result of the formula appears
in the cell.
Tips: You can use the Formula AutoComplete feature to help you create
and edit complex formulas. Type an = (equal sign) in a cell or the
Formula Bar and start typing the formula. A list of functions and names
that match the text you entered appears. Select an item from the list to
insert it into the formula.
Enter an Absolute Cell Reference
in a Formula
1. Enter the formula using
operators or functions.
2. Click the cell you want to
reference and press the <F4>
key.
Dollar signs $ are added to the
cell reference in the formula.
Fig. 2.5. A formula with a relative (F4) and an absolute
($G$2) cell reference.

Advance Spreadsheet Tools 43


Other Ways to Add an Absolute Cell Reference in a Formula:
Type the address of the cell with $ (dollar signs) before every reference
heading. (For example, type $B$4).
Total Values Automatically With Autosum
Adding up the values in a range
of cells is the most popular
formula in Excel, so they’ve
made this easy to do with the
AutoSum feature. AutoSum
inserts the SUM function (which
adds all the values in a range
of cells) and selects the range
of cells Excel thinks you want
totaled.
1. Click a cell next to the
column or row of numbers
you want to sum.
For example, if you want
to add up a column of
numbers, click the cell at Fig. 2.6. AutoSum automatically enters a SUM formula and selects
the bottom of the column. the cells it thinks you want to total.

Or, if you want to add up a row of numbers, click the cell to the right of the
row.
2. Click the Home tab and click the AutoSum button in the Editing group.
The SUM function appears in the cell and a moving dotted line appears
around the cell range that Excel thinks you want to sum. If the range is not
correct, click and drag to select the correct range.
Tip: Click the AutoSum button list arrow to choose from other common
functions, such as Average.
Other Ways to Enter AutoSum: Press <Alt> + <=> .
3. Press the <Enter> key to confirm the action.
The cell range is totaled in the cell. If you change a value in the summed
range, the formula will automatically update to show the new sum.

44 Advance Spreadsheet Tools


ENTERING CONTENT AUTOMATICALLY

Since entering data is a major task in EXERCISE NOTES


Excel, this lesson covers three tools
Exercise File: Sales2-4.xlsx
that make are very useful in data entry:
Exercise: Fill in the month labels in row 3. Labels
Fill, AutoComplete, and PickList. should start with Jan in column B and end with
Use Fill Jun in column G.
Fill is a great way to enter sequential Copy the formula in cell G7 to cells G8:G10.
Copy the formula in cell C11 over to columns
numbers, months or days quickly. Fill D, E, F, and G.
looks at cells that you have already
filled in and makes a guess about how you want to fill in the rest of the series. For
example, if you enter January, Fill will fill in the following months for you. You can
also use Fill to copy formulas to adjacent cells.
1. Select a cell or cell range that
contains the data and increment
you want to use.
Excel can detect patterns pretty
easily. A series of 1, 2, 3, 4 is
easy to detect, as is 5, 10, 15, 20.
It can also detect a pattern with
Fig. 2.7. Fill fills in months after January into the selected
mixed numbers and letters, cells. Notice that a screen tip previews the content
such as UPV-3592, UPV-3593, being filled into the cells.

UPV-3594.
Tip: If you select only one cell, that same value is copied to the adjacent
cells when you Fill—unless
Excel recognizes it as a date
or time, in which case it will
fill in the next logical date or
time period.
2. Position the mouse pointer over
the fill handle (the tiny box in the
cell’s lower-right corner) until the
pointer changes to a plus sign.
3. Click and drag the fill handle to
Fig. 2.8. Formulas that are copied with Fill are updated
the cells that you want to fill with relative to their location. This formula copied from C11 is
the information. updated to use cell references from the D column.

Advance Spreadsheet Tools 45


As you click and drag, a screen tip appears previewing the value that will be
entered in the cell once you release the mouse button.
Table 2.5: Fill Series Examples
Selected Cell(s) Entries in Next Three Cells
January February, March, April
Jan Feb, Mar, Apr
5:00 6:00, 7:00, 8:00
Qtr 1 Qtr 2, Qtr 3, Qtr 4
5 10 15, 20, 25
1/20/12 1/21/12, 1/22/12, 1/23/12
UPV-3592 UPV-3593, UPV-3594, UPV-3595
Control Fill Options
If Fill doesn’t enter cell content the way you
expected, you can correct the content using
AutoFill Options. This button appears after using
the Fill command, and it offers valuable control
over how the Fill command works.
1. Enter cell content using Fill.
After releasing the mouse button, the Fill
Options button appears.
2. Click the Fill Options button. Fig. 2.9. Click the AutoFill Options button to
choose a different result of the Fill.
A list of ways you can control the cell
content that is entered appears.
3. Select a fill option from the list.
The cell content is changed according to the fill option you chose.
Repeat Values in a Column
Excel’s AutoComplete feature helps speed up data entry, especially if you’re using
repetitive information.
1. Type the first few characters of a label.
Excel displays the label, if it appears previously in the column.
2. Press <Enter>.
Excel accepts the entry.
46 Advance Spreadsheet Tools
If a suggestion appears and you don’t want to use it, resume typing to ignore
the suggestion.
Select Contents From A List
The PickList is a list of data you’ve used and helps keep your information consistent.
1. Right-click the cell where you want to enter a label and select Pick from
Drop-down List from the contextual menu.
A list appears under the cell.
2. Select an entry from the list.
The data is entered and the list disappears.

Program Fundamentals Review


QUESTIONS
1. Pressto move the cell pointer one cell to the left.
(a) <Enter> (b) <Shift> + <Tab>
(c) The up arrow key (d) <Tab>
2. You can select all the cells in a worksheet at once. (True or False?)

ANSWERS
1. (b) Pressing <Shift> + <Tab> moves the cell pointer one cell to the left.
2. True. You can select all cells at once by pressing Ctrl + A.

Advance Spreadsheet Tools 47


Editing a Chap
3
ter
Worksheet
This chapter will show you how to edit your Excel worksheets. You’ll learn how to
edit cell contents; cut, copy and paste information; insert and delete columns and
rows; undo any mistakes you might make; and even correct your spelling errors.

USING EXERCISE FILES

This chapter suggests exercises to practice the topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and close the
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaining lesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the
exercises in a chapter can be performed in succession from the first lesson to the
last.

EDITING CELL CONTENTS

Once you’ve entered data into a EXERCISE NOTES


cell, you can edit, clear, or replace Exercise File: A Mileage3-1.xlsx
those cell contents. Exercise: Edit cell A1 so it reads “Mileage Report”.
Edit cell B3 so it reads “Destination”. Edit C3 to read
Edit Cell Contents
“Beginning”. Edit D3 to read “Ending”.
1. Double-click the cell you Clear the contents of cells G3:G10.
want to edit. The cell is in Edit the formula in F4 to use an absolute reference to
edit mode. F2 instead of the value “0.3”.
In Edit mode, the arrow Then copy the formula in F4 to F5:F12.
keys move from character to character in the cell instead of from cell to cell.
While Excel is in Edit mode you can also move the insertion point by clicking
the I-beam pointer where you want to insert text.
Other Ways to Enter Edit Mode: Select the cell. Click anywhere in the

Formula Bar, or press <F2>.
48 Advance Spreadsheet Tools
2. Edit the contents of the cell.
Use the arrow keys and the
<Delete> and
<Backspace> keys to help you
edit the cell contents.
3. Press <Enter>.
Other Ways to Edit Cell
Contents: Select the cell, then
edit the cell’s contents in the
Formula Bar and. Press <Enter>
or click the Enter button on the
Fig. 3.1. Clearing cell contents.
Formula bar.
Replace Cell Contents
1. Select the cell.
2. Enter new data.
3. Press <Enter>.
The newly typed information
replaces the previous cell
contents.
Clear Cell Contents
1. Select the cell.
2. Press <Delete>. Fig. 3.2. Replacing cell contents.

Other Ways to Clear Cell Contents: Under the Home tab on the Ribbon,
click the
Clear button in the Editing group.

Tip: Note that this clears the cell contents, not the actual cell.

COPYING AND MOVING CELLS

You can move or copy information in an Excel worksheet by cutting or copying,


and then pasting the cell data in a new place. You can work with one cell at a time
or ranges of cells.
Tip: You may cut, copy, and paste any item in a worksheet, such as clip
art or a picture, in addition to cell data.

Advance Spreadsheet Tools 49


Copy Cells
When you copy a cell, the selected cell
data remains in its original location
and is added to the Clipboard.
1. Select the cell(s) you want to copy.
Tip: If you want to cut or
copy only selected parts of a
cell’s contents, double-click
the cell to display a cursor
and select the characters
you want to cut.
2. Click the Home tab on the Ribbon
and click the Copy button in the
Clipboard group. Fig. 3.3. Copying and pasting a cell.

Other Ways to Copy Cells: Press <Ctrl> + <C>. Or, right-click the selection

and select Copy from the contextual menu.
3. Select the cell where you want to paste the copied content.
When you select a destination to paste a range of cells you only have to
designate the first cell where you want to paste the cell range.
4. Click the Home tab on the Ribbon and click the Paste button in the Clipboard group.
The copied cell data is pasted in the new location.
Other Ways to Paste Cells: Press <Ctrl> + <V>. Or, right-click where you
want to paste and select Paste from the contextual menu.
Move Cells
Moving cells typically involves a process of cutting and pasting. When you cut a
cell, it is removed from its original location and placed in a temporary storage area
called the Clipboard.
1. Select the cell(s) you want to move.
2. Click the Home tab on the Ribbon and click the Cut button in the Clipboard
group.
A line of marching ants appears around the selected cells and the message
“Select destination and press ENTER or choose Paste” appears on the status bar.

50 Advance Spreadsheet Tools


Other Ways to Cut Cells: Press <Ctrl> + <X>. Or, right-click the selection

and select Cut from the contextual menu.
3. Select the cell to which
you want to move the
cells.

When you select a
destination to paste a
range of cells, you only
have to designate the
first cell where you want
to paste the cell range.
4. Click the Home tab on
the Ribbon and click Fig. 3.4. When cells are cut and pasted, they are moved to a new
location in the worksheet.
the Paste button in the
Clipboard group.
The copied cell data is pasted in the new location.
Other Ways to Paste Cells:

Press <Ctrl> + <V>. Or, right-click where you want to paste and select Paste
from the contextual menu. Or, select the destination and press <Enter>.
Moving and Copying Cells Using the Mouse
Using the mouse to move and copy cells is even faster and more convenient
than using the cut, copy and
paste commands.
1. Select the cell(s) you
want to move.
2. Point to the border of the
cell or cell range.
3. Click and hold the mouse
button.
4. Drag the pointer to
where you want to move
the selected cell(s) and
then release the mouse
button.
Fig. 3.5. Moving a cell range using the mouse.

Advance Spreadsheet Tools 51


Tip: Press and hold the <Ctrl> key while clicking and dragging to copy
the selection.

CONTROLLING HOW CELLS ARE MOVED OR COPIED

You can control how cell content EXERCISE NOTES


looks or behaves when it is pasted. Exercise File: Mileage3-3.xlsx
For example, you can keep the Exercise: Use Paste Options to copy the values only
data’s formatting, or have it take from E4:E12 to E14:E22.
on the formatting properties of the Enter the value 1.25 in cell G4. Use paste special to
destination cells. multiply E4:E12 by this value.

Use Paste Options


You can control how content is pasted in yourspreadsheets using the Paste Options
in Excel.
1. Paste the content in the spreadsheet and click the Paste Options button.
The Paste Options button
appears in the lower-
right corner of the pasted
content. A list of different
ways you can paste the
content appears.
Other Ways to Use Paste

Options: Before pasting,
click the Paste button list
arrow in the Clipboard
group on the Home tab
and select a paste option Fig. 3.6. The Paste Options button appears after pasting so you can
specify how data is pasted into your worksheet.
from the list.
Tip: The options available depend on the type of content being pasted.
For example, content that contains formulas will have more paste
options than content that contains only text.
2. Point at a paste option.pasting so you can specify how data is pasted into
your worksheet.
A live preview of how the content will look using that paste option appears.
3. Click a paste option.

52 Advance Spreadsheet Tools


The data is pasted using the selected option.
Table 3.1: Paste Option Commands
Paste using default Paste only values from
Values
Paste settings. cells.
Formulas Paste only formulas Paste the values and
Values
from cells. number formatting
& Number
from cells.
Formatting

Formulas Paste formulas and Values & Source Paste the values and all
& Number number formatting. Formatting formatting from source
Formatting cells.

Keep Source Paste using formatting Formatting Paste only the


Formatting from the original cells. formatting used in
source cells.

No Borders Remove borders from Paste Link Paste a link to the


pasted cells. selected cells.
Keep the width of the Picture Paste a picture of the
Keep Source
original cells. selected cells.
Column Widths

Transpose Flip the data so the rows Linked Picture Paste a picture of the
are flipped to columns cells with a link to the
and vice versa. original cells.

Use Paste Special Commands


You can also control how content is pasted using the Paste Special command.
1. Copy or cut an item as you normally would.
2. Click the cell where you want
to paste the item.
3. Click the Home tab and click
the Paste button list arrow in
the Clipboard group.
Now open the Paste Special
dialog box.
4. Select Paste Special.
The Paste Special dialog box
appears.
Fig. 3.7. Paste Special multiplies the value of the copied cell
(G4) with the values in the selected cell range (E4:E12).

Advance Spreadsheet Tools 53


Other Ways to Open Paste Special: Press <Ctrl> + <Alt> + <V>.

5. Select a paste option and click OK.
The content is pasted into the spreadsheet using the selected option.
6. Press <Enter>.
The pasted content is deselected.
Table 3.2: Paste Special Commands
Paste Option Description
All Pastes all cell contents and formatting. Same as the Paste
command.
Formulas Pastes only the formulas as entered in the formula bar.
Values Pastes only the values as displayed in the cells.
Formats Pastes only cell formatting. Same as using the Format
Painter button.
Comments Pastes only comments attached to the cell.
Validation Pastes data validation rules for the copied cells to the
paste area.
All using Source theme Pastes all cell contents and formatting, including the
theme, if one was applied to the source data.
All except borders Pastes all cell contents and formatting applied to the
copied cell except borders.
Column widths Pastes only the width of the source cell’s column to the
destination cell’s column.
Formulas and number Pastes only the formulas and number formats.
formats
Values and number Pastes only the values and number formats.
formats
Operation (several Specifies which mathematical operation, if any, you want
options) to apply to the copied data.
Skip blanks Avoids replacing values in your paste area when blank
cells occur in the copy area.
Transpose Changes columns of copied data to rows, and vice versa.
Paste Link Links the pasted data to the source data by pasting a
formula reference to the source data.

54 Advance Spreadsheet Tools


COLLECTING ITEMS TO MOVE OR COPY

If you do a lot of cutting, copying,


EXERCISE NOTES
and pasting you will appreciate
Exercise File: Mileage3-4.xlsx
the Office Clipboard. The
Clipboard lets you collect Exercise: Display the Clipboard. Copy these cell ranges:
A6:F6; A10:F10; A12:F12.
multiple cut or copied items at
Paste the copied items in A14, A15, and A16.
a time, which you can then
Close the Clipboard and clear the contents of cells
paste as needed. You can even A14:F16.
use it to collect and paste items
from other Office programs.
1. Click the Home tab on
Table 3-3: Icons in the Clipboard Task Pane
the Ribbon and click the
Dialog Box Launcher Content cut or copied from Microsoft
in the Clipboard group. Excel.

The Clipboard task Content cut or copied from Microsoft
pane appears along the PowerPoint.
left side of the window. Content cut or copied from Microsoft
2. Cut and copy items as Word.
you normally would. Content cut or copied from Microsoft

The Clipboard can Outlook.
hold 24 items at a Cut or copied graphic object.
time. As long as the
Clipboard is open, it Web page contents cut or copied from a
collects items that are Webbrowser.
cut or copied from all
Content cut or copied from a program
Office programs. The
other thanMicrosoft Office.
icon next to each item
indicates the program the item is from. See Table 3-3: Icons in the Clipboard
Task Pane for examples of some common icons.
3. Click where you want to paste an item from the Clipboard.
4. Click the item in the Clipboard. The item is pasted in the workbook.
Tips
• While the Clipboard is displayed, each cut or copied item is saved to
the Clipboard. If the Clipboard is not displayed, the last cut or copied
item is replaced.
Advance Spreadsheet Tools 55
• To remove an item from the Clipboard, click the item’s list arrow and
select Delete. Click the Clear All button in the task pane to remove
all items from the Clipboard.

Copied and cut


items appear in the
Clipboardtask pane.

Click to control
how the Clipboard
operates.
Fig. 3.8. A worksheet with the Clipboard task pane displayed.

CHECKING YOUR SPELLING

You can use Excel’s spell checker


EXERCISE NOTES
to find and correct spelling
Exercise File: Mileage3-5.xlsx
errors in your worksheets.
Exercise: Run spell check and correct spelling for the
To check the spelling of a entire worksheet.
worksheet all at once, use the
Spelling dialog box.
1. Click the Review tab on the Ribbon and click the Spelling button in the
Proofing group.
Excel begins checking spelling with the active cell.
Tip: Depending on which cell is active when you start the spell check,
you may see a dialog box that asks you if you want to start your spell
check from the beginning of the sheet. Select Yes.
Other Ways to Check Spelling: Press <F7>.
If Excel finds an error, the Spelling dialog box appears with the misspelling

56 Advance Spreadsheet Tools


in the “Not in
Dictionary” text box.
You have several
options to choose
from when the
Spelling dialog box
opens:
›› Ignore Once:
Accepts the
spelling and
moves on to the
Fig. 3.9. The Spelling dialog box.
next spelling
error.
›› Ignore All: Accepts the spelling and ignores all future occurrences of the
word in the worksheet.
›› Add to
Dictionary: If
a word is not
recognized in
the Microsoft
Office Dictionary,
it is marked as
misspelled. This Fig. 3.9. This message appears when
Excel is finished checking the worksheet.
command adds
the word to the dictionary so it is recognized in the future.
›› Change: Changes the spelling of the word to the spelling that is selected
in the Suggestions list.
›› Change All: Changes all occurrences of the word in the worksheet to the
selected spelling.
 Trap: Exercise caution when using this command—you might end up
changing something you didn’t want to change.
›› AutoCorrect: Changes the spelling of the word to the spelling that is
selected in the Suggestions list, and adds the misspelled word to the
AutoCorrect list so that Excel will automatically fix it whenever you type
it in the future.

Advance Spreadsheet Tools 57


2. If the word is spelled incorrectly, select the correct spelling from the
Suggestions list. Then click Change, Change All, or AutoCorrect. If the word
is spelled correctly, click Ignore Once, Ignore All, Add to Dictionary.
Excel applies the command and moves on to the next misspelling.
Once Excel has finished checking your worksheet for spelling errors, a dialog
box appears, telling you the spelling check is complete.
3. Click OK.
The dialog box closes.
Turn the Spell Checker ON Or OFF
By default, Excel checks for spelling errors as you type. To turn this feature on or off:
1. Click the File tab on the Ribbon and click the Options button.
The Excel Options dialog box appears.
2. Click the Proofing tab and click the Check spelling as you type check box.
3. Click OK.
Tip: The AutoCorrect feature automatically corrects commonly
misspelled words for you as you type.

INSERTING CELLS, ROWS, AND COLUMNS

While working on a worksheet, EXERCISE NOTES


you may need to insert new Exercise File: Mileage3-6.xlsx
cells, columns, or rows. When Exercise: Insert new cells in A2:F2 and shift cells down.
Insert news cells in F3:F13 and shift cells to the right.
you insert cells, the existing
Insert two new rows above row 2.
cells shift to make room for
the new cells.
Insert Cells
1. Select the cell or cell range
where you want to insert cells.
The number of cells you select
is the number of cells that will
be inserted.
2. Click the Home tab on the
Ribbon and click the Insert
button list arrow in the Cells
Fig. 3.11. Existing cells shift down to make room
group. Select Insert Cells. for the inserted cells.

58 Advance Spreadsheet Tools


The Insert dialog box appears. Here you can tell Excel how you want to move
the existing cells to make room for the new ones by selecting “Shift cells
right” or “Shift cells down.”
You can also select “Entire row” or “Entire column” in the Insert dialog box
to insert an entire row or column and not just a cell or cells.
3. Select the insert option you want to use and click
Other Ways to Insert Cells: Right-click the selected cell(s) and select Insert

from the contextual menu. Select an option and click OK.
Insert Rows or Columns
1. Select the row heading below or
column heading to the right of where
you want to insert the new row or
column.
The number of row or column headings
you select is the number of row or
columns that will be inserted.
2. Click the Home tab on the Ribbon and
click the Insert list arrow in the Cells
group. Select Insert Rows or Insert Fig. 3.12. The Insert dialog box.
Columns.
The row or column is inserted. Existing rows are shifted downward, while
existing columns are shifted to the right.
Other Ways to Insert Rows or Columns: Right-click a row or column

heading and select Insert from the contextual menu.

DELETING CELLS, ROWS, AND COLUMNS

You can quickly delete existing cells, columns, EXERCISE NOTES


or rows from a worksheet. When you delete Exercise File: Mileage3-7.xlsx
cells the existing cells shift to fill the space left Exercise: Delete rows 2, 3, and 4.
by the deletion. Delete cells F2:F12 and shift cells left.

Delete Cells
1. Select the cell(s) you want to delete.
2. Click the Home tab on the Ribbon and click the Delete list arrow in the Cells
group. Select Delete Cells.

Advance Spreadsheet Tools 59



The Delete dialog box
appears. Here you can tell
Excel how you want to move
the remaining cells to cover
the hole left by the deleted
cell(s) by selecting “Shift cells
left” or “Shift cells up.”
Tip: You can also select
Entire row or Entire
column in the Delete
dialog box to delete an Fig. 3.13. Existing cells shift up to replace deleted cells.
entire row or column.
3. Select an option and click OK.
The cell(s) are deleted and the remaining cells are shifted.
Trap: Pressing the <Delete> key only clears a cell’s contents; it doesn’t
delete the actual cell.
Other Ways to Delete Cells: Right-click the selection and select Delete from
the contextual menu. Select an option and click OK.
Delete Rows or Columns
1. Select the row or column heading(s) you
want to delete.
2. Click the Home tab on the Ribbon and click
the
Delete button in the Cells group.
The rows or columns are deleted. Remaining
rows are shifted up, while remaining
columns are shifted to the left. Fig. 3.14. The Delete dialog box.
Other Ways to Delete Rows or Columns:
Select the column or row heading(s) you want to delete, right-click any of
them, and select Delete
from the contextual menu. Or, click the Delete list arrow and select Delete
Sheet Rows or Delete Sheet Columns. The row or column of the active cell
is deleted.

60 Advance Spreadsheet Tools


USING UNDO AND REDO

The undo and redo EXERCISE NOTES


commands are very useful Exercise File: Mileage3-8.xlsx
commands for working Exercise: Delete the contents of cell A1. Undo the action,
with cell contents and cell then redo the action.
formatting. Enter “.35” in F2. Delete rows 4 and 5. Undo both actions,
then redo both actions.
Undo an Action
Undo does just that—it undoes any actions as though they never happened.
1. Click the Undo button on the Quick Access Toolbar.
Your last action is
undone. For example,
if you had deleted
an item and then
decided you wanted
to keep it after all,
undo would make it
reappear.
Other Ways to Undo:

Press <Ctrl> + <Z>.
Redo an Action
Redo is the opposite of undo:
it redoes an action you have
undone. For example, if you
decide that you do, after all,
want to delete an item that
you have just brought back
with undo, you can redo the
delete action.
1. Click the Redo button
on the Quick Access
Toolbar. The last action
Fig. 3.15. Using the Undo command.
you undid is redone.
Other Ways to Redo an Action: Press <Ctrl> + <Y>.

Tip: Click the Redo button list arrow to redo multiple actions.

Advance Spreadsheet Tools 61


Undo or Redo Multiple Actions
1. Click the Undo button list arrow or Redo button list arrow on the Quick
Access Toolbar.
A list of the actions in Excel appears. To undo or redo multiple actions, point
to the command you want to undo or redo.
For example, to undo the last three actions, point at the third action in the
list. Each action done before the one you select is also undone.
Tip: You can undo or redo up to 100 actions in Excel, even after saving
the workbook.
2. Click the last action you want to undo or redo in the list.
The command you select and all subsequent actions are undone or redone.

FINDING AND REPLACING CONTENT

Don’t waste time scanning


EXERCISE NOTES
your worksheet for labels and
Exercise File: Mileage3-9.xlsx
values that you want to replace
Exercise: Find all instances of “Minneapolis” in the
with something new: Excel’s worksheet.
find and replace commands Replace all instances of “Mankato” with “Blaine”.
can do this for you with just a
few clicks of your mouse.
Find
The Find feature
makes it very easy to find
specific words and values
in a worksheet.
1. Click the Home
tab on the Ribbon
and click the Find
& Select button in
the Editing group.
Select Find from
the list.
The Find tab of the
Find and Replace
Fig. 3.16. Opening the Find and Replace dialog box.
dialog box appears.
62 Advance Spreadsheet Tools
Other Ways to Find Text: Press <Ctrl> + <F>.
2. Type the text or value you want to find in the “Find what” text box.
3. Click the Find Next
button.
Excel jumps to the
first occurrence of
the word, phrase,
or value that you
entered.
4. Click the Find Next Fig. 3.17. The Find tab of the Find and Replace dialog box.

button again to move on to other occurrences. When you’re finished, click


Close.
Replace
Replace finds specific
words and values, and
then replaces them with
something else.
1. Click the Home tab
on the Ribbon and
Fig. 3.18. The Replace tab of the Find and Replace dialog box.
click the Find &
Select button in the Editing group. Select Replace from the list.
The Replace tab of the Find and Replace dialog box appears.
Other Ways to Replace Text: Press <Ctrl> + <H>.

2. Type the text or value you want replace in the “Find what” text box.
3. Type the replacement text or value in the “Replace with” text box.
4. Click the Find Next button.
Excel jumps to the first occurrence of the word, phrase, or value in the “Find
what” box.
5. Choose how you want to replace the text:
Replace: Click to replace the current item.

Replace All: Click to replace each item found in the document. Use this command

with caution: you might replace something you didn’t want to replace.
6. Click Close.

Advance Spreadsheet Tools 63


Search Options
Use Excel’s search options to
change how Excel searches in
the document.
1. Click the More button
in the Find and Replace
dialog box to specify
how to search for data.
Fig. 3.19. The Find and Replace dialog box with search options displayed.

Table 3-4: Find and Replace Search Options describes the Search Options
available under the Find and Replace tabs.
 Trap: If you specify Search Options, make sure to turn them off when
you are finished. Otherwise, subsequent find or replace commands will
use the same search options.
Table 3-4: Find and Replace Search Options
Within Choose whether to search within just the current sheet or the
entire workbook.
Search Search by rows (left to right, then top to bottom) or columns (top
to bottom, then left to right).
Look in Specify which kinds of data you want to search in, such as formulas,
values, or comments.
Match case Searches exactly as text is typed in the text box.
Match entire cell Searches only for cells that match the contents in the text box
contents entirely. Parts of phrases or words are not included.
Format button Specify formatting characteristics you want to find attached to the
text in the Find what text box.

ADDING COMMENTS TO CELLS

Sometimes you may need EXERCISE NOTES


to add notes to a workbook Exercise File: Mileage3-10.xlsx
to document complicated Exercise: Add a comment to cell A10 that reads, “This
date may be incorrect.”
formulas or questionable
View the comment.
values, or to leave a comment
Edit the comment to add the sentence, “Would you
for another user. Excel’s cell please check my receipts to verify this?”
comments command helps Delete the comment.

64 Advance Spreadsheet Tools


you document your worksheets and make them easier to understand. Think of cell
comments as Post-It Notes that you can attach to any cell. Cell comments appear
whenever you point at the cell they’re attached to.
Insert a Comment
1. Click the cell you want
to attach a comment to.
2. Click the Review tab
on the Ribbon and click
the
New Comment button
in the Comments group.
3. Type a comment.
4. Click outside the
comment area when
you’re finished.
Other Ways to Insert

a Comment: Right-
click the cell you want
to attach a comment Fig. 3.20. Cells with comments have a red comment indicator in the
upper right corner of the cell.
to and select New
Comment from the contextual menu. Type a comment.
View a Comment
1. Point to the red triangle-shaped comment marker that’s located in the cell
with the comment.
Tip: To display a comment all the time, click the cell with the comment,
then click the Review tab on the Ribbon and click the Show/Hide
Comments button in the Comments group. Or, click the Show All
Comments button in the Comments group to display all the comments
in a worksheet at once.
Edit a Comment

1. Click the cell that contains the comment you want to edit.
2. Click the Review tab on the Ribbon and click the Edit Comment button in
the Comments group.
Advance Spreadsheet Tools 65
3. Edit the comment.
You can change the size of a comment text box by clicking and dragging one
of the eight sizing handles that surrounds the comment.
4. Click outside the comment area when you’re finished.
Other Ways to Edit a Comment: Right-click the cell with the comment you

want to edit and select Edit Comment from the contextual menu. Edit the
comment.
Delete a Comment
1. Click the cell that contains the comment you want to delete.
2. Click the Review tab on the Ribbon and click the Delete button in the
Comments group.
Other Ways to Delete a Comment: Right-click the cell you want to delete

and select Delete Comment from the contextual menu.

Program Fundamentals Review


QUESTIONS
1. You can replace cell contents by typing over the current contents. (True or False?)
2. To copy cells using the mouse, press and hold the key while clicking and dragging
the selection.
(a) <Alt> (b) <Ctrl>
(c) <Shift> (d) <F4>
3. The Paste Options button appears after pasting cells in Excel. (True or False?)
4. With the Paste Special command, you can choose to paste only .
(a) values (b) formulas
(c) cell comments (d) All of these are correct.
5. The Office Clipboard is available in other Office programs besides Excel. (True or
False?)
6. Which button should you click to leave misspelled text alone and move to the next
questionable word?
(a) Ignore Once (b) Ignore All
(c) Add to Dictionary (d) Change
7. When you insert a row, the existing rows are shifted in which direction?
(a) Left (b) Upward
(c) Downward (d) Right

66 Advance Spreadsheet Tools


8. Pressing the <Delete> key deletes the selected cell and its contents. (True or False?)
9. You can undo multiple actions in Excel. (True or False?)
10. To access the find and replace commands, click the Find & Select button in the g r o u p
on the Home tab.
(a) Editing (b) Cells
(c) Number (d) Clipboard
11. You can delete a cell comment, but you can’t edit one. (True or False?)

ANSWERS
1. True. Simply click a cell and type to replace its contents.
2. (b) Press and hold the <Ctrl> key to copy cells using the mouse.
3. True. The Paste Options button appears after pasting cells in Excel.
4. (d) You can use the Paste Special command to paste any of these elements.
5. True. The Office Clipboard can be used in all Office programs.
6. (a) Click the Ignore Once button to leave text alone and move to the next questionable
word.
7. (c)The existing rows are shifted downward when you insert a row.
8. False. Pressing the <Delete> key only deletes the cell’s contents.
9. True. You can undo multiple actions in Excel.
10. (a) Editing
11. False. You can edit or delete a cell comment.

Advance Spreadsheet Tools 67


Getting Started Chap
4
ter
with Worksheets
You probably have a few colleagues that dazzle everyone at meetings with their
sharp-looking worksheets that use colorful fonts and borders.
This chapter explains how to format a worksheet to make it more visually
attractive and easier to read.
You will learn how to change the appearance, size, and color of text and how
to align text inside a cell. You will learn how to add borders and shading andhow
to use cell styles, as well as many other tools that will help your worksheetslook
more organized and professional.

USING EXERCISE FILES

This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and close
the exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep
the file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the
exercisesin a chapter can be performed in succession from the first lesson to the
last.

FORMATTING TEXT

You can emphasize text


EXERCISE NOTES
in a worksheet by making
Exercise File: Sales4-1.xlsx
the text darker and heavier
Exercise: Format cell A1 with 14 pt Cambria font, then
(bold), slanted (italics), or in format the cell ranges B3:G3 and A4:A12 with bold
a different typeface (font). The Cambria font.
Font group on the Home tab
makes it easy to apply character formatting.

68 Advance Spreadsheet Tools


1. Click the cell(s) with the label you want to format.
2. Click the Home tab on
the Ribbon and click a
formatting button in the
Font group.
The text is formatted.
Other Ways to
Format Text: Right-
click the cell(s) you
want to format. Click a
formatting button on the
Mini Toolbar. Or, right-
click the cell(s) you want
to format and select
Format Cells from the
contextual menu or Fig. 4.1. The Format Cells dialog box

click the Dialog Box Table 4-1: Font Formatting Buttons


Launcher in the Font group. Make text darker and
Select formatting options on heavier.
the Font tab in the Format Cells Bold
dialog box. Make text slant.
Tips Italic
• To use different font Add a line or double
formats for different line under text.
Underline
characters within the
Select a different
same cell, make the
font.
formatting changes while Font
in edit mode. Adjust font size.
• The formatting buttons Font Size
in the Font group, such as
Adjust font size by
Font Color and Font Size, one increment,either
are not just for formatting Increase/Decrease larger or smaller.
labels—you can use them Font Size
to format values as well. Adjust text color.

Font Color

Advance Spreadsheet Tools 69


• Text is often called a “label” in Excel, because text usually acts as a
label to the data in the worksheet.

FORMATTING VALUES

Applying number formatting EXERCISE NOTES


changes how values are
Exercise File: Sales4-2.xlsx
displayed—it doesn’t change
Exercise: Format the cell range B4:G12 with the
the actual information. Excel Accounting number format and decrease the decimal
is often smart enough to apply places so no decimals are shown.
some number formatting Select the range B6:G10 and display the Format Cells
automatically. For example, if dialog box. Select the Accounting category and remove
you use a dollar sign to indicate the dollar symbols from the range (select None as the
currency, such as $548.67, symbol).
Excel will automatically apply the currency number format for you.
1. Click the cell(s) with the value(s) you want to format.
2. Click the Home tab on
the Ribbon and click a
formatting button in the
Number group.

The values are
formatted. See the
table below for more
information on buttons
in the Number group.
Other Ways to Format

Values: Right-click
the cell(s) you want
to format. Click a
formatting button on the
Mini Toolbar. Or, right-
click the cell(s) you want
to format and select Fig. 4.2. Formatted values.

Format Cells from the


contextual menu or click the Number group’s Dialog Box Launcher.
Select formatting options on the Number tab in the Format Cells dialog box.

70 Advance Spreadsheet Tools


Tips
• Create custom number formats in the Format Cells dialog box by
selecting the Custom category, selecting a number format code in
the list, and editing it in the Type text box. Watch the sample area to
see how the custom number format you create will be displayed.
• The formatting buttons in the Font group, such as Font Color and
Font Size, are not just for formatting labels—you can use them to
format values as well.
Table 4-2: Number Formatting Buttons
1000 Select from several number formats—like General,
Number, or Time—orclick More to see all available
Number Format
formats.
$1,000.00 Apply the Accounting number format, which adds
Accounting a dollar sign ($) anddecimal point.
NumberFormat
100% Apply the Percent format, which converts the
Percent Style value to a percentage and addsa percent symbol
(%).
1,000 Add a thousands separator.
Comma Style
1000.00 or Increase or decrease the number of digits shown
Increase/Decrease 1000.0 after the decimal point.
Decimal

ADJUSTING ROW HEIGHT AND COLUMN WIDTH

When you start working on


EXERCISE NOTES
a worksheet, all the rows and
columns are the same size. As Exercise File: Sales4-3.xlsx
you enter information into the Exercise: Adjust the width of column A to 13.00 points
and the height of row 1 to 24.00 points.
worksheet, you will quickly
AutoFit columns B through G.
discover that some of the
columns or rows are not large enough to display the information they contain.

Advance Spreadsheet Tools 71


Adjust Column Width
1. Point to the column header’s
right border until the pointer
changes to a .
2. Click and drag to the left or
right to adjust the width.
A dotted line appears as you
drag, showing you where the
new column border will be.
Other Ways to
Adjust
Column Width:
Right-click the column
header(s), select Column
Width from the contextual Fig. 4.3. Increasing the width of column A.

menu, and enter the column width. Or, select the column header(s), click the
Format button in the Cells group on the Home tab, select Width, and enter
column width.
Adjust Row Height
1. Point to the row header’s bottom border until the pointer changes to a .
2. Click and drag up or down to adjust the height.
A dotted line appears as you drag, showing you where the new row border
will be.
Other Ways to Adjust Row Height: Right-click the row header(s), select

Row Height from the contextual menu, and enter the row height. Or, select
the row header(s), click the Format button in the Cells group on the Home
tab, select Height, and enter the row height.
AutoFit Columns or Rows
The AutoFit feature automatically resizes columns or rows to fit the cell in each
column or row that has the widest or tallest contents.
1. Double-click the right border of the column(s) or bottom border of the
row(s).
Tip: To AutoFit multiple rows or columns, select the rows and columns,
then double-click the corresponding border to adjust all selected rows
or columns.
72 Advance Spreadsheet Tools
WORKING WITH CELL ALIGNMENT

By default, the contents of a EXERCISE NOTES


cell appear at the bottom of
Exercise File: Sales4-4.xlsx
the cell, with values (numbers)
Exercise: Center align the labels in cells B3:G3. Merge
aligned to the right and labels and center the label “Income & Expenses” across cells
(text) aligned to the left. This A1:G1.
lesson explains how to control
the alignment of data in a cell.
1. Select the cell(s) you want to align.
2. Click the Home tab on the Ribbon and click an
alignment button in the Alignment group.
The cell contents are realigned. See Table 4-3:
Cell Alignment Buttons in the Alignment Group
for more information about alignment options in
Excel.
Other Ways to Align Cells: Right-click the cell(s) Fig. 4.4. An example of horizontal

you want to align. Click an alignment button on alignment options.

the Mini Toolbar. Or, right-


click the cell(s) you want
to align and select Format
Fig. 4.5. An example of vertical alignment options.
Cells from the contextual
menu or click the Dialog Box Launcher in the Alignment group. Select
alignment options on the Alignment tab in the Format Cells dialog box.
Table 4-3: Cell Alignment Buttons in the Alignment Group
Align cell contents to the top, middle, or bottom of the
cell using these three buttons.
Top/Middle/Bottom Align
Align cell contents to the left side, center, or right side
of the cell using these three buttons.
Align Left/Center/Right
Align cell contents diagonally or vertically.

Orientation
Increase or decrease the margin between the cell
contents and the cell border with these two buttons.
Decrease/Increase Indent

Advance Spreadsheet Tools 73


Make all cell contents visible by displaying them on
multiple lines within the cell (this increases the row’s
Wrap Text
height).
Select from a few options for merging cells together
and centering cell contents within the merged cells.
Merge & Center list arrow

ADDING CELL BORDERS AND BACKGROUND COLORS

Adding cell borders and filling EXERCISE NOTES


cells with colors and patterns Exercise File: Sales4-5.xlsx
can make them more attractive, Exercise: Add a bottom border to cells B3:G3 and B9:G9.
organized and easy to read. Add a light blue fill color (Accent 1, Lighter 80%) to the
Income & Expenses merged cell.
Add a Cell Border
Borders are lines that you
can add to the top, bottom,
left, or right of cells.
1. Select the cell(s) you
want to add the border
to.
2. Click the Home tab on
the Ribbon and click
the Border list arrow
in the Font group.
A list of borders you Fig. 4.6. Worksheet with cell borders and a background color applied.
can add to the selected
cell(s) appears. Use the examples shown next to each border option to guide
your decision.
If the border configuration you want doesn’t appear in the list, add one
border at a time.
3. Select a border type. The border is applied.
Tip: To remove a border, click the Border list arrow in the Font group
and select No Border.
Notice that the border option you chose now appears as the selected border
type on the Border button. If you want to apply the some border to another
cell, just click the Border button.
74 Advance Spreadsheet Tools
Other Ways to Add a Border: Right-click the cell(s) you want to add the
border to. Click the Border list arrow on the Mini Toolbar and select a border.
Or, right-click the cell(s) you want to format and select Format Cells from
the contextual menu or click the Dialog Box Launcher in the Font group.
Click the Border tab in the Format Cells dialog box and select border options.
Draw a Cell Border
Sometimes it’s easier to draw
the borders you want to use in
cells, so you can see the borders
as they are applied.
1. Click the Border button
list arrow in the Font
group of the Home tab and
select Draw Border.
The cursor changes into a
pencil shape.
2. Click and drag the cell
gridlines where you want
to apply the border. Fig. 4.7. The Format Cells dialog box with the Border tab displayed.
The borders are applied to cells as indicated.
Tip: To change the style or color of the lines used by the Draw Border
tool, click the Border button list arrow in the Font group and select the
Line Color and Line Style you want to use.
Add a cell Background Color
Fill the background of a cell by adding a color or pattern.
1. Select the cell(s) you
want to add the color to.
2. Click the Home tab on
the Ribbon and click
the Fill Color list arrow
in the Font group.
A list of colors you can
add to the selected
cell(s) appears.
Fig. 4.8. Click and drag the Draw Border tool to add borders to cells.

Advance Spreadsheet Tools 75


3. Select the color you want to
use. The fill color is applied.
Notice that the color you
chose now appears as
the selected color on the
button. If you want to apply
the shading to another
paragraph, just click the
button to apply the displayed
shading color.
Other Ways to Apply

Background Color: Right-
click the cell selection and
click the Fill Color list arrow Fig. 4.9. The Fill tab of the Format Cells dialog box.
on the Mini Toolbar. Select a color. Or, right-click the cell(s) you want to
format and select Format Cells from the contextual menu or click the Dialog
Box Launcher in the Font group. Click the Fill tab in the Format Cells dialog
box and select a background color or fill effects.
Tip: You can use an image as the background of a worksheet. Click
the Page Layout tab and click the Background button. Browse to and
select the image you want to use as the worksheet background. Click
Insert.

COPYING FORMATTING

If you find yourself applying EXERCISE NOTES


the same cell formatting again
Exercise File: Sales4-6.xlsx
and again, then you should
Exercise: Use the Format Painter to copy the value
familiarize yourself with formatting from the cell B4 to the range B10:G10.
the Format Painter tool. The
Format Painter allows you to copy the formatting of a cell or cell range and apply
it elsewhere.
1. Select the cell(s) with the formatting you want to copy.
2. Click the Home tab on the Ribbon and click the Format Painter button in
the Clipboard group.

76 Advance Spreadsheet Tools


Other Ways to Access the Format Painter Button: Select the cell(s) with
the formatting
options you want to
copy, then right-click
the selection. Click
the Format Painter
button on the Mini
Toolbar.
The mouse pointer
changes to indicate it
is ready to apply the
copied formatting.
Tip: Single-click
the Format
Painter button
to apply copied
formatting once.
Double-click the Fig. 4.10. Using the Format Painter tool to copy formatting from cells in
row 4 to cells in row 10.
Format Painter
button to apply copied formatting as many times as necessary, then
click it again or press the <Esc> key to deactivate the Format Painter.
3. Click the cell to which you want to apply the copied formatting.
The copied formatting is applied.

APPLYING AND REMOVING CELL STYLES

Styles contain preset font EXERCISE NOTES


formatting, cell shading, and
Exercise File: Sales4-7.xlsx
other formatting items that can
Exercise: Apply the “Heading 3” cell style to the cell
be applied to a cell or cell range range B3:G3.
all at once. This is a convenient Apply the “Heading 4” cell style to the cell range A4:A12.
and easy formatting option for Apply the “Total” cell style to the cell range B12:G12.
your cells. Remove the “Heading 4” cell style from the range A4:A12.
Apply a Cell Style
1. Select the cell(s) you want to format.

Advance Spreadsheet Tools 77


Fig. 4.11. A preview of how the cell style will look appears as you hover over styles in the Cell Styles gallery.

2. Click the Home tab and click the Cell Styles button in the Styles group.
A gallery of styles appears.
3. Select a cell style.
Tip: Hover the pointer over a style to preview how it will look before
selecting it.
Remove a Cell Style
1. Select the cell(s) that have the cell style applied.
2. Click the Home tab and click the Cell Styles button in the Styles group.
3. Click Normal.
Tips
• Cell styles are associated with the theme that is being used for the
workbook. If you switch to a new theme, the cell styles will update
to match it.
• If you have another workbook that contains styles that you want to
copy into the current workbook, click the Cell Styles button in the
Styles group and select Merge Styles.

CREATING AND MODIFYING EXERCISE NOTES


CELL STYLES Exercise File: Sales4-8.xlsx
Exercise: Create a new style using the formatting in cell
You can modify cell styles and A1, and name the style Income&Expenses.
create new styles. Modify the Income&Expenses style: change the font size
to 16 pt. and add Bold formatting.
78 Advance Spreadsheet Tools
Create a New Cell Style
If you find that you keep applying the same
formatting over and over, you should create
a style with that formatting so you can apply
those formatting settings with one click.
1. Select the cell that has the formatting
you want to use for the style.
The new style will use these formatting
properties.
If you need, you will be able to modify
the formatting further before the style is
created.
2. Click the Home tab and click the More
button in the Cell Styles gallery of the Fig. 4.12. The Style dialog box.
Styles group.
A list of all the available cell styles appears.
3. Select New Cell Style.
The Style dialog box
appears with the
formatting for the
selected cell. You
can further define
the formatting for
the cell if you wish.
4. Type a name for the
style in the Style
name text box. The
name should be
easy to identify.
5. (Optional) Check
Fig. 4.13. The new style appears under the Custom section of the
or uncheck “Style Cell Styles gallery.
includes” boxes to
select which formatting items you want the style to include.
If you leave a check box empty, the default settings will be used for the cell.

Advance Spreadsheet Tools 79


6. (Optional) Click the Format button and define formatting as needed.
7. Click OK.
The Format dialog box closes.
8. Click OK.
The Style dialog box closes and the new style is available in the Cell Styles
gallery.
9. Reapply the new style to the cell.
Tips
• New styles are added to the theme that is currently applied to the
workbook.
• If you have another workbook that contains styles that you want to
copy into the current workbook, click the Cell Styles button in the
Styles group and select Merge Styles.
Modify a Cell Style
1. Click the Home tab
and click the Cell
Styles button in the
Styles group.
2. Right-click the cell
style you want to
modify and select
Modify.

The Style dialog
box appears. This is
where you can change
the appearance of the
style being modified
or duplicated.
Fig. 4.14. Change the formatting properties of a style as
 Trap: Selecting needed in the Format Cells dialog box.
Modify changes the style, while selecting Duplicate adds a new custom
style and leaves the original built-in style alone.
3. Click the Format button and change formatting items on each tab, as needed.
Click OK.
The Format dialog box closes.
80 Advance Spreadsheet Tools
4. Click OK.
The Style dialog box closes and the
style is modified.
Tips
• To duplicate and then modify
a cell style, right-click a style
and select Duplicate. This
creates a new custom style.
• To remove a cell style from
all cells and delete the cell
style itself, click the Home
tab on the Ribbon and click
the Cell Styles button in the
Styles group. Right-click the
style you want to delete and Fig. 4.15. The Style dialog box shows updates to
formatting after changes are applied in the Format
select Delete. Cells dialog box.

USING DOCUMENT THEMES

A theme is a set of unified


EXERCISE NOTES
design elements that you can
apply to a worksheet to give Exercise File: Sales4-9.xlsx
Exercise: C Apply the Black Tie document theme. Apply
it a consistent look and feel. the Civic theme color set.
Document themes coordinate Save these settings as a new document using the name
the look of a worksheet with “Income&Expenses”.
theme colors, theme fonts, and Change the workbook back to the Office document
theme.
theme effects.
›› Theme Colors: A set of eight coordinated colors used in formatting text
and objects in the worksheet.
›› Theme Fonts: A set of coordinated heading and body font types.
›› Theme Effects: A set of coordinated formatting properties for shapes and
objects in the document.
Apply a Document Theme
Applying a document theme affects all elements of the worksheet: colors, fonts,
and effects.

Advance Spreadsheet Tools 81


1. Click the Page Layout tab on the Ribbon and click the Themes button in the
Themes group.
A list of built-in document themes
appears. The default theme is
“Office.”
Tip: You may browse for
additional themes online by
clicking More Themes on
Microsoft Office Online. Or,
if a theme is saved elsewhere
on your computer or network
location, click Browse for
Themes to go to the theme’s
location.
2. Click the document theme you
want to apply.
The formatting associated with
the selected document theme is
applied to the worksheet.
Mix and Match Document Themes
You are not bound to the colors, fonts, or
effects that are assigned to a document
theme. You may mix and match theme Fig. 4.16. Selecting a document theme.
colors, theme fonts, and theme effects.
1. Click the Page Layout tab on the Ribbon.
2. Click the Theme Colors, Theme Fonts, or Theme Effects button and select
the set of colors, fonts, or effects you want to use.
The change is applied to the document. The document theme isn’t changed,
it is just no longer applied. If you want to use this set of theme items together
again, you’ll have to save them as a new document theme.
Create New Theme Colors and Fonts
You can also change which colors or fonts make up the theme colors and theme
fonts. This can be useful if you want to create a document theme that is customized
for your company or for a special project.
1. Click the Page Layout tab on the Ribbon.
2. Click the Theme Colors or Theme Fonts button.
82 Advance Spreadsheet Tools
3. Select Create New Theme Colors or Create New Theme Fonts from the
list.
A dialog box appears where you can select colors or fonts.
4. Select the colors or fonts you want to use.
Once the color or font theme looks the way you want it to, save it.
5. Type a name for the new theme in the “Name” text box.
If you want to coordinate new theme colors and fonts, save them under the
same name, just as they are with built-in themes.
6. Click Save.
Save a New Document Theme
Finally, you can save any combination of theme colors, theme fonts, and theme
effects as a new document theme.
1. Apply the colors, fonts, and effects you want to use in the new document
theme.
2. Click the Page Layout tab on the Ribbon and click the Themes button in the
Themes group.
3. Select Save Current Theme. The Save Current Theme dialog box appears.
4. Type a name for the theme in the File name box.
5. Click Save.
Tips
• When you save a new theme color or font, or save a new document
theme, it becomes available in all Office programs.
• To remove a custom theme or theme element, right- click the theme
and select Edit. Click Delete in the dialog box and click Yes to confirm
the deletion.

APPLYING CONDITIONAL FORMATTING

Conditional formatting EXERCISE NOTES


formats cells only if a specified
Exercise File: Sales4-10.xlsx
condition is true. For example, Exercise: A Use conditional formatting to highlight cells
you could use conditional that are below average in cell range B4:G4.
formatting to display weekly Add Blue data bars to cells B10:G10.
sales totals that exceeded Add the 3 Arrows (colored) icon set to cells B12:G12. (You
$50,000 in bright red boldface may need to widen columns so the contents are visible.)

Advance Spreadsheet Tools 83


formatting, and bright blue italics formatting if the sales totals were under $20,000.
If the value of the cell changes and no longer meets the specified condition, the cell
returns to its original formatting.
Apply Highlight Cells Rules and Top/Bottom Rules
You can highlight specific cells in a range using
a comparison operator; only cells that meet the
specified criteria will be formatted. For example, you
can highlight cells with values that are greater than a
certain value.
1. Select the cell range you want to format.
2. Click the Home tab on the Ribbon and click the
Conditional Formatting button in the Styles
group.
A menu appears. Here you have several
conditional formatting rules to choose from:
›› Highlight Cells Rules: These conditions
focus on general analysis. Preset conditions
include: Greater Than; Less Than; Between;
Fig. 4.17. This list of options appears
Equal To; Text That Contains; Date when you click the Conditional
Occurring; Duplicate Values. Formatting button in the Styles group.

›› Top/Bottom Rules: These conditions focus on the high and low values
in the worksheet. Preset conditions include: Top 10 Items; Top 10%;
Bottom 10 Items; Bottom 10%; Above Average; Below Average.
3. Point to Highlight Cells Rules or Top/Bottom Rules and select a conditional
formatting rule.
A dialog box appears, allowing you to specify the details relating to the rule.
For example, if you selected the Greater Than rule, in the “Format cells that
are GREATER THAN:” box you can enter a value or click a cell to enter a cell
reference. Then you can click the list arrow and select the formatting you
want to apply to cells that fit the criteria you set—in this example, cells that
are greater than the value you entered.

84 Advance Spreadsheet Tools


Fig. 4.18. Applying conditional formatting.

4. Complete the dialog box to define the condition.


5. Click OK.
The conditional formatting is applied to the cells.
Apply Data Bars, Color Scales and Icon Sets
You can also format cells with data bars, color scales, or icon sets to visually
display variations in the values of cells in a range.
1. Select the cell range you want to format.
2. Click the Home tab on the Ribbon and click the Conditional Formatting
button in the Styles group.
Let’s take a closer look at three similar types of conditional formatting:
Data Bars: Colored bars appear in the cells. The longer the bar, the higher
the value in that cell. You can choose from different bar colors.
Color Scales: Cells are shaded different color gradients depending on the
relative value of each cell compared to the other cells in the range. You can
choose from different colors.

Advance Spreadsheet Tools 85


Icon Sets: Different shaped or colored icons appear in cells, based on each
cell’s value. You can choose from several types and colors of icons.

Fig. 4.19. Applying conditional formatting.

3. Point to Data Bars, Color


Scales or Icon Sets.
A menu appears, differing
based on your selection.
4. Select a data bar, 2- or
3-color scale, or icon set.
The conditional formatting
is applied to the cells.
Fig. 4.20. The worksheet with conditional formatting applied.
Tips
• Additional options for data bars have been added to Excel 2010. You
can apply solid fills and borders, and even change the direction of
the bar. Data bars also have a new way to display negative values
• More icon sets have been added to Excel 2010. You can also specify
which icons appear from an icon set.

86 Advance Spreadsheet Tools


CREATING AND MANAGING CONDITIONAL FORMATTING RULES

You can create and manage new EXERCISE NOTES


conditional formatting rules Exercise File: Sales4-11.xlsx
that follow the parameters and Exercise: Create and apply a new formatting rule that
formatting you specify. applies bold formatting to values that are below average
for cell range B4:G4.
Create a New Rule Select cells B12:G12 and edit the rule so that the green
1. Select the cell range you icon appears for values greater than or equal to 60% and
want to format with a the yellow for values greater than or equal to 30%.
customized rule. Clear all the conditional formatting on the worksheet.

2. Click the Home tab on the Ribbon and click the Conditional Formatting
button in the Styles group.
3. Select New Rule.
The New Formatting Rule
dialog box appears.
4. Select a rule type in the
Select a Rule Type list.
5. Complete the fields in the
Edit the Rule Description
area.
This area will display
different fields depending
on the type of rule you
selected.
Tip: Click Preview in

the New Formatting Rule
dialog box if you want to Fig. 4.21. Creating a new conditional formatting rule.
see how the rule will appear before you apply it.
6. Click OK.
The new rule is created and formatting is applied.
Other Ways to Create a New Rule: Click the Home tab on the Ribbon and

click the Conditional Formatting button in the Styles group. Click Manage
Rules, then click New Rule. Or, click the Home tab on the Ribbon and click
the Conditional Formatting list arrow in the Styles group. Click one of the
rule types, then click More Rules.

Advance Spreadsheet Tools 87


Manage Rules
You can manage all
aspects of conditional
formatting— creating,
editing, and deleting
rules—in one place
using the Rules
Manager.
1. Select the cell
Fig. 4.22. The Conditional Formatting Rules Manager dialog box.
range with the
conditional formatting you want to manage.
2. Click the Home tab on the Ribbon and click the Conditional Formatting
button in the Styles group.
3. Select Manage Rules.
The Conditional Formatting
Rules Manager dialog box
appears. The rules applied to
the selected cells appear in the
dialog box.
Use these buttons to manage
the rules:
›› New Rule: Create a brand
new conditional formatting
rule.
›› Edit Rule: Edit the selected
formatting rule.
Fig. 4.23. Editing a formatting rule.
›› Delete Rule: Delete the
selected rule from the worksheet.
Tip: If you don’t select a cell range where conditional formatting is
applied, you can view all the rules in the worksheet. Click the Show
formatting rules for list arrow and select This Worksheet.
4. Manage the formatting rules. Click OK when you are finished.

88 Advance Spreadsheet Tools


Remove Conditional Formatting
The Clear Rules command
helps you remove conditional
formatting rules from your
worksheet.
1. Click the Home tab on
the Ribbon and click the
Conditional Formatting
list arrow in the Styles Fig. 4.24. The worksheet with edited conditional formatting.
group.
If you want to clear only a selection of cells, first select the cell range.
2. Point to Clear Rules.
3. Select Clear Rules from Selected Cells or Clear Rules from Entire Sheet.
Conditional formatting is cleared either from the cells you’ve selected or the
entire worksheet.

FINDING AND REPLACING FORMATTING

Excel’s Find and Replace EXERCISE NOTES


features can find and/or Exercise File: Sales4-12.xlsx
replace formatting in addition Exercise: Replace all bold formatting in the worksheet
to text and information. with bold italic formatting.
1. Click the Home tab on the Ribbon and click the Find & Select button in the
Editing group.
2. Select Replace.
The Find and Replace
dialog box appears,
displaying the Replace
tab.
Other Ways to Open
Find and Replace: Press
<Ctrl> + <H>.
3. Click the Options button.
The dialog box expands
to display more search
options.

Advance Spreadsheet Tools 89


4. Click the top Format button. The Find Format dialog box appears.
5. Select the formatting
options you want to find
and then click OK.
6. Click the bottom Format
button. The Replace
Format dialog box
appears.
7. Select the new
formatting options you
want to use and click OK.

Once the formatting Fig. 4.25. The Replace tab of the Find and Replace dialog box.
options are set, you’re ready to begin finding and replacing the formatting.
8. Click Find Next to find each occurrence of the cell formatting. Click Replace
to replace the cell formatting.
After you replace
an occurrence,
Excel automatically
moves to the next
occurrence, so you
only need to click
Find Next if you
want to skip an
occurrence without
replacing the Fig. 4.26. The formatting of headings in cell range B3:G3 is updated through
formatting. finding and replacing formatting.

Tips
• Click Replace All to replace all occurrences of the cell formatting at
once.
• To find other types of items, click the Find & Select button and then
select one of the Find options: Formulas, Comments, Conditional
Formatting, Constants, or Data Validation.

90 Advance Spreadsheet Tools


Formatting a Worksheet Review
QUESTIONS
1. Which of the following is NOT a type of font formatting?
(a) Bold (b) Italic
(c) Underline (d) Comma Style
2. Which of the following is NOT a type of number formatting?
(a) Number (b) Accounting
(c) Dollar (d) Percentage
3. The feature automatically resizes columns or rows to best fit cell contents.
(a) AutoFit (b) AutoSize
(c) AutoAdjust (d) FitRight
4. You can align cell contents horizontally but not vertically within a cell. (True or False?)
5. The Border list arrow is located in thegroup on the Home tab.
(a) Alignment (b) Clipboard
(c) Font (d) Number
6. Click the Format Painter button once to apply it once or twice to apply it multiple times.
(True or False?)
7. Excel contains preset formatting styles that you can quickly apply to cells. (True or
False?)
8. Which of these formatting properties can be included in style formatting?
(a) Number (b) Font
(c) Fill and Border. (d) All of these.
9. Document themes consist of:
(a) Theme colors (b) Theme fonts
(c) Theme effects (d) All of these
10. allows you to highlight cells that meet specific criteria.
(a) Conditional formatting (b) Font formatting
(c) Filtering (d) Find and replace
11. Which of the following is not a conditional format that can be applied to cells?
(a) Data Bars (b) Characters
(c) Color Scales (d) Icon Sets
12. You can preview how a new conditional formatting rule looks before you apply it. (True
or False?)
13. You cannot edit a conditional formatting rule after you’ve created it. (True or False?)

Advance Spreadsheet Tools 91


14. Which of the following types of items can NOT be found using Excel’s Find feature?
(a) Formulas (b) Comments
(c) Conditional Formatting (d) Styles

ANSWERS
1. (d) Comma Style is not a type of font formatting.
2. (c) Dollar is not a type of number formatting.
3. (a) AutoFit resizes columns or rows to best fit cell contents.
4. False. You can align cell contents vertically and horizontally within a cell.
5. (c) The Border list arrow is located in the Font group.
6. True. Click the Format Painter button once to apply it once or twice to apply it multiple
times.
7. True. Excel contains preset formatting styles that are all ready for you to apply to cells.
8. (d) Number, Font, Fill and Border, are all available in cell styles. You can also include
Alignment and Protection formatting in the style.
9. (d) Document themes consist of theme colors, fonts, and effects.
10. (a) Conditional formatting allows you to highlight cells that meet specific criteria.
11. (b) Characters is not a conditional formatting option in Excel.
12. True. Click Preview in the New Formatting Rule dialog box to see how new conditional
formatting will look before you apply it.
13. False. You can edit a conditional formatting rule.
14. (d) Styles cannot be found using the Find feature.

92 Advance Spreadsheet Tools


Creating and
Working with 5
Chap
ter
Charts
Charts allow you to present data, relationships, or trends graphically. Charts are
often better at presenting information than hard-to-read numbers in a table or
spreadsheet.
In this chapter, you will learn how to create, edit and format dynamic looking
charts.

USING EXERCISE FILES

This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
Open the exercise file for a lesson, perform the lesson exercise, and close the
exercise file.
Open the exercise file for a lesson, perform the lesson exercise, and keep the file
open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the exercises
in a chapter can be performed in succession from the first lesson to the last.

CHOOSING AND SELECTING THE SOURCE DATA

Charts are a great way to EXERCISE NOTES


share data and information.
Exercise File: Survey5-1.xlsx
The foundation of charts is the
Exercise: Select A4:D9 and A12:D12.
data they illustrate. Choosing
the right data is the first and most important step in creating a chart.
Choose the Right Data
When you realize that you need a chart, you have to decide what data needs to
be included in it.
›› What is the Main Point?
What is the purpose of the chart? Identify the point of the chart, and then
include the data that illustrates this point and puts it in context.

Advance Spreadsheet Tools 93


›› What is the truth?
Avoid spinning the data.
Communicate what the
data shows, not what
you want it to say.
›› Keep it simple.
Only show the data that
is relevant. This makes
it easier to process
the information that is Fig. 5.1. An example of results from a survey. You want to show
important. Make sure that among all travel destinations, the most popular destination
for trips taken for leisure is Europe.
that that the rest of the
data is available so that your conclusions are backed up with ample
evidence.
Select the Data
Once you know what data and labels you wish to include in the chart, select them.
1. Click and drag to
select the cells you
want to include
in the chart. To
select multiple
non-adjacent cells,
select a cell or cell
range and hold
down the <Ctrl>
key while you
select other cells.
Include labels for
rows and columns
in the cells you
Fig. 5.2. In this example, the data labels in column A and row 4 are selected
select. These along with the values in B5:D9 and B12:D12.
labels provide
context for the chart data.

94 Advance Spreadsheet Tools


Tips
• If a value changes in the chart’s data source, that change is
automatically updated in the chart.
• If you do not include labels in the selected cell range, Excel will insert
placeholders in the chart.

CHOOSING THE RIGHT CHART

Once you’ve determined the results EXERCISE


you want your chart to display, choose
Review the different types of charts available in
the chart that best suits this purpose. Excel.
The most popular charts are column,
line, pie, and bar charts.
Chart Types in Excel
Column charts are used when you want to compare different
values vertically side- by-side. Each value is represented in
Column
the chart by a vertical bar. If there are several series, each
series is represented by a different color.
Line charts are used to illustrate trends over time. Each value
is plotted as a point on the chart and is& connected
Exercise to other
Line
values by a line. Multiple items are plotted using
• Exercise File:different
Survey5-3.xlsx
lines.
• Exercise:
Pie charts are useful for showing values as a percentage of a
Pie whole. The values foreach item are represented by different
colors. Limit pie charts to eight sections.

Bar charts are just like column charts, except they display
Bar information in horizontal bars rather than in vertical
columns.

Area charts are the same as line charts, except the area
Area beneath the lines is filledwith color.

Scatter charts are used to plot clusters of values using single


XY points. Multiple items can be plotted by using different
(Scatter) colored points or different point symbols.

Advance Spreadsheet Tools 95


Stock charts are effective for reporting the fluctuation of
Stock stock prices, such as the high, low, and closing points for a
certain day.

A surface chart is useful for finding optimum combinations


Surface between two sets ofdata. Colors and patterns indicate values
that are in the same range.

A doughnut chart shows the relationship of parts to a whole,


but it can contain more than one data series. (You may want
Doughnut
to try stacked column or stacked bar charts instead.)

Bubble charts are similar to XY Scatter charts, but they


compare three sets of values instead of two, with the third
Bubble
set determining the size of the bubble.

Radar charts compare the aggregate values of a number of


data series.
Radar

INSERTING A CHART

Once you’ve chosen the type EXERCISE NOTES


of chart you wish to use, insert Exercise File: Survey5-3.xlsx
the chart in your worksheet. Exercise: Select cell range A4:D9 and insert a 2-D
1. Make sure the cell range Clustered Column chart.
containing the data and Move the chart so that the upper left corner is in cell
labels you want to chart A14. Resize the chart so that it covers A14:F28.
are selected.
Tip: You can chart non-adjacent cells if you hold down the <Ctrl> key
while selecting the cells.
2. Click the Insert tab on the Ribbon.
In the Charts group, there are several chart types to choose from. Each of the
chart types then has several charts to choose from.
3. Click a chart type button in the Charts group.

96 Advance Spreadsheet Tools


A list of charts for the
selected chart type
appears.
4. Select the chart
you want to use
from the list. The
chart appears in the
worksheet and the
Chart Tools appear
on the Ribbon. The
Chart Tools include
three new tabs—
Design, Layout and
Format—that help
you modify and Fig. 5.3. Selecting a chart to insert.
format the chart.
Tip: To see all available chart types, click any chart type in the Charts
group, and then select All Chart Types. The Insert Chart dialog box
appears, displaying every chart type that is available.
Move a Chart within a Worksheet
Usually you will have
to move a chart after it
is inserted because it
covers up the data on the
worksheet.
1. Select the chart.
2. Point to the chart’s
border.
The pointer changes
to a cross-arrow
pointer.
3. Click and drag Fig. 5.4. To move a chart within a worksheet, click and drag
the chart to a new location.
the chart in the
worksheet.

Advance Spreadsheet Tools 97


Move a Chart to Another Worksheet
You can move a chart to another worksheet as an embedded object or move it to
its own worksheet.
1. Under Chart Tools on the Ribbon, click the Design tab and click the Move
Chart button in the Location group.
The Move Chart dialog box appears, displaying two options:
›› New sheet: Moves the chart to its own worksheet.
›› Object in: Allows you to embed the chart in another existing worksheet.
2. Select the option you want to use and enter or select a worksheet name.
3. Click OK.
Resize the Chart
1. Select the chart.
Eight sizing handles
appear along the
chart edges once it
is selected. Sizing
handles are used
to change the size
of charts and other
objects.
Fig. 5.5. To resize a chart, click and drag the corner of the chart.
Tip: Clicking a
chart displays the Chart Tools on the Ribbon, which include the Design,
Layout, and Format tabs.
2. Click a sizing handle and drag it to resize the chart. The chart is resized.
Tip: A faint outline appears as you drag the chart border so that you
can preview the size of the chart before releasing the mouse button.
Other Ways to Resize a Chart: Under Chart Tools on the Ribbon, click the
Format tab and use the Height and Width fields in the Size group.

EDITING, ADDING, AND


EXERCISE NOTES
REMOVING CHART DATA
Exercise File: Survey5-4.xlsx
After you’ve inserted the chart, Exercise: Change the value in cell B7 to “134”. Add the
you’ll probably still change the “Total” data series to the chart.
data. You can edit, add, and Add the “Middle East” category to the chart.
remove chart data even after Remove the “Total” data series from the chart.
you’ve inserted your chart.
98 Advance Spreadsheet Tools
Edit Chart Source Data
The values in a chart are linked to the worksheet data from which the chart is
created. If you change the source data, the chart will automatically chart the new
values.
1. Replace and edit values in the source data.
The changes are automatically reflected in the chart.
Add a Data Series
You can always add data to a chart after it has been created. Here’s how to add a
data series.
1. Select the chart;
then click the
Design tab and
click the Select
Data button in the
Data group.
The Select Data
Source dialog box
appears.
2. Click the Add
button under
Legend Entries
(Series). The Edit
Fig. 5.6. The Select Data Source dialog box.
Series dialog box
appears.
Click to add a data
series to the chart.
3. In the “Series
name” box, select
the name of the
series from the
worksheet or type
the series name. Fig. 5.7. Adding a new data series.

Advance Spreadsheet Tools 99


4. In the “Series values” box, select the data range of the data series or type the
cell range reference.
Tip: Remove
placeholder text
before selecting
the series values.
For example, if
a {1} appears in
the Series values
text box, remove
these characters
so only the equals
sign (=) remains. Fig. 5.8. Another way to add and remove data in a chart is to click and
drag the sizing handles around the source cells. These sizing handles only
Then you are appear if the source data is adjacent.
ready to enter or
select values.
5. Click OK.
The Edit Series dialog box closes.
6. Click OK.
The Select Data Source dialog box closes, and the data is added to the chart.
Other Ways to Add Data to a Chart: If the chart uses adjacent cells for

source data, click and drag the sizing handles around the source data on
the worksheet.
Copy Data into a Chart
Another way to add data to a chart is to copy it into the chart. This is useful if your
chart uses non-adjacent cells for source data or if the chart and source data are not
on the same worksheet.
1. Select the cells containing the data you wish to add to the chart, including
labels for the data.
2. Click the Home tab on the Ribbon and click the Copy button in the Clipboard
group. The data is copied to the clipboard.
3. Select the chart to which you wish to add the data.
4. Click the Paste button in the Clipboard group. The chart is updated to include
the pasted data.

100 Advance Spreadsheet Tools


Remove a Data Series
If you need to simplify your
chart or you need to get rid
of some data, it’s easy to
remove a data series from
the chart.
1. Under Chart Tools on
the Ribbon, click the
Design tab and click
the Select Data button
in the Data group.
The Select Data Source
dialog box appears.
Fig. 5.9. The Select Data Source dialog box.
2. Select the data series
you want to remove under Legend Entries (Series).
3. Click the Remove button under Legend Entries (Series).
The data series is removed from the chart.
Other Ways to Delete Data: Select the source data you want to remove from

the chart and press <Delete>.
4. Click OK.
The Select Data Source dialog box closes and the chart is updated.
Click to remove a data series from the chart.

CHANGING CHART DATA

Once you see data in a chart, EXERCISE NOTES


you’ll find that there are some Exercise File: Survey5-5.xlsx
tweaks and changes that need Exercise: SChange the source cell range to A4:D4, A6:D9,
to be made. Here are a few A12:D12.
ways to change the data in Rename the “Other” data series “Adventure” without
your chart. changing the source data.
Reorder the data series to this order: Leisure
Change the Source Cell Range
Business Adventure
If you need to use a new set
Rename the “United States” category “U.S.”
of data for your chart, you can
change the data source.

Advance Spreadsheet Tools 101


1. Under Chart Tools on the Ribbon, click the Design tab and click the Select
Data button in the Data group.
The Select Data Source dialog box appears.
2. Click the Chart
Data Range
reference button
and select the
cell(s) you want
to use as the data
source. Press and
hold the <Ctrl>
key to include non-
adjacent cells in
the data source.
3. Press <Enter>.
The Select Data Fig. 5.10. The Select Data Source dialog box.
Source dialog box
expands. The new cell range for the source data is selected in the Chart data
range text box.
4. Click OK.
The dialog box closes and the chart is updated with the new data.
Rename or Edit a Data Series
Charts are not completely tied to the
source data. You can change the name
and values of a data series without
changing the data in the worksheet.
1. Under Chart Tools on the Ribbon,
click the Design tab and click the
Select Data button in the Data
group.
The Select Data Source dialog box Fig. 5.11. The Edit Series dialog box.
appears.
2. Select the series you want to change under Legend Entries (Series).
3. Click the Edit button.

102 Advance Spreadsheet Tools


The Edit Series dialog box appears.
4. In the “Series name” box, type the label you want to use for the series, or
select the label from the worksheet.
Tip: If you type a name for the data series, that name is not added to the
worksheet, it only appears in the chart.
5. In the “Series values” box, select the data range of the data series, or type the
cell range reference.
Other Ways to Enter Cell Range Values: You can type values for the data
series in the “Series values” box. These values will not be added to the
worksheet; they only appear in the chart.
6. Click OK.
The Edit Series dialog box closes and the updated series label appears in the
Select Data Source dialog box.
7. Click OK.
The Select Data Source dialog box closes and the changes are displayed in
the chart.
Reorder the Data Series
You can change the
order of data in the
chart, without changing
the order of the source
data.
1. Under Chart Tools
on the Ribbon,
click the Design
tab and click
the Select Data
button in the Data
group. Fig. 5.12. The Select Data Source dialog box.
The Select Data Source dialog box appears.
2. Select the data series you want to move under Legend Entries (Series).
3. Click the Move Up or Move Down arrows to reorder the data series.
The chart is updated to display the new order of data.

Advance Spreadsheet Tools 103


Update Horizontal Axis Labels
You can update or change the horizontal axis labels by selecting a cell range of
labels in the worksheet.
1. Under Chart Tools on the Ribbon, click the Design tab and click the Select
Data button in the Data group.
2. Click the Edit button under the Horizontal (Category) Axis Labels.
3. Select the range of cells you wish to use for the axis labels.
4. Click OK.
Other Ways to Update Axis Labels: Edit the label in the source data.

Use the Move Up and Move Down buttons to rearrange the data series.

CHANGING CHART LAYOUT AND STYLE

An easy way to change the look EXERCISE NOTES


and feel of a chart is by applying
Exercise File: Survey5-6.xlsx
one of the built-in layouts and
Exercise: Apply built-in Layout 9 and Style 1 to the chart.
styles that are available in
Excel 2010.
Apply a Chart Layout
Built-in chart layouts allow
you to quickly adjust the
overall layout of your chart
with different combinations
of titles, labels, and chart
orientations.
1. Select the chart.
The Chart Tools appear
on the Ribbon.
2. Under Chart Tools on
the Ribbon, click the
Design tab.
Here you can see the
Chart Layouts and Chart Fig. 5.13. The Chart Layouts group.
Styles groups.

104 Advance Spreadsheet Tools


3. Select the option you want to use from the Chart Layouts gallery in the Chart
Layouts group. Or, click the Quick Layout button in the Chart Layouts group
and select an option.
The chart changes to the selected layout.
Apply a Chart Style
Built-in chart styles allow you to adjust the format of several chart elements all at
once. Styles allow you to quickly change colors, shading, and other formatting
properties.
1. Select the chart.

The Chart Tools
appear on the
Ribbon.
2. Under Chart Tools
on the Ribbon, click
the Design tab.
3. Select the option you
want to use from the
Chart Styles gallery
in the Chart Styles
group.
The new style is
applied.
Tip: The
Chart Layouts
and Chart
Styles groups
offer many
formatting Fig. 5.14. The Chart Styles group.

options. A few are displayed by default, but you can click the arrow
buttons to scroll down and access additional layouts and styles, or you
can click the More button to expand a gallery.

Advance Spreadsheet Tools 105


WORKING WITH CHART LABELS

If you have a specific layout in EXERCISE NOTES


mind for your chart’s labels, Exercise File: Survey5-7.xlsx
you can add, remove, and Exercise: Replace existing chart label placeholders: Add
format the labels as needed. the text “Popular Leisure Destinations” to the chart title.
Add the text “Responses” to the Primary Vertical Axis
Edit Chart Label Text Title.
It’s easy to edit the text of a Move the legend to the bottom of the chart.
label that already appears in Remove the Primary Horizontal Axis Title from the chart.
the chart.
1. Select the chart
and double-click
the label you wish
to edit.
A cursor appears
in the label.
2. Edit the label text
and click the chart.
Tip: Text that
is linked to
worksheet
Fig. 5.15. Editing a chart label.
data cannot
be directly edited. To edit these labels, you need to edit the labels and
data in the actual worksheet.
Add or Move a Chart Label Table 5-1: Chart Labels
Labels can be moved to different Chart Title: Tells people what the
locations or layouts on the chart. chart isabout.
1. Select the chart. Axis Titles: Tells people about the
2. Under Chart Tools on the data beingcharted on the axis.
Ribbon, click the Layout tab. Legend: Displays the name of a data
In the Labels group, there are series inthe chart.
several labels to choose from, Data Labels: Labels the specific
as shown in Table 5-1: Chart values ofdata in the chart.
Labels. Data Table: Adds a table that
contains all thedata in the chart.

106 Advance Spreadsheet Tools


3. Click the button for the label you want to use in the Labels group.
A list of options for that label appears.
Tip: If you don’t see a label option that suits you, click the More Options
button at the bottom of the list to display the Format dialog box. Here
you can fine-tune the label to your specifications.
4. Select the option you want to use from the list.
The label appears on the chart. If you add a chart or axis title, placeholder
text will appear that you can replace with your own text.
Tip: To add data labels to one data series, select that data series instead
of the entire chart area.
Format a chart label
Labels can be moved to different locations on
the chart.
1. Double-click the label.
The Format dialog box appears with
formatting options for the label.
2. Apply the formatting options you wish to
use and click Close.
The dialog box closes and formatting is
applied to the label. Fig. 5.16. Formatting a chart label.
Remove a Chart Label
You may also remove labels from
charts.
1. Select the chart.
2. Under Chart Tools on the
Ribbon, click the Layout tab.
3. Click the button for the label
you want to remove in the
Labels group.
A list of options for that label
appears.
4. Select None. Fig. 5.17. Removing a chart label.

The label is removed from the chart.

Advance Spreadsheet Tools 107


CHANGING THE CHART GRIDLINES

Gridlines are the lines in the EXERCISE NOTES


background of a chart that
Exercise File: Survey5-8.xlsx
correspond to the values in
Exercise: Show major and minor horizontal gridlines on
the chart. In column and bar the chart.
charts, gridlines make it easier Remove horizontal gridlines from the chart.
to compare the values in the Display only major horizontal gridlines on the chart.
chart. You can change how the
gridlines stack up the data in the chart.
Choose Major and Minor Gridlines
1. Select the chart. Table 5-2: Horizontal Gridline Examples
2. Under Chart Tools on
the Ribbon, click the
Layout tab and click the
Gridlines button in the
Axes group.

A menu appears, None Minor Gridlines
allowing you to select
whether you want to
work with the vertical
or horizontal axis.
3. Select a gridline.
A list appears with Major Gridlines Major & Minor Gridlines
different display
options for the vertical or horizontal gridlines. The table to the right, Table
5-2: Horizontal Gridline Examples, gives you an idea of available gridlines in
Excel. The options for the vertical gridlines are the same, which you would
most likely use for bar charts.
4. Select the gridline option you want to use.
The chart is updated to show the gridlines as selected.
Tip: To hide gridlines, select the None option.

108 Advance Spreadsheet Tools


Format Gridlines
You can also change the line
formatting used in
gridlines.
1. Select the chart.
2. Under Chart Tools on
the Ribbon, click the
Layout tab and click the
Gridlines button in the
Axes group.
3. Select a gridline and
select More Primary
Gridlines Options
from the list.
The Format Gridlines
dialog box appears.
4. Choose the formatting
you wish to apply to Fig. 5.18. The Format Major Gridlines dialog box.
gridlines and click Close.
The dialog box closes and the gridline formatting is updated.

CHANGING THE SCALE

The scale of the chart is


EXERCISE NOTES
how it displays units of
measurement. For example, Exercise File: Survey5-9.xlsx
in what units do you want to Exercise: Change the display units for the vertical axis to
show the data (i.e. thousands, thousands. Change it back to the default display units.
millions)? Should it show lines Change the scale of the vertical axis: change the major
for every 20 units? How high unit to 25 and change the maximum to 150.
should the scale be displayed?
Here’s how to change the scale of the chart.
Change Display Units
Changing the display units makes it easier to read charts that have large values.
1. Select the chart.

Advance Spreadsheet Tools 109


2. Under Chart Tools on the
Ribbon, click the Layout tab
and click the Axes button in
the Axes group.
3. Select an axis and select the
display unit in which you
want to show the data.
The chart is updated to
show the units and the
axis label shows the unit of
measurement that is used.
Tip: The axis you choose

under the Axes button
depends on the type of chart
you’re using. If you’re using
a column chart, select the
vertical axis. If you’re using Fig. 5.19. The Format Axis dialog box.
a bar chart, select the horizontal axis.
Change the Scale of the Axis Table 5-3: Format Axis Dialog Box
The scale of the axis Minimum/ By default, Excel chooses the
determines how information maximumvalues minimum and maximum axis values
appears in the chart. for you, but you can adjust the scale
of an axis by selecting Fixed and
1. Select the chart.
entering your own values.
2. Under Chart Tools on Major/minor Excel determines the axis unit of
the Ribbon, click the unit measure by default, but you can
Layout tab and click select your own here.
the Axes button in the Display units Choose the units you want to use to
Axes group. display axis values—for example,
3. Select an axis and in thousands or millions.
select More Primary Major/minortick Select whether or not you want
Axis Options from the mark type to display major or minor tick
marks, as well as whether they are
list.
displayed inside, outside, oracross
The Axis Options tab the axis.
is selected. Refer to Axis labels Decide where you want axis labels
Table 5-3: Format Axis located.

110 Advance Spreadsheet Tools


Dialog Box for a description of the formatting options available in this tab.
4. Select the axis display options you want to use and click Close.
The scale of the chart is changed according to the options you chose.
Other Ways to Change Display Units: Right-click an axis in the chart and

select Format Axis from the contextual menu.
Change Number Formatting for Axis Values
You can change the number formatting used in an axis. For example, if the axis is
displayed a monetary value, you can change the formatting to display the numbers
with a currency symbol.
1. Select the chart.
2. Under Chart Tools on the Ribbon, click the Layout tab and click the Axes
button in the Axes group.
3. Select an axis and select More Primary Axis Options from the list.
4. Click the Number tab and select the number formatting you wish to use.
5. Click Close.
The formatting is applied to the axis.
Other Ways to Change Number Formatting: Right-click an axis in the chart
and select Format Axis from the contextual menu. Click the Number tab in
the Format Axis dialog box.
Tip: If the source data already has specific number formatting, it will be
reflected in the chart axes.

EMPHASIZING DATA

One way to emphasize data is EXERCISE NOTES


to change the formatting of a Exercise File: Survey5-10.xlsx
specific piece of data or a data Exercise: Emphasize the Leisure data series with an
orange fill color.
series so it stands out from the
Emphasize the European Leisure data point with a dark
rest of the chart.
orange fill color.
Change the Color of Data Series
You can make a data series stand out by applying a different color to the series.
1. Select the chart and click the Layout tab on the Ribbon.
2. Click the Chart Elements list arrow in the Current Selection group of the
Layout tab.

Advance Spreadsheet Tools 111


3. Select the data series you want to change.
4. Click the Format
Selection button in
the Current Selection
group. The Format
Data Series dialog
box appears.
Other Ways to

Format the Data
Series: Double-click
a data point in the
series. Or, right- click
a data point and
select Format Data
Series from the Fig. 5.20. Changing the color of a data series in the chart.
contextual menu.
5. Click the Fill tab and apply the fill properties you want to use for the data
series.
6. Click Close.
The formatting is applied to the data series.
Change the Color of a Single Data Point
If a single piece of data is what
you want to focus on in a chart,
you can change the formatting of
that data to make it stand out.
1. Click the data series of
which the data point is a
part. Once the data series
is selected, you can format
the individual data point.
2. Double-click the data Fig. 5.21. Changing the color of a single data point makes it stand
out from the rest of the data series and chart.
point you wish to format.
The Format Data Point dialog box appears.
3. Click the Fill tab and apply the fill properties you want to use for the data
point.
112 Advance Spreadsheet Tools
4. Click Close.
The formatting is applied to the data point.
Annotate the Chart
You can add trend lines and other analytical elements to your chart using the
Analysis commands.
1. Select the chart.
2. Under Chart Tools on the Ribbon, click the Layout tab.
Here you can see the Analysis group, which contains four buttons:
›› Trend line: Add a
linear trend line to the
selected data series—
works well with line-
type charts.
›› Lines: Add drop lines
(lines that connect a
data series line to the
horizontal axis) or high-
low lines (lines that
connect two data lines)
in a line-type chart. Fig. 5.22. An example of an annotated combination chart. The
Net Inc. data series uses a line chart type, while a linear trend line
›› Up/Down Bars: Add appears across the top of the chart.
bars that graph the
distance between two lines in a line chart.
›› Error Bars: Add bars that show the margin of error on the chart.
3. Click the button you want to use in the Analysis group.
A list appears, displaying different options depending on which button you
clicked.
4. Select the option you want to use from the list.
A dialog box may appear, depending on the option you chose. Complete the
dialog box to finish the formatting as necessary.
Use a Different Chart Type for a Data Series
Another way to make a data series stand out from the rest of the chart is to apply
a different chart type to that series. This is called a combination chart. Combining
charts can be a powerful way to show overarching trends in data.
Advance Spreadsheet Tools 113
One of the most common ways to do this is to make one of the data series in a
column chart a line chart.
1. Right-click a single data series in the chart and select Change Series Chart
Type from the contextual menu.
2. Select a new chart type for the single data series.

USING CHART TEMPLATES

You can save a EXERCISE NOTES


template of a chart that
Exercise File: Survey5-11.xlsx
you’ve customized with
Exercise: Save the chart in Survey5-9.xlsx as a template and name
your own layouts and it “Survey Results”.
formatting. Then you Open the Survey5-1.xlsx file and create a new chart using the
can use the template to “Survey Results” template. Include cells A4:E12 in the chart.
create similar charts in Delete the “Survey Results” template.
the future.
Save a Chart as a Template
When you save a chart as
a template, that chart’s
properties are saved for
easy future use.
1. Select the chart you
want to save as a
template.
2. Under Chart Tools on
the Ribbon, click the
Design tab and click
the Save as Template
button in the Type
group. Fig. 5.23. The Save Chart Template dialog box.

The Save Chart Template dialog box appears.


3. Type a name for the template in the File name box and click Save.
Create a new chart using a Template
Once you’ve saved a template, you can use that template to create a new chart.
1. Open a workbook and select the cell range you want to chart.

114 Advance Spreadsheet Tools


2. Click the Insert tab on the Ribbon and click the
Dialog Box Launcher in the Charts group. The Insert Chart dialog box
appears.
3. Click the Templates folder in the list on the left. The templates you’ve saved
appear in the gallery.
4. Select the template you want to use from the gallery on the right and click
OK.
Delete a Template
If you decide you no longer need a certain chart template, you can delete it.
1. Click the Insert tab on the Ribbon and click the
Dialog Box Launcher in the Charts group. The Insert Chart dialog box
appears.
2. Click the Manage Templates button. The Charts folder is displayed.
3. Right-click the template file and select Delete. The file is deleted.

CHANGING CHART TYPE

Different types of
EXERCISE NOTES
charts are better for
presenting different Exercise File: Survey5-12.xlsx
types of information. For Exercise: Change the chart to a “Stacked Column” chart type.
example, a column chart Change the chart to a pie chart. Swap the data over the axis to
view data for Business, Leisure, and Other responses.
is great for comparing
values of different items, but
not for illustrating trends or
relationships. If you find that
a chart you’ve created isn’t the
best fit for your data, you can
switch to a different chart type.
1. Select the chart. The
Chart Tools appear on
the Ribbon.
2. Under Chart Tools on
the Ribbon, click the
Design tab. Fig. 5.24. Selecting a Stacked Column chart in the
Change Chart Type dialog box.

Advance Spreadsheet Tools 115


Now you can see the Type group.
3. Click the Change Chart Type button in the Type group.
The Change Chart Type dialog box appears. Here you can see the different
types of charts that are available.
4. Select a chart type in the list on the left, then select a chart sub-type from the
list on the right.
5. Click OK.
Tip: You can also create a combination chart. Right-click a single data
series in the chart and select Change Series Chart Type from the
contextual menu. Select a new chart type for the single data series.
Swap Data Over the Axes
You can switch the rows and
columns of data in a chart
so they appear in opposite
positions.
1. Select the chart.

2. Under Chart Tools on the


Ribbon, click the Design Fig. 5.25. Sometimes you need to swap data over the
axis to view the correct data after changing chart type.
tab.
3. Click the Switch Row/Column button in the Data group.
The chart is updated to the new data configuration.
 Trap: If the source data is too complicated (includes lots of nonadjacent
cells), Excel cannot swap data over the axes.

USING SPARKLINES

Sparklines are a new feature EXERCISE NOTES


in Excel 2010. They provide a Exercise File: Sparklines.xlsx
new way to chart information Exercise: Insert a Line sparkline in F4 that refers to the
in a worksheet: in individual data in A4:E4.
cells. Sparklines are a great Insert a Win/Loss sparkline in F8 that refers to data in
way to show a snapshot of data A8:E8.
on a worksheet. Add High and Low Points to the sparkline in F4.

116 Advance Spreadsheet Tools


Insert a Sparkline
1. Click the Insert tab on the
Table 5-4: Available Sparklines
Ribbon.
Line: Shows trends in the data
There are three types of over time.
sparklines you can insert.
Column: Shows differences in
Refer to the table to the
quantity.
right, Table 5-4: Available
Sparklines for more Win/Loss: Shows gains
information about each or losses (i.e. positive and
negative values).
type.
2. Click sparkline you want to insert in the Sparklines group.
A dialog box appears, asking you to define the range of cells that contain the
data on which you want to base the sparklines.
3. Select the data you wish to use in the sparkline.
4. Click OK.
The sparkline is inserted in the cell(s).
Change Sparkline Style
1. Select the sparkline(s).
2. Click the Design tab.
3. Click the More
button in the Style
Gallery and choose
the formatting you
wish to apply to the
sparkline(s).
The sparklines are
updated with the
new style formatting.
Add data points to
sparklines
1. Select the
sparkline(s).
Fig. 5.26. Sparklines in a spreadsheet.
2. Click the Design tab.

Advance Spreadsheet Tools 117


3. Click the check boxes for points you wish to show or highlight on the
sparkline.
The sparkline is updated to show the points you selected.
Tip: One advantage of using sparklines is that, unlike charts, sparklines
are included when the worksheet that contains them is printed.

Creating and Working with Charts Review


QUESTIONS
1. Which of these is an important thing to consider when selecting data for a chart?
(a) What is the main point? (b) Keep it simple.
(c) What is the truth? (d) All of these.
2. Which of these chart types would be best for illustrating values as a percentage of a
whole?
(a) Area (b) Pie
(c) Scatter (d) Column
3. A line chart
(a) displays trends over time.
(b) compares values across categories.
(c) displays the contribution of each value to a total.
(d) compares pairs of values.
4. To create a chart, click the
(a) Home tab. (b) Insert tab.
(c) Data tab. (d) Formulas tab.
5. Which of these statements is false?
(a) Horizontal axis labels can be changed without affecting the source data.
(b) The order of data series can be changed without affecting the source data.
(c) Data series labels can be changed without affecting the source data.
(d) The chart source cell range can be changed in an existing chart.
6. To remove a chart label, select the label and press <Delete>. (True or False?)
7. Which of these options is NOT true?
(a) Gridlines can be displayed for both the horizontal and vertical axes.
(b) You can remove all gridlines from a chart by choosing None for the axis.
(c) Gridlines can only be displayed using default settings.
(d) Major and minor gridlines can be shown at the same time.

118 Advance Spreadsheet Tools


8. Which of these is a way to change the scale of a chart?
(a) Change the display units of an axis in the chart.
(b) Change the minimum or maximum value displayed in the chart.
(c) Add number formatting to values in an axis.
(d) All of the above.
9. You can double-click a chart element to change its formatting. (True or False?)
10. If you decide you no longer need a chart template that you’ve saved, you can delete it.
(True or False?)
11. Chart type cannot be changed after a chart is created. (True or False?)
12. What is a sparkline?
(a) A way to combine two different chart types in a chart.
(b) A summary of all the charts in a workbook.
(c) A printout of a chart.
(d) A snapshot of data on a worksheet.

ANSWERS
1. (d) Consider all of these when selecting data: the main point, the truth, and simplicity.
2. (b) Pie charts are best for showing values as a percentage of a whole.
3. (a) A line chart displays trends over time.
4. (b) To create a chart, click the Insert tab, then select a chart type and chart in the Charts
group.
5. (a) Horizontal axis labels are tied to the source data; they only change if the source data
is changed.
6. False. To remove a chart label, click the label button in the Labels group and select
None from the list.
7. (c) Gridlines can be formatted to use whatever color, style, and width you prefer.
8. (d) All of these are ways to change the scale of a chart.
9. True. You can double-click a chart element to change its formatting.
10. True. If you decide you no longer need a chart template that you’ve saved, you can
delete it.
11. False. The chart type can be changed after it is created.
12. (d) A sparkline is a snapshot of data on a worksheet.

Advance Spreadsheet Tools 119


Managing Chap
6
ter
Workbooks
Once you start filling up a workbook withdata, you’ll find that it can be difficult to
organize and view it all at once.
Luckily, Excel gives you several options for viewing and working with data and
windows. You can split windows, insert new worksheets, copy worksheets, work
with multiple workbooks at once, hide data, protect and share workbooks.
In this chapter, we’ll look at ways to makeviewing and working with data easier.

USING EXERCISE FILES

This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and closethe
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the exercises
in a chapter can be performed in succession from the first lesson to the last.

USING WORKBOOK VIEWS

There are several ways to change how EXERCISE NOTES


a workbook’s contents are displayed Exercise File: Bookings6-1.xlsx
on a screen using Workbook views. You Exercise: View the worksheet in Excel’s
different views. Zoom in to 200 percent, then
can also zoom in or out to view more or
zoom back to 100 percent.
less of a workbook at a time.
Change Workbook Views
1. Click the View tab on the Ribbon.
2. Click the button for the view you
want to use in the Workbook
Views group.
Fig. 6.1. The Workbook Views group on the View tab.

120 Advance Spreadsheet Tools


The workbook’s contents are shown in the selected view.
Other Ways to Change Workbook View: Click the button for the view you
want to use in the status bar of the workbook window.
Excel offers several
different workbook
views.
›› Normal view:
This is the default
Excel view, and the
one you’ll usually
want to use when
creating and editing
workbooks. Row
and column headers Normal view is the default Excel view. This view maximizes the available
screen space in the Excel window.
are displayed.
›› Page Layout
view: Use this
view to fine-tune a
worksheet before
printing, especially
if it contains charts.
You can edit the
worksheet like it’s
in Normal view, but
you can also see Page Layout view lets you fine-tune the worksheet before printing.
the rulers, change
page orientation,
work with headers,
footers and margins,
and hide or display
row or column
headers.
›› Page Break
Preview view:
This view shows
Page Break view lets you view where the page will break
you where the page if you print the worksheet.

Advance Spreadsheet Tools 121


breaks will occur if you print the worksheet. This is helpful for making
sure your vdata is laid out correctly to appear on the desired page(s).
›› Full Screen view: The worksheet stays in the view it was already in, but
toolbars are hidden so that the worksheet fills the entire screen. To exit
Full Screen view, click the Restore Down button on the Title bar.
Zoom In or Out
Sometimes it is helpful to make
a worksheet appear larger
on the computer’s screen,
especially if you have a small
Fig. 6.2. Select a view or adjust the Zoom slider in the status bar.
monitor or poor eyesight. It
can also be helpful to zoom out so that you can see how the whole worksheet looks.
1. Click and drag the Zoom slider on the status bar to the percentage zoom
setting you want.
Other Ways to Zoom: Click the View tab on the Ribbon and click the Zoom
button in the Zoom group. Or, click the Zoom to Selection button in the
Zoom group to zoom in on the currently selected cell(s).
Create a Custom View
Changing the print settings, zoom level, and workbook appearance every time you
view or print a workbook can get old. By creating a custom view, you can save the
view and print settings so you don’t have to reapply them over and over.
1. Click the View tab on the Ribbon and click the
Custom Views button in the Workbook Views group. The Custom Views
dialog box appears.
2. Click the Add button and type a name for the view in the Name text box.
There are two additional settings here:
Print settings: Saves print settings such as page breaks.
Hidden rows, columns and filter settings: Keeps columns and rows hidden
and any applied filters filtered.
3. Select the settings you want to use in the view and click OK.
Now your view settings are quickly accessible under the new custom view.
Tip: To view a custom view, click the View tab on the Ribbon and click
the Custom Views button in the Workbook Views group. Select the
view you want to use and click Show.
122 Advance Spreadsheet Tools
SELECTING AND SWITCHING BETWEEN WORKSHEETS

By default, Excel EXERCISE NOTES


workbooks contain Exercise File: Bookings6-1.xlsx
three worksheets. Exercise: View the Friday worksheet. Use right-click to view the
You can make one Wednesday worksheet.
worksheet active Use the “Next Tab Scroll” button to view the Summary worksheet.
at a time or select Use the “First Tab Scroll” button to shift worksheet tabs and view the
Tuesday worksheet.
multiple worksheets
Select the Tuesday and Friday worksheets at the same time. Then
at once. deselect the worksheets.

Switching Between
Worksheets
You can switch between
worksheets in a workbook
by selecting a different
sheet’s tab.
1. Click the sheet tab for
the worksheet you
want to display.
That worksheet
becomes active,
allowing you to view
and edit it.
Other Ways to
Select a Worksheet:
Right-click the tab
scrolling buttons and
select the worksheet
from the contextual
menu. Or, use the tab
scrolling buttons to
scroll through the
sheet tabs and then
Fig. 6.3. Sheet tabs and scrolling buttons.
select one.

Advance Spreadsheet Tools 123


Select Multiple Worksheets
Selecting multiple worksheets at once lets you enter or edit data on multiple
worksheets, as well as format or print multiple worksheets at once.
›› To select adjacent worksheets: Click the first sheet tab you want to select,
press and hold the <Shift> key and click the last tab you want to select. Both
tabs and all tabs in between are selected.
›› To select non-adjacent worksheets: Click the first sheet tab you want to
select, press and hold the <Ctrl> key and click the other tabs you want to
select.
›› To select all worksheets: Right-click a sheet tab and select Select All Sheets
from the contextual menu.
Tips
• When multiple worksheets are selected, [Group] appears in the title
bar at the top of the worksheet.
• To cancel a selection of multiple worksheets in a workbook, click an
unselected sheet’s tab. Or, right- click a sheet tab that is selected and
select Ungroup Sheets from the contextual menu.

INSERTING AND DELETING WORKSHEETS

You can easily add worksheets EXERCISE NOTES


to a workbook or delete Exercise File: Bookings6-6.xlsx
unwanted ones. Exercise: Insert a new worksheet.
Delete the Comments, Foreign, Domestic, Receipts
Insert a worksheet worksheets.
1. Click the Insert Worksheet tab.
A new worksheet is added to the workbook.
Tip: The Insert Worksheet tab is located next to the sheet tabs near the
bottom of the workbook window.
Other Ways to Insert a Worksheet: Press <Shift> + <F11>. Or, click the
Home tab on the Ribbon and click the Insert list arrow in the Cells group.
Select Insert Sheet. Or, right- click the tab of an existing worksheet, and
select Insert from the contextual menu. Select Worksheet in the General
tab of the Insert dialog box and click OK.

124 Advance Spreadsheet Tools


Click to insert a new worksheet

Click to insert a new worksheet


Fig. 6.4. Inserting a worksheet.

Delete a Worksheet
1. Right-click the sheet tab you want
to delete and select
Delete from the contextual menu.
A dialog box appears, asking you
to confirm the deletion.
2. Click Yes.
The worksheet is deleted. Fig. 6.5. Deleting a worksheet from a workbook.
Other Ways to Delete a Worksheet: Select the worksheet you want to
delete, click the Home tab on the Ribbon, click the Delete list arrow in the
Cells group and select Delete Sheet.
Click to insert a new worksheet.

Advance Spreadsheet Tools 125


RENAMING, MOVING, AND COPYING WORKSHEETS

You can manipulate your EXERCISE NOTES


workbooks by renaming
Exercise File: Bookings6-3.xlsx
worksheets and moving them
Exercise: Rename Sheet1 to “Monday”.
into different orders and even
Move the worksheets so the Monday thru Friday
into different workbooks. worksheets are in sequential order.
Rename a Worksheet
By default, Excel worksheets are
given the rather boring names Sheet1,
Sheet2, Sheet3, and so on. You can
give them more meaningful names. Fig. 6.6. Renaming a worksheet
1. Double-click the sheet tab.
The sheet name is selected so that it can be renamed.
2. Type a new name for the worksheet.
3. Press <Enter>.
The sheet is renamed.
Other Ways to Rename a Worksheet: Right-click the sheet tab, select
Rename from the contextual menu, and type a new name. Or, select the
worksheet you want to rename,
click the Home tab on the Ribbon,
click the Format button in the Cells
group and select Rename Sheet.
Type a new name.
Move or Copy a Worksheet
You can easily rearrange worksheets
using the Move or Copy dialog box or by
using the mouse.
1. Select the sheet tab(s) for the
worksheet(s) you want to move or
copy.
2. Right-click one of the sheet tabs
you want to move or copy and
select Move or Copy from the
contextual menu. Fig. 6.7. The Move or Copy dialog box.

126 Advance Spreadsheet Tools


The Move or Copy dialog box appears.
Other Ways to Move or Copy a Sheet: Select the sheet(s) you want to move
or copy. Click the Home tab on the Ribbon and click the Format button in
the Cells group. Select Move or Copy Sheet from the list.
3. Select the sheet after which you want your moved or copied sheet(s) to
appear in the Before Sheet list.
The moved or copied sheet will be placed in front of the sheet that is selected.
Replace the worksheet name with a new one
4. (Optional) Click the Create a copy check box to copy the selected sheet.
If this box is check marked, the worksheet(s) will be copied to the new
location, instead of simply being moved.
5. Click OK.
The worksheet(s) are moved or copied to the new location.
Move or Copy a Worksheet Using Click and Drag
The easiest way to move or copy a worksheet within a workbook is with the mouse.
1. Select the sheet you want to move or copy.
2. Click and drag the sheet tab to
move it to a new location in the
workbook. Or, press and hold
the <Ctrl> key while you click
and drag the sheet tab to copy
the sheet.
Tip: To change the color of a
sheet tab, right-click the tab,
point to Tab Color and select
a color from the palette. Fig. 6.8. Click and drag to move a worksheet.

SPLITTING AND FREEZING A WINDOW

Splitting or freezing a EXERCISE NOTES


workbook window allows Exercise File: Bookings6-4.xlsx
Exercise: View the Tuesday worksheet.
you to hold certain sections
Split the window at column C and scroll to the right in the right
of a worksheet in place while pane. Remove the split.
scrolling to view other areas. Set and freeze panes at column B and row 4. Scroll down to
row 60.
It is especially useful when Unfreeze the panes in the worksheet.

Advance Spreadsheet Tools 127


working with a large worksheet because you can lock column and row headings in
place while scrolling through the data in the rest of the worksheet.
Split a Worksheet Window
To view multiple areas of the worksheet in the same window, you can split the
window into two or four panes. When a worksheet window is split, panes are
created in the window.
These panes can be
navigated independently,
allowing you to make
changes and view multiple
areas of a worksheet at
once.
1. Select the cell where
you want to split the
window.
The worksheet will
be split above and to
the left of the active
cell, creating four
panes.
To split into only two
panes, select a cell in
the top or bottom-
most visible row, or
the left-most visible Fig. 6.9. A split worksheet window.
column.
2. Click the View tab on the Ribbon and click the Split button in the Window
group.
The worksheet is split into sections that can be navigated individually
without moving other sections.
Other Ways to Split the Window: Click and drag the vertical split box or

the horizontal split box to where you want the window to split.
Adjust Split Panes
You can adjust where the panes appear in the window after a split is created.

128 Advance Spreadsheet Tools


1. Click and drag the split line.
The size of the window pane is changed according to where you clicked and
dragged the pane.
Remove a Worksheet Window Split
1. Click the Split button in the Window group. The window is no longer split.
Other Ways to Remove a Window Split: Click and drag the split line to the
edge of the window.
Freeze Window Panes
When you freeze panes, the panes above and to the left of the active cell are
immobilized. This is different from splitting, in which each section can be navigated.
Also, while you can move split lines, you can’t move frozen sections without
unfreezing and freezing again.
1. Click the View tab on the Ribbon and click the
›› Freeze Panes
button in the
Window group.
Here you have three
options:
›› Freeze Panes:
Freezes the
worksheet above
and to the left of the
cell that is currently
active.
›› Creates two or four
panes depending on
the location of the
active cell.
›› Freeze Top Row:
Keeps the top row
visible and allows Fig. 6.10. A worksheet with frozen panes: columns A-B, and rows 1-4.
you to scroll through Information in the frozen panes remains on the screen as you scroll and
move through a worksheet.
the rest of the
worksheet. Creates two panes.

Advance Spreadsheet Tools 129


›› Freeze First Column: Keeps the first column visible and allows you to
scroll through the rest of the worksheet. Creates two panes.
2. Select the option you want to use from the list.
The panes are frozen. You can use the scroll bars to move around in the
worksheet.
Remove a Worksheet Window Split
Now let’s unfreeze the panes.
1. Click the Freeze Panes button in the Window group and select Unfreeze
Panes.
All cells in the worksheet are unfrozen so you can scroll freely throughout
the entire worksheet.

CREATING HEADERS AND FOOTERS

You can use a header to include the same information at the top of every printed
page or a footer to include information EXERCISE NOTES
at the bottom of every page. You can Exercise File: Bookings6-5.xlsx
enter your own headers or footers, Exercise: View the Tuesday worksheet.
insert built-in ones, or insert specific
elements such as pictures or page
numbers.
Create a Basic Header or Footer
1. Click the Insert tab on the Ribbon
and click the Header & Footer
button in the Text group.

The workbook automatically
switches to Page Layout View and
the cursor appears in the header
area.
The header and footer areas are
split into three sections—left,
right, and center. Click any of
the sections to enter text in that
section.

Fig. 6.11. Adding header text.

130 Advance Spreadsheet Tools


Tip: Enter your note here. To work with the footer instead of the header,
click the Click to add footer text at the bottom of the worksheet or
click the Go To Footer button in the Navigation group on the Design
tab.
2. Enter header text, then click away from the header area.
When you are finished working with the header and footer, you can return to
Normal view.
Other Ways to Create a Header or Footer: Click the View tab on the Ribbon
and click the Page Layout View button in the Workbook Views group. Click
in the header or footer area.
Use Auto Headers & Footers
Instead of entering your own header or footer text or fields, use built-in options
that are already available.
1. Click the Insert tab on the Ribbon and click
the Header & Footer button in the Text
group. Now you can add an auto header or
footer.
2. Click either the Header or Footer button
in the Header & Footer group on the Design
tab.
Here you will see a list of many different
types of page numbers, titles, dates, and file
paths that can be added.
3. Select the auto header or footer you want to Figure 6-12: A spreadsheet with
use. header and footer.

It is automatically inserted into the worksheet. Any manual header or footer


information you have previously entered is replaced.
Insert Header & Footer Elements
You can also insert individual elements into the header or footer such as pictures
or page numbers.
1. Click the Insert tab on the Ribbon and click the Header & Footer button in
the Text group.
The Header & Footer Elements group appears on the Design tab, displaying
commands to add several different elements to your header or footer.

Advance Spreadsheet Tools 131


2. Click the button in the Header & Footer Elements group for the element you
want to add.
Tips
• Headers and footers can be formatted using the commands in the
Font group on the Home tab.
• You can also work with headers and footers by using the Page Setup
dialog box. Click the Page Layout tab and click the Dialog Box Launcher
in the Page Setup group. Click the Header/Footer tab. Here you can
edit headers and footers and select to withhold the header or footer
from the first page or to designate different odd and even pages.
Table 6-1: Header & Footer Elements Group
Button Description
Page Number Displays the correct page number for each page.

Number of Pages Displays the total number of pages in the worksheet.

Current Date Displays the current date.

Current Time Displays the current time of day.

File Path Displays the workbook’s name and file path.

File Name Displays the workbook’s name.

Sheet Name Display’s the worksheet’s name.

Picture Opens the Insert Picture dialog box, where you can browse
for and insert a picture file.
Format Picture Is only available once a picture has been inserted; this button
allows you to adjust the picture’s size,brightness or contrast.

HIDING ROWS, COLUMNS, WORKSHEETS, AND WINDOWS


You can hide rows, columns, worksheets and entire workbook windows from
view. Data isn’t deleted, but EXERCISE NOTES
simply hidden from view until Exercise File: Bookings6-6.xlsx
you unhide it. Exercise: View the Tuesday worksheept.
Hide Column E-G. Unhide them

132 Advance Spreadsheet Tools


Hide or Unhide a Row or Column
You can easily hide whole rows or columns
from view.
1. Select the row or column heading(s)
for the row(s) or column(s) you
want to hide.
2. Right-click the heading and select
Hide from the contextual menu.
The row(s) or column(s) are hidden.
Other Ways to Hide a Row or
Column: Select the row or column
heading(s) for the row(s) or
Fig. 6.13. A worksheet before and
column(s) you want to hide. On the after hiding columns.
Home tab, click the Format button
in the Cells group. Point to Hide & Unhide and select Hide Rows or Hide
Columns.
Now let’s look at how to unhide rows and columns.
3. Select the row or column heading(s) on both sides of the hidden row(s) or
column(s).
For example, if columns C and D were hidden, you would select the B and E
column headings.
4. Right-click the heading and select Unhide from the contextual menu.
Other Ways to Unhide a Row or Column: Select the row or column
heading(s) on both sides of the hidden row(s) or column(s). On the Home
tab, click the Format button in the Cells group. Point to Hide & Unhide and
select Unhide Rows or Unhide Columns.
Hide or Unhide a Worksheet
Sometimes you may want to hide an entire
worksheet.
1. Right-click the sheet tab for the
worksheet you want to hide.
2. Select Hide from the contextual
menu.

Fig. 6.14. Selecting a hidden sheet to unhide.


Advance Spreadsheet Tools 133
The sheet is hidden. It still exists in the workbook so any references to the
sheet will still work.
Now let’s unhide the sheet.
3. Right-click any sheet tab and select Unhide from the contextual menu.
The Unhide dialog box appears.
4. Select the sheet you want to unhide and click OK. The sheet is unhidden.
Other Ways to Hide and Unhide a Worksheet: Select the worksheet you
want to hide. On the Home tab, click the Format button in the Cells group.
Point to Hide & Unhide and select Hide Sheet. To unhide it, click the Format
button in the Cells group, point to Hide & Unhide, and select Unhide Sheet.
Click OK.
Hide or Unhide a Workbook Window
You can also hide the entire active workbook window.
1. Click the View tab on the Ribbon.
2. Click the Hide Window button in the
Window group.
The active window is hidden. The Excel
program window remains open and
active, but the workbook is hidden.
It does not even appear in the Switch
Windows button or on the Taskbar.
Here’s how to make the window
Fig. 6.15. Selecting a hidden workbook to
reappear. unhide.
3. Click the Unhide Window button in the
Window group.
The window is unhidden.
Tip: If there is more than one window hidden, the Unhide dialog box
will appear. Select which window you want to unhide and click OK.

SETTING THE PRINT AREA EXERCISE NOTES


Exercise File: Bookings6-7.xlsx
There are two ways to specify Exercise: View the Tuesday worksheet. Set the print area
the workbook data that is to A1:E61.
printed: setting the print area Move the page break after row 60 up to row 40.
and adjusting page breaks. Add a page break after row 18, then remove the break.

134 Advance Spreadsheet Tools


Set Print Area
Sometimes you may only want to print part of a worksheet. You can define an area
so that any time you print, only that cell range is printed.
1. Select the cell range you want to print.
2. Click the Page Layout tab on the Ribbon and click the Print Area button in
the Page Setup group.
3. Select Set Print Area
from the list.
Dashed lines appear
around the new print
area.
 Trap: When a print
area is set, only
the print area that
is defined prints.
You must clear the
print area if you
want to return to
the default page
setup. Fig. 6.16. Setting a print area.

Tip: Once you set a print area, you can add additional print areas. Select
the additional cells, click the Print Area button in the Page Setup group,
and select Add to Print Area. The added area also has dashed lines
around it.
Clear Print Area
Clear the print area and return to the default page setup.
1. Click the Page Layout tab on the Ribbon and click the Print Area button in
the Page Setup group.
A list of print area options appears.
2. Select Clear Print Area from the list. The print area is cleared.
View Page Breaks
Excel automatically breaks the page based on the margins and other page settings,
but you can adjust these page breaks or add your own to divide a worksheet into
separate pages for printing.

Advance Spreadsheet Tools 135


1. Click the View tab on the Ribbon and click the Page Break Preview button
in the Workbook Views group.
The worksheet appears in Page Break Preview view. Dashed lines indicate
automatic page breaks, while solid lines represent page breaks that have
been changed or added.
Other Ways to Open Page Break Preview View: Click the Page Break

Preview button on
the status bar.
Move a Page Break
You can move existing
page breaks in Page Break
Preview view.
1. Position the mouse
pointer over the
page break line so
the cursor changes.
2. Click and drag the
page break to a new
location.

The dashed line
turns into a solid
line, indicating the
break has been
changed.
Insert a Page Break Fig. 6.17. Moving a page break in Page Break Preview view.

You can insert new vertical and horizontal page breaks in the workbook.
1. Right-click the cell below or to the right of where you want to insert the page
break.
A contextual menu appears.
Tip: It can be a little confusing to figure out which cell to click to
insert a certain type of page break. See the table to the right for more
information on where to click.
2. Select Insert Page Break from the contextual menu. The break is inserted.

136 Advance Spreadsheet Tools


Other Ways to Insert a Page Break: Click the Page Layout tab on the
Ribbon and click the Breaks button in the Page Setup group. Select Insert
Page Break from the list.
Table 6-2: Inserting Page Breaks
Horizontally Select a cell in column A that is in the row below where
you want the page break.
Vertically Select a cell in Row 1 that is in the column to the right of
where you want the page break.
Horizontally and Select the cell below and to the right of where you want
Vertically the page break.

Remove a Page Break


1. Click and drag the page break line outside of the Page Break Preview area.
The page break is removed.
Other Ways to Remove a Page Break: Select the cell below or to the right of

where you want to insert or remove a page break. Click the Page Layout tab
on the Ribbon and click the Breaks button in the Page Setup group. Select
Remove Page Break. Select Reset All Page Breaks to remove all page
breaks.

ADJUSTING PAGE MARGINS AND ORIENTATION

Margins are the empty space EXERCISE NOTES


between the worksheet data
Exercise File: Bookings6-8.xlsx
and the left, right, top, and
Exercise: V View the Tuesday worksheet. In Page Layout
bottom edges of the printed view, apply Wide margins and Landscape orientation.
page. In this lesson, you’ll learn Print preview the worksheet.
how to adjust a page’s margins. Reapply Portrait orientation and preview the worksheet.
You’ll also learn how to change the page orientation. Everything you print uses one
of two orientations: portrait or landscape. In portrait orientation, the paper is taller
than it is wide—like a painting of a person’s portrait. In landscape orientation, the
paper is wider than it is tall— like a painting of a landscape.
Adjust Margins
By default, the margins in Excel worksheets are 0.75 inches at the top and bottom,
and 0.70 inches to the left and right.

Advance Spreadsheet Tools 137


1. Click the Page Layout tab on the Ribbon and click the Margins button in the
Page Setup group.
A list of three margin
options appears:
Normal, Wide, or
Narrow.
2. Select the margin size
you want to use from
the list. The margins
adjust to the new
setting.
Tip: If you don’t see a
margin size you want
to use, select Custom
Margins to display
the Margins tab of the
Page Setup dialog box. Fig. 6.18. Adjusting margins.
Here you can set your
own custom margins and even adjust the size of headers and footers.
Adjust Orientation
Portrait orientation is the
default setting for printing
worksheets, but you may often
want to use landscape orientation
instead.
1. Click the Page Layout tab
on the Ribbon and click the
Orientation button in the
Page Setup group.
A list of two options appears:
›› Portrait: In Portrait
orientation, the paper is
taller than it is wide—like
a portrait painting. Fig. 6.19. An example of a spreadsheet in
landscape orientation view.

138 Advance Spreadsheet Tools


›› Landscape: In Landscape orientation, the paper is wider than it is tall—
like a landscape painting.
2. Select the page orientation you want to use. The orientation changes.

ADDING PRINT TITLES, GRIDLINES, AND ROW AND COLUMN HEADINGS

You can specify rows and EXERCISE NOTES


columns to repeat on each
Exercise File: Bookings6-9.xlsx
printed page. You can also
Exercise: View the Tuesday worksheet.
select whether you want to
Use the Print Titles command to make row 4 repeat on
view or print cell gridlines and every page.
row and column headings. Set Sheet Options to display gridlines and headings when
Print Row or Column Titles printing.
The Print Titles command allows you to designate certain rows and columns to
repeat on every printed page.
1. Click the Page Layout tab on the Ribbon and click the Print Titles button in
the Page Setup group.
The Page Setup dialog box appears, displaying the Sheet tab.
In the Print titles area, there are two text boxes: “Rows to repeat at top” and
“Columns to repeat at
left.” You can use the cell
reference buttons next to
the text boxes to select the
ranges that contain the
labels you want to repeat
on every page.
2. Click the Rows to repeat
at top or Columns
to repeat at left cell
reference button.

The dialog box is
minimized so you can
see the spreadsheet and
select the cells you want
to repeat. Fig. 6.20. Adjusting print titles, gridlines and headings on the Sheet
tab of the Page Setup dialog box.

Advance Spreadsheet Tools 139


3. Select the rows or columns you want to appear on every printed page and
click the cell reference button.
The dialog box expands to its full size once again.
4. Click OK.
Now when you print, the rows and/or columns you selected will appear on
every page.
View or Print Gridlines and Headings
You can also choose whether you want to view or print the worksheet cell gridlines
or the column and row headings.
1. Click the Page Layout tab on the Ribbon.
The Sheet Options group has commands for working with the gridlines and
headings in a workbook.
›› Gridlines: The gridlines that appear in the spreadsheet to delineate each
cell by default. Select the Print option to print the gridlines with the data.
›› Headings: The column and row headings (A, B, C… and 1, 2, 3…) appear
by default in the spreadsheet to help identify cells. Select the Print option
so these headings are printed with the data.
2. Select the options you want to use in the Sheet Options group.
If you selected the Print check box for Gridlines or Headings, you can preview
how the worksheet will print in Print Preview or Page Layout view.

A print preview of a worksheet without A print preview of a worksheet with gridlines and
gridlines or headings displayed. headings displayed.
Fig. 21. Worksheets without and with gridlines and headings.

140 Advance Spreadsheet Tools


Other Ways to Print Gridlines or Headings: Click the Page Layout tab on

the Ribbon and click the Dialog Box Launcher in the Sheet Options group.
Select the option you want to use in the Print area. Here you can even select
a different printed page order (“Down, then over” or “Over, then down”).

ADJUSTING PAPER SIZE AND PRINT SCALE

If you plan to print a worksheet EXERCISE NOTES


on paper that isn’t Letter size, Exercise File: Bookings6-10.xlsx
you’ll need to select a different Exercise: View the Tuesday worksheet.
paper size in Excel. You can In Page Layout view, adjust the paper size to Legal.
also adjust the scale of your Change the scale so that the worksheet fits onto 1 page
printed worksheet so that wide by 1 page tall.
the printed data stretches or Print preview the worksheet.
shrinks to fit the number of Change the scale back to automatic width and height
pages you specify. and return the paper size to Letter.

Adjust Paper Size


You can print Excel worksheets on many different sizes of paper.
1. Click the Page Layout tab
on the Ribbon and click
the Size button in the Page
Setup group.
A list of common page sizes
appears.
2. Select the paper size you
want to use from the list. The
worksheet layout updates to
the new paper size.
Scale to Fit
You can tell Excel how many pages
wide or tall you want the data to
fit onto when printed.
1. Click the Page Layout tab on
the Ribbon.
The Scale to Fit group has
three options you can choose Fig. 6.22. Adjusting paper size and scaling on a worksheet.

Advance Spreadsheet Tools 141


from to adjust the worksheet’s scale for printing:
›› Width: Select the maximum width—in number of pages—you want the
printed data to occupy.
›› Height: Select the maximum height—in number of pages—you want the
printed data to occupy.
›› Scale: Enter a percentage or use the arrow buttons to stretch or shrink
the printed output to a percentage of its actual size.
2. Select the scale command you want to use in the Scale to Fit group and adjust
the scale as necessary.
The worksheet is scaled to fit the new settings.
Other Ways to Scale to Fit: Click the Dialog Box Launcher in the Scale
to Fit group to display the Page tab in the Page Setup dialog box. Select the
options you want to use in the Scaling area.

PRINTING A SELECTION, MULTIPLE WORKSHEETS, AND WORKBOOKS

Excel offers several ways to EXERCISE NOTES


print, so you can print selected Exercise File: Bookings6-11.xlsx
data, multiple worksheets, or Exercise: Print or print preview cells A4:E30.
an entire workbook. Print or print preview the Tuesday, Thursday, and
Print Selected Data Summary worksheets.
Selecting data and then printing it lets you have complete control over what is
printed. This is sometimes easier than setting a print area.
1. Select the data you wish to print.
2. Click the File tab and select Print.
3. Click the Print Active Sheets button and select Print Selection from the
list.
4. Click the Print button.
Print Multiple Worksheets
You can print several worksheets at once.
1. Select multiple sheet tabs.
Tip: To select adjacent tabs, press and hold the <Shift> key and select
the first and last worksheet tabs you want to select. Or, to select non-
adjacent tabs, press and hold the <Ctrl> key and click the desired tabs.

142 Advance Spreadsheet Tools


2. Click the File tab and select Print.
3. Click the Print button.
Print a Single Workbook
Printing a workbook prints
all the worksheets in the
workbook.
1. Open the workbook
you wish to print.
2. Click the File tab and
select Print.
3. Click the Print Active
Sheets button and
select Print Entire
Workbook from the
list.
4. Click the Print button.
Fig. 6.23. Backstage View with multiple
pages selected for printing.
WORKING WITH MULTIPLE WORKBOOK WINDOWS
This lesson explains how to EXERCISE NOTES
view and work with more than Exercise File: Bookings6-12.xlsx
one workbook at a time. Exercise: Switch between the two workbooks. Arrange
the windows vertically.
Switch Between Open a new window of the Bookings workbook. Close
Workbook Windows the new window.
If you have more than one Close the Sales workbook.
workbook window open, you can quickly switch between the windows.
1. Click the Excel button in the
taskbar and select the window you
want to view.
Other Ways to Switch Between
Workbooks: Click the View tab
on the Ribbon and click the Switch
Windows button in the Window
group. Select the workbook you
want to view from the list. Fig. 6.24. The Arrange Windows dialog box.

Advance Spreadsheet Tools 143


The selected document window becomes the active document.
View Multiple Workbooks At Once
1. Click the View tab on the
Ribbon and click the Arrange
All button in the Window
group.
The Arrange Windows dialog
box appears, allowing you to
arrange the open workbooks
in Tiled, Horizontal, Vertical,
or Cascade order.
2. Select the option you want to
use.
Other Ways to View Multiple
Workbooks: Click the View
tab on the Ribbon and click
the View Side By Side
button in the Window group.
If the Compare Side by Side
dialog box appears, select the Fig. 6.25. Two workbooks arranged vertically.

workbook you want to display alongside the active workbook and click OK.
Tip: Click the Save Workspace button in the Window group to save the
layout of the open windows for future access.
Create Another Workbook Window
You can view a workbook in more
than one window at a time.
1. Click the View tab on the
Ribbon and click the New
Window button in the
Window group.
Another window with the
workbook’s contents appears
in the Excel program window.

Fig. 6.26. A workbook with multiple workbook windows open.

144 Advance Spreadsheet Tools


Tips
• Viewing the same workbook in multiple windows does not create
a new file. When a change is made to the workbook in one window,
the change is reflected in all the windows for the workbook.
• Each instance of a workbook window is marked in the title bar. For
example, if a new window was opened for Workbook 1, the two
windows would be named Workbook 1:1 and Workbook 1:2.

CREATING A TEMPLATE

If you find yourself recreating


EXERCISE NOTES
the same type of workbook over
Exercise File: Bookings6-13.xlsx
and over, you can save yourself
Exercise: Save the file as an Excel Template and name it
some time by using a template. “Bookings”.
A template is a workbook that
contains labels, formulas, formatting, and macros you use frequently.
Once you have created a template you can use it to create new workbooks.
1. Create or open a workbook to use as a template.
2. Click the File tab on the
Ribbon and select Save
As. The Save As dialog box
appears.
There are three basic types of
templates you can create:
›› Excel Template: This is
the standard Excel 2007
template that works with
XML.
›› Excel Macro-Enabled
Template: This type of Fig. 6.27. Saving a workbook as an Excel Template.
template is the standard template but is enabled to work with XML.
›› Excel 97-2003 Template: Use this to create workbooks that are
compatible with earlier versions of Excel. These files are not XML
compatible.
3. Click the Save as type list arrow and select the type of template you want to
create.
Advance Spreadsheet Tools 145
Once you change the file type to a template, the location automatically
changes to the Templates folder.
4. Enter a name for the template in the File name text box.
5. Click the Save button.
The template is saved. Now you can use the template to create new
workbooks.

Managing Workbooks Review


QUESTIONS
1. Which of the following is NOT a view option in Excel?
(a) Normal view (b) Edit view
(c) Page Layout view (d) Page Break Preview view
2. You can use the Zoom slider to change the magnification level of a worksheet. (True or
False?)
3. To select a worksheet, click the View tab on the Ribbon, click the Sheet button in the
Worksheet Selection group, and select the sheet you want to make active. (True or
False?)
4. You can add additional worksheets to a workbook. (True or False?)
5. You can move a worksheet within a workbook simply by dragging the sheet’s tab to a
new location. (True or False?)
6. Splitting and freezing a workbook window are exactly the same thing. (True or False?)
7. You can work with headers and footers easiest in Page Layout View. (True or False?)
8. When you hide a row, column, or worksheet, the hidden data is deleted. (True or False?)
9. In Page Break Preview view, you can move a page break by clicking and dragging it to a
new location. (True or False?)
10. In Page Break Preview view, you can move a page break by clicking and dragging it to a
new location. (True or False?)
11. Which of the following is NOT a preset margin size setting available in Excel?
(a) Large (b) Normal
(c) Wide (d) Narrow
12. The Sheet Options group on the Page Layout tab has commands that allow you to view
or print which of the following:
(a) The Formula Bar (b) Formulas
(c) Page numbers (d) Gridlines

146 Advance Spreadsheet Tools


13. The default paper size in Excel is:
(a) Legal (b) Letter
(c) Executive (d) A4
14. Which of these is not a possible way to print?
(a) Print selected data
(b) Print multiple workbooks
(c) Print an entire workbook
(d) Print multiple worksheets from a workbook

ANSWERS
1. (b) Edit view is not an Excel view option.
2. True. The Zoom slider on the status bar lets you zoom in and out of a worksheet.
3. False. To select a worksheet, click that worksheet’s tab at the bottom of the workbook
window.
4. True. You can add and delete worksheets.
5. True. You can move a worksheet within a workbook simply by dragging the sheet’s tab
to the new location. Hold down the Ctrl key if you want to copy it.
6. False. They are similar, but splitting allows you to scroll through all window sections
independently. Also, you can move split lines but not frozen sections.
7. True. Page Layout View makes it easy to work with headers and footers.
8. False. Hiding data doesn’t delete it, it just hides it from view until it is unhidden.
9. True. In Page Break Preview view, you can move a page break by clicking and dragging
it to a new location.
10. True. In Page Break Preview view, you can move a page break by clicking and dragging
it to a new location.
11. (a) Large is not a margin size option in Excel.
12. (d) You can view or print gridlines and headings using the commands in the Sheet
Options group.
13. (b) Letter is the default paper size in Excel.
14. (b) In Excel 2010, you can only print one workbook at a time.

Advance Spreadsheet Tools 147


More Functions Chap
7
and Formulas ter

Formulas are the heart and soul of a spreadsheet. Without formulas, Excel would
be nothing more than a grid for displaying numbers and text. As you will see in this
chapter, formulas can do a lot more than just adding, subtracting, multiplying, and
dividing. Excel has hundreds of different formulas you can use to create complex
statistical, financial, and scientific calculations. The most expensive calculator in
the world couldn’tcome close to matching all of Excel’s functions.
In this chapter, you’ll learn about more complex formula writing, how to insert
and edit functions, how to define names,and how to trace formulas and diagnose
errors.

USING EXERCISE FILES

This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and close
the exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep
the file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the
exercisesin a chapter can be performed in succession from the first lesson to the
last.

FORMULAS WITH MULTIPLE OPERATORS

Formulas can contain several


EXERCISE
values, such as 81 and 3.5; cell
Exercise: Open a new blank workbook. In cell A1, enter
references, such as B5 and
=(20+5)/(10-5). In cell A2, enter =20+5/10-5.
C1:D11; operators, such as *
Notice that the parentheses cause the formulas to have
(multiplication) and + different results.
(addition); and functions, such Close the workbook without saving.

148 Advance Spreadsheet Tools


as SUM and AVERAGE. When you combine several operations and functions into a
single formula, Excel performs the operations in a predetermined order.
When a formula contains
several operators with the same
precedence, Excel calculates
the formula from left to right.
You can change the order by
enclosing the part of the formula
you want Excel to calculate first Fig. 7.1. Understanding how formulas with
multiple operators are performed in Excel.
in parentheses. The table below,
Order in Which Excel Performs operations in Formulas, is a good reference for how
to structure formulas with multiple operations.
Tip: All formulas must begin with an equal sign (=).
Table 7-1: Order in Which Excel Performs Operations in Formulas
() = Parentheses change the order of evaluation. For example:
Operations performed in this order

(20+5)/(10-5) would add 20 and 5 (25), subtract 10 by 5


(5) and then divide the results to equal 5.
But…
=20+5/10-5 would divide 5 by 10 (0.5), add the result to
20 (20.5) and then subtract 5 to equal 15.5.
: Reference Operator
% Percent
^ Exponentiation
* and / Multiplication and division
+ and - Addition and subtraction
= < > <= >= Comparison

INSERTING AND EDITING A FUNCTION

There are several hundred functions available in Excel. Some are simple, such as
the SUM function. Others are much more complex and contain several different

Advance Spreadsheet Tools 149


arguments. For example, the
EXERCISE NOTES
syntax for the DB function,
Exercise File: Sales7-1.xlsx
which is used to depreciate an
Exercise: Use the Insert Function dialog box to insert the
asset, is DB(cost, salvage, life,
AVERAGE function in cell B13 and find the average of all
period, month). the Net Inc. values (B11:G11).
Fortunately, the Insert Use the Date & Time button in the Function Library group
Function feature is available to on the Ribbon to insert the TODAY function in cell A1.
help you select, enter, and edit
worksheet functions.
Insert a function using the Insert Function dialog box
1. Select the cell where
you want to enter
the formula and click
the Insert Function
button on the Formula
Bar.
The Insert Function
dialog box appears. The
table on the next page,
Function Categories,
describes the function
categories available in
Excel.
Other Ways to Open
the Insert Function
Dialog Box: Click the Fig. 7.2. Selecting a function category in the Insert Function dialog box.
Formulas tab on the
Ribbon and click the Insert Function button in the Function Library group.
2. Click the Or select a category list arrow and select a function category.
All the functions in the selected category appear in the “Select a function”
list.
Other Ways to Find a Function in the Insert Function Dialog Box: Type

a description of the function in the “Search for a function” text box and click
Go. The related functions appear in the “Select a function list.”

150 Advance Spreadsheet Tools


3. Select the function you want to use in the “Select a function” list and click
OK.
The Function
Arguments dialog
box appears. Here
you need to enter the
arguments, which
are the values or cell
references needed to
calculate the function.
Tip: Instead of
typing argument
values into the
Fig. 7.3. Function Arguments dialog box.
dialog box, you
can click a Collapse Dialog button, select a cell range in the worksheet,
and then click the Expand Dialog button.
4. Enter the arguments in the text boxes and click OK. The function is inserted
into the cell.
Insert a Function Using the Function Library
Another way you can access
functions by category is in the
Function Library group.
1. Select the cell where
you want to enter the
formula and click the Fig. 7.4. The Function Library group on the Formulas tab.
Formulas tab on the
Ribbon.
In the Function Library group, you’ll see the same categories of functions
that are available in the Insert Function dialog box, plus the AutoSum button
that automatically inserts the Sum function.
2. Click a function category button in the Function Library and select the
function you want to use.
The Function Arguments dialog box appears.
3. Enter the arguments in the text boxes and click OK.

Advance Spreadsheet Tools 151


The function is inserted into the cell.
Tip: If you click a function category button in the Function Library and
then point to a function, a ScreenTip appears that describes the formula.
Edit a Function
1. Select the cell with the function you want to edit. Choose from the following
options:
Click the Insert Function button on the formula bar and edit the function
arguments in the Function Arguments dialog box.
Click in the formula bar and directly edit the function in the formula bar.
Table 7-2: Function Categories
Most Recently Used Lists the functions you’ve used most recently.
All Lists every function available in Excel.
Financial Lists financial functions to calculate interest, payments,
loans, etc.
Date & Time Lists functions to calculate date and times values.
Math & Trig Lists math and trigonometry functions, such as SUM,
COS, and TAN.
Statistical Lists statistical functions, to calculate averages, standard
deviations, etc.
Lookup & Reference Lists functions that lookup or reference values.
Database Lists functions that lookup or calculate values in a list or
database.
Text Lists functions that can be used with text or labels.
Logical Lists IF…THEN conditional-type functions.
Information Lists functions that return information about values and
the worksheet itself.
Engineering Lists functions used in engineering calculations.
Cube Lists functions that extract data from OLAP cubes.

152 Advance Spreadsheet Tools


AUTOCALCULATE AND MANUAL CALCULATION

You have a few options for how


EXERCISE NOTES
Excel calculates worksheets.
Exercise File: Sales7-2.xlsx
Besides using formulas, Excel
Exercise: Select the cell range B9:G9 and look at the
can automatically perform status bar to see the average monthly expenses.
certain calculations—all you Select the Manual calculation option. Enter 12,000 in
have to do is select the cells. cell B3 and notice that no other values change. Click the
You can also tell Excel when Calculate Now button and watch the worksheet formulas
you want to manually calculate calculate new values.
formulas in a worksheet. Change back to Automatic calculation.

Use AutoCalculate
You don’t always
need to enter a
formula to make a
quick calculation. For
example, if you have
a column containing
a few numbers you
want to add together,
you can simply select
the cells and look to
the status bar for the
answer— Excel has
calculated the sum
for you there.
1. Select the cells
you want to
average, count Fig. 7.5. The AutoCalculate feature in the status bar.

or sum.
Excel’s AutoCalculate feature takes the cells you selected and displays the
results to these common calculations in the status bar, as shown in the
example to the right.
Change AutoCalculate options
You can also change and add calculations in the status bar.

Advance Spreadsheet Tools 153


1. Right-click the status bar.
The Customize Status Bar list appears. Here you can add Numerical Count,
Minimum or Maximum to the status bar. You can also remove Average,
Count or Sum if you’d like. The table to the right, AutoCalculate Options in
the Status Bar, displays more information about these options.
2. Select the calculations that you want to be displayed on the status bar.
The calculations you selected appear on the status bar.
Manual Formula Calculation Options
By default, Excel recalculates all the formulas in a workbook whenever you change
a value that affects another value. However, you can change the calculation options
so that formulas will only calculate when directed by you.
1. Click the Formulas tab on the Ribbon and click the Calculation Options
button in the Calculation group. Three options appear in the list:
Table 7-3: AutoCalculate Options in the Status Bar
By Average Average of selected cells.
Default Count Number of selected cells that contain data.

Sum Sum of selected cells.


Optional Numerical Count Number of selected cells that contain numbers.

Minimum Smallest value in the selection.


Maximum Largest value in the selection.
›› Automatic: This is selected by default. Values are automatically
recalculated whenever a change occurs in the workbook.
›› Automatic Except for Data Tables: The workbook is automatically
updated with any changes. Data tables are only updated manually.
›› Manual: The workbook is only updated when directed by the user.
2. Select a calculation option.
If you select an option other than Automatic, you will need to tell Excel when
you want to recalculate.
The Calculate Now button calculates the entire workbook when you click it,
while the Calculate Sheet button only calculates the current worksheet.
3. Click the Calculate Now or Calculate Sheet button in the Calculation group.

154 Advance Spreadsheet Tools


The workbook or worksheet recalculates.
Other Ways to Calculate: Press <F9> to Calculate Now; press <Shift> +

<F9> to Calculate Sheet.

DEFINING NAMES

Defining a name makes your


EXERCISE NOTES
formulas much easier to
Exercise File: Sales7-3.xlsx
understand and maintain.
Exercise: Create defined names for each of these cell
For example, you could ranges—B5:B8, C5:C8, D5:D8—and name them
name the cell range B16:H16 JanExpenses, FebExpenses, and MarExpenses,
“Total Sales.” Then, instead of respectively.
totaling sales with the formula
=SUM(B16:H16), you could use the defined name to create the more readable
formula, =SUM(TotalSales).
You can define a name a cell range, formula, constant, or table.
Define a Name for a Cell Range
You can define a name for a cell, cell range,
or even multiple non-adjacent cells that you
have selected.
1. Select the cells you want to name.
If you want to select a range of non-
adjacent cells, press and hold the
<Ctrl> key while selecting cells.
2. Click the Name Box on the formula
bar. Fig. 7.6. A defined name in the Name Box.

The Name Box is at the left end of the formula bar and displays the name of
the cell in the upper left corner of the currently selected range.
3. Type a name for the selection.
You can enter up to 255 characters.
 Trap: You can’t use a cell reference, like B2, as a name, and you can’t use
spaces in a name (use an underscore or period instead).
4. Press the <Enter> key.
The defined name is confirmed.

Advance Spreadsheet Tools 155


Other Ways to Define a Name for a Cell Range: You can use existing row

and column labels as defined names. Select the cell range to name, including
the row and/or column labels. Click the Formulas tab on the Ribbon and
click the Create from Selection button. Select the name options you want
to use and click OK. The resulting defined name refers to only the cells with
values, not the cells with the row and column labels.
Define Names with the New Name Dialog Box
For more options and flexibility when defining names you can use the New Name
dialog box. Here you can define names for cell references, constants and formulas.
1. Click the Formulas tab on the Ribbon and click the Define Name button in
the Defined Names group.
The New Name dialog box appears.
Other Ways to Display New Name Dialog Box: Click the Formulas tab on

the Ribbon. Click the Name Manager button in the Defined Names group.
Click the New button.
2. Enter a name in the Name text box.
The name should be something that
is easy to remember, and identifies
what is being named.
3. Click the Scope list arrow and select
the scope you want to use.

The scope determines whether
the name is recognized by the
whole workbook or just individual
worksheets within the workbook. Fig. 7.7. The New Name dialog box.

Tip: Names in which the scope is a worksheet can be recognized in


other sheets of the workbook.
Just qualify the sheet name first, for example: Sheet1!Income_FY08.
4. (Optional) Enter a comment in the Comment box.
The comment will be visible in the Name Manager dialog box.
5. Complete the “Refers to” box as necessary.
The “Refers to” box displays the currently selected cell or cell range. You
have a few options:

156 Advance Spreadsheet Tools


›› Define a name for the current cell range: Keep the current cell range
selected. Do nothing.
›› Select a different cell range: In the “Refers to” box, select a different
cell range: Click the Collapse Dialog button, select different cells on the
worksheet and click the Expand Dialog button.
›› Define a name for a constant: In the “Refers to” box, enter an equal sign
(=) followed by a constant value, such as 7.2.
›› Define a name for a formula: In the “Refers to” box, enter an equal sign
(=) followed by a formula, such as FV(8,6,C4).
6. Click OK.
The name is defined and the dialog box closes.
Tips
• You can use upper- and lowercase letters in defined names, but Excel
doesn’t distinguish between them.
• Besides creating defined names, you can also create “table names.”
Excel automatically creates a table name like “Table1” when a table
is created, but you can use the Name Manager to change the name.

USING AND MANAGING DEFINED NAMES

Once you create defined


EXERCISE NOTES
names, you can use them in
Exercise File: Sales7-4.xlsx
formulas. You can also use the
Exercise: Edit the defined names in the Name Manager
Name Manager dialog box to dialog box so they read Jan, Feb, and Mar instead of
view, edit, delete, and create JanExpenses, FebExpenses, and MarExpenses.
new defined names. In cell B14, enter the formula =AVERAGE(Jan,Feb,Mar) to
Use Defined Names find the average expenses per month for the first quarter
of the year.
Once cells have been given
Delete the JanIncome defined name.
names, they are easy to
reference in other formulas.
1. Click the Formulas tab on the Ribbon, click the Use in Formula button in
the Defined Names group, and select a name from the list.
The defined name is inserted into the currently selected cell or the formula
you are editing.
Other Ways to Use a Name: Type a defined name in a formula.

Advance Spreadsheet Tools 157


View Defined Names
There are a few places you can view all
of a workbook’s defined names:
›› Name Manager dialog box:
Click the Formulas tab on the
Ribbon and click the Name
Manager button in the Defined
Names group. Here you can see
a list of the defined names and
table names. The list includes
the name, current value, current
reference for the name, scope,
and any comments related to the Fig. 7.8. As you enter defined names in a formula, the
cells they represent are highlighted.
name. You can click and drag the
right column border to change
the width of a column.
›› Worksheet cells: Find an area
in the worksheet with two blank
columns. Select a cell that will
become the upper-left corner of
the list. Click the Formulas tab
on the Ribbon, click the Use in
Formula button and select Paste
Names. Click the Paste List
button. The defined names and
Fig. 7.9. Defined names are denoted in the Name
the related descriptions appear Manager dialog box by an icon that looks like a note tag.
in the columns. Table names appear with a table icon.

›› Name Box list: Click the arrow next to the Name Box to view the defined
names. If you select a name here, the cell range that is defined by that name
is selected in the worksheet.
Edit Defined Names
You can use the Name Manager dialog box to
edit defined names.
1. Click the Formulas tab on the Ribbon and
click the Name Manager button in the
Defined Names group. The Name Manager
dialog box appears.
Fig. 7.10. The Edit Name dialog box.

158 Advance Spreadsheet Tools


2. Select a defined name and click the Edit button.
The Edit Name dialog box appears. This dialog box is essentially the same as
the New Name dialog box.
Here you can change the name of the defined name or change what the name
refers to.
3. Make changes to the defined name as desired, then click OK.
You return to the Name Manager dialog box.
4. Click Close.
Other Ways to Edit Defined Names: Select the defined name you want to

edit in the Name Manager dialog box, then change the information in the
“Refers to” box.
Delete Defined Names
If you want to remove a defined name, you can delete it in the Name Manager
dialog box. You can also delete more than one defined name at once.
1. Click the Formulas tab on the Ribbon and click the Name Manager button
in the Defined Names group. The Name Manager dialog box appears.
2. Select the defined name(s) you want to delete.
Press and hold the <Shift> key to select multiple adjacent names or the
<Ctrl> key to select multiple non-adjacent names for deletion.
3. Click the Delete button.
A message appears, asking if you’re sure you want to delete the defined
name or names.
4. Click OK.
The defined name or names are deleted.
Tips
• In the Name Manager dialog box, you can filter the list of defined
names by scope; whether or not they have errors; or by type of name
(defined or table). Click the Filter button and select the filter you
want to use.
• You can also click the New button in the Name Manager dialog box
to define a new name.

Advance Spreadsheet Tools 159


DISPLAYING AND TRACING FORMULAS

You can better understand the EXERCISE NOTES


formulas in a workbook by Exercise File: Sales7-5.xlsx
displaying formulas, tracing Exercise: Display, then hide, the formulas in the
precedents and dependents, worksheet.
and using the Watch Window. Select cell B14 and trace precedents, then remove the
By default, Excel displays arrows.
the results of formulas in the Add cell B14 to the watch window. Then, change cell
worksheet instead of showing B5 to $1,000 to watch the value update in the watch
window. Close the Watch Window.
the actual formulas.
However, you can choose to have Excel display the formulas so you can see
how they’re put together.
Also, by tracing precedents and dependents, you can display arrows that show
you which cells affect a selected cell and which cells that cell affects. And the
Watch Window allows you to constantly keep tabs on important formulas and
their values.
Display Formulas
1. Click the Formulas tab on the
Ribbon and click the Show
Formulas button in the Formula
Auditing group.
Formulas are displayed in the
worksheet and the columns widen Fig. 7.11. The Formula Auditing group on
to accommodate the formulas, if the Formulas tab.
necessary.
Tip: If you display formulas and then select a cell that contains a formula,
colored lines appear
around cells that are
referenced by the formula.
Now let’s hide the formulas
again.
2. Click the Show Formulas
button in the Formula Auditing
group again.
Fig. 7.12. A worksheet with formulas displayed.

160 Advance Spreadsheet Tools


Formulas are no longer displayed and the columns return to their original
sizes.
Tip: If you print a worksheet with formulas displayed, the formulas
print instead of values.
Trace Formula Precedents and Dependents
Sometimes you may want to know what other cells are affected by or are affecting
a certain cell. You can trace the influence of formulas by displaying arrows that
show precedent and dependent cells.
1. Select a cell that contains a formula you want to trace.
2. Click the Formulas tab on the Ribbon.
In the Formula Auditing group, there are a couple different buttons you can
choose from:
›› Trace Precedents: Displays arrows that show what cells affect the
currently selected cell.
›› Trace Dependents: Displays arrows that point to cells that are affected
by the currently selected cell.
3. Click the Trace Precedents
or Trace Dependents button
in the Formula Auditing
group.
Arrows appear, illustrating
how the cells relate to the
formula in the currently
selected cell. Dots appear on
the arrows to point out which Fig. 7.13. Arrows tracing formula precedents for B14.

specific cells are involved. If there are precedents or dependents on another


worksheet, an icon appears letting you know that.
Once you’re done analyzing your formulas, you can remove the arrows.
4. Click the Remove Arrows button in the Formula Auditing group.
All the tracing arrows disappear from the worksheet.
Tip: If you want to remove only precedent arrows or only dependent
arrows, click the Remove Arrows button list arrow and select an
option.

Advance Spreadsheet Tools 161


Use the Watch Window
The Watch Window allows you
to monitor the values of certain
cells as changes are made to
worksheets. You can add cells
you want to watch from different
worksheets and even different
workbooks. Fig. 7.14. The Watch Window.

1. Click the Formulas tab on the Ribbon and click the Watch Window button
in the Formula Auditing group.
The Watch Window appears. Here you can add cells you want to track.
2. Click the Add Watch button.
The Add Watch dialog box appears.
3. Select the cell or cell range you want to watch and click Add.
The workbook and worksheet names, defined name, cell reference, current
value, and formula for the selected cell(s) appear in the Watch Window.
Tip: If you no longer want to track a certain cell, select it in the Watch
Window and click the Delete Watch button.
4. Click the Watch Window’s Close button. The Watch Window closes.

UNDERSTANDING FORMULA ERRORS

Sometimes Excel comes


EXERCISE NOTES
across a formula that it cannot
Exercise File: Sales7-6.xlsx
calculate. When this happens,
Exercise: Add “/0” onto the end of the formula in cell
it displays an error value.
B13 so that the #DIV/0! error appears.
Error values occur because of
Then add “+A8” onto the end of formula in cell B14 so
incorrectly written formulas, that the #VALUE! error appears.
referencing cells or data Display the Error Checking dialog box, and use the Edit
that don’t exist, or breaking in Formula Bar button to delete “/0” from cell B13 and
the fundamental laws of “+A8”
mathematics. Excel includes from B14.
an Error Checking feature to help you deal with errors.
1. Click the Formulas tab on the Ribbon and click the Error Checking button
in the Formula Auditing group.

162 Advance Spreadsheet Tools


The cell pointer moves to the first cell that contains an error and the Error
Checking dialog box appears. Here you can see the formula arguments that
are causing the error and Excel explains the error type. See the table below,
Excel Errors, for further description of errors in Excel.
The Error Checking dialog
box also has several
buttons to help you with
errors:
›› Help on this error:
Displays a Help topic
that explains the type of
error you’re seeing.
›› Show Calculation
Steps: Displays the
Evaluate Formula
dialog box, which
breaks down the Fig. 7.15. The Error Checking dialog box.
formula arguments for
you so that you can isolate the error. Click Evaluate to show the current
value of the underlined argument or click Step In to examine the source
of a particular argument.
›› Ignore Error: Allows you to skip the current error and move to the next
error in the worksheet.
›› Edit in Formula Bar:
Places the cursor in the
formula bar, where you
can directly edit the
formula arguments and
fix the error.
Tip: You can click
the Previous or Next
buttons to move
Fig. 7.16. The Evaluate Formula dialog box.
between errors in the
worksheet, and you can click the Options button to change the error
checking rules.

Advance Spreadsheet Tools 163


Other Ways to display the Evaluate Formula Dialog Box: Click the
Evaluate Formula button in the Formula Auditing group.
2. Click the button you want to use in the Error Checking dialog box. Now you
can follow Excel’s advice to fix the error.
Other Ways to Fix an Error: Select the cell that contains an error and point
to the SmartTip icon that appears next to the cell. A tip appears, telling you
why you are getting this type of error. Click the list arrow and select an error
checking option.
Tips
• Another way you can analyze errors is by tracing them with arrows.
Select a cell with an error, click the Error Checking list arrow in the
Formula Auditing group, and select Trace Error. Arrows appear,
pointing out the cells that are involved in the erroneous formula.
• If a formula contains its own cell location as a reference, it results in a
circular reference, and the formula can’t calculate correctly. To locate
circular references in your worksheet, click the Error Checking list
arrow in the Formula Auditing group, point to Circular References,
and select a cell that contains a circular reference from the list.
Table 7-4: Excel Errors
##### The numeric value is too wide to display within the cell. You can resize the
column by dragging the boundary line between the column headings.
#VALUE! You entered a mathematical formula that references a text entry instead of
a numerical entry.
#DIV/0! You tried to divide a number by zero. This error often occurs when you create
a formula that refers to a blank cell as a divisor.
#NAME? You entered text in a formula that Excel doesn’t recognize. You may have
misspelled the name or function, or typed a deleted name. You also may have
entered text in a formula without enclosing the text in double quotation
marks.
#N/A This error occurs when a value is not available to a function or a formula. If
certain cells on your worksheet contain data that is not yet available, enter
#N/A in those cells. Formulas that refer to those cells will then return #N/A
instead of attempting to calculate a value.
#REF! The #REF! error value occurs when a cell reference is not valid. You probably
deleted a cell range that is referenced in a formula.

164 Advance Spreadsheet Tools


#NUM! The #NUM! error value occurs when you use an invalid argument in a
worksheet function.
#NULL! You specified an intersection of two ranges in a formula that do not intersect.

USING LOGICAL FUNCTIONS (IF)

This lesson introduces a very


EXERCISE NOTES
useful function, the IF function.
Exercise File: Functions.xlsx, IF worksheet
The IF function is a conditional
Exercise: Determine the Federal Income Tax for these
function or logical function
people and enter these arguments for the IF function in
because it will evaluate a cell B17:
condition you specify and Logical_test: B14>=500
return one value if the Value_if_true: B14*.15
condition is true and another Value_if_false: B14*.1
value if the condition is false. Copy the IF function from B17 to cells C17:H17.
For example, you could use the
IF function in an invoice to create a formula that would subtract a 5% discount
from the invoice if the total was more than $500.00, otherwise it wouldn’t subtract
anything.
The IF function is one of
the more difficult functions,
but it’s also very powerful.
1. Click the Insert
Function button on the
Formula bar. The Insert
Function dialog box Fig. 7.17. The syntax for the IF Function.
appears.
2. Click the Or select a category list arrow and select Logical.
Functions that fall under this category are shown in the Select a function
box.
3. Select IF in the Select a function box and click OK. The Function Arguments
dialog box appears.
Other Ways to Find a Function: Type the function’s name in the Search for

a function box. Or, select the function from the Select a function box.
You’re ready to start entering the IF formula. There are three parts in this
formula:

Advance Spreadsheet Tools 165


›› Logical Test: This is this first argument, and it evaluates a statement as
true or false.
›› Value if True:
If the statement
in the Logical
Test is true,
then this value
is entered.
›› Value if False:
If the statement
in the Logical
Test is false,
then this value Fig. 7.18. The Function Arguments dialog box.
is entered.
3. Enter the arguments for the IF function and click OK. The function is run,
and the results appear in the cell.
Tip: Remember, you can also create cell references by clicking the cell
or cell range you want to reference. Click the Collapse Dialog button to
collapse the function palette and select the cell range if the Function
Arguments dialog box is in the way.
Other Ways to Use the IF Function in a Formula: Write the formula using
the syntax
=IF(logical_test,value_if_true,value_if_false).

USING FINANCIAL FUNCTIONS (PMT)

The PMT function is a very EXERCISE NOTES


valuable function if you work Exercise File: Functions.xlsx, PMT worksheet
with real estate, investments, Exercise: In cell D4, create a PMT function that uses
or are considering taking out a these arguments:
loan. The PMT function Rate: C4/12
calculates the payment for a Nper: B4*12
loan based on periodic Pv: A4
payments and a constant The result is a negative number: Add a – (negative)
interest rate. For example, say symbol between the = and PMT in the Formula bar so
the value is positive.
you want to take out a $10,000
Copy the PMT function to D5:D6.

166 Advance Spreadsheet Tools


car loan at 8% interest and will pay the loan off in four years. You can use the PMT
function to calculate that the monthly payments for such a loan would be $244.13.
You can also use the PMT function
to determine payments to annuities or
investments. For example, if you want to
save $50,000 in 20 years by saving the
same amount each month, you can use
PMT to determine how much you must
save.
1. Click the Insert Function button on
the Formula bar. The Insert Function Fig. 7.19. The syntax for the PMT Function.

dialog box appears.


2. Click the Or select a
category list arrow
and select Financial.
3. Select PMT in the
Select a function box
and click OK.
The Function
Arguments dialog
box appears.
4. Enter the required Fig. 7.20. The Function Arguments dialog box.
arguments for the PMT function and click OK.
The results of the function are
displayed in the selected cell.
Tip: Remember, you can

also create cell references by
clicking the cell or cell range
you want to reference. Click
Fig. 7.21. The results of the PMT function.
the Collapse Dialog button
to collapse the function palette and select the cell range if the Function
Arguments dialog box is in the way.
Other Ways to Use the PMT Function in a Formula: Write the formula

using the syntax PMT(rate,nper,pv)

Advance Spreadsheet Tools 167


USING DATABASE FUNCTIONS (DSUM)

Excel’s database functions EXERCISE NOTES


perform calculations only for
Exercise File: Functions.xlsx, DSUM worksheet
records that meet the criteria
Exercise: Enter the DSUM function in C27 using these
you specify. All the database arguments:
functions use the same basic Database: A1:I23
syntax: =Function(database, Field: “Annual Trips”
field, criteria). These Criteria: C25:C26
arguments (parts) of a
database function include:
›› Database: Is the cell
range that makes up the
list or database.
›› Field: Indicates which
column is used in the
function. You can refer
Fig. 7.22. The syntax for the DSUM function.
to fields by their column
labels as long as you enclose them with double quotation marks, such
as “Name”. You can also refer to fields as a number that represents the
position of the column in the list: 1 for the first column in the list, 2 for
the second, and so on. Make sure you refer to their position in the list, and
not the column heading numbers!
›› Criteria: Is a reference to the cell or cell range that specifies the criteria
for the function.
This lesson explains how to use database functions by creating a formula with
the simplest database function— the DSUM function.
1. Click the Insert
Function button
on the Formula bar.
The Insert Function
dialog box appears.
2. Click the Or select a
category list arrow
and select
Fig. 7.23. The Function Arguments for the DSUM function.

168 Advance Spreadsheet Tools


Functions that fall under this category are shown in the Select a function
box.
3. Select DSUM in the
Select a function box
and click OK.
The Function
Arguments dialog
box appears.
4. Enter the required & Exercise

arguments for the • Exercise File:


C27 displays the number of records in the
DSUM function and Annual Trips column (column I) that match the criteria in C26. • Exercise:
click OK. Fig. 7.24. An example of the DSUM function.

Tip: It is important to understand how the field must be entered: either


the name in double quotations, or by the number (for example, column
A is 1, B is 2, and so on).
Other Ways to Use the DSUM Function in a Formula: Write the formula
using the syntax
=DSUM(database, field, criteria).

USING LOOKUP FUNCTIONS (VLOOKUP)

The VLOOKUP function looks


EXERCISE NOTES
up information in a worksheet.
Exercise File: Functions.xlsx, VLOOKUP worksheet
The VLOOKUP searches
Exercise: Start by adding a label for the results of the
vertically down the left most VLOOKUP function and criteria: Type Sales by Client in
column of a cell range until cell E25 and type 21 in cell E26.
it finds the value you specify. Enter the VLOOKUP function in E27 using these
When it finds the specified arguments:
value, it then looks across the Lookup_value: E26
row and returns the value Table_array: A1:J23
in column you specify. The Col_index_num: 9
VLOOKUP function works a lot Range_lookoup: False
like looking up a number in a
phonebook: first you look down the phonebook until you find the person’s name,
then you look across to retrieve the person’s phone number.

Advance Spreadsheet Tools 169


Tip: It’s important to understand that VLOOKUP only looks down the
column that is farthest left in the specified cell range. In then looks
across the row.
1. Click the Insert Function
button on the Formula bar.
The Insert Function dialog
box appears.
2. Click the Or select a
category list arrow
and select Lookup and Fig. 7.25. The syntax for the VLOOKUP function.
Reference.
Functions that fall under this category are shown in the Select a function
box.
3. Select VLOOKUP in the Select a function box and click OK.
The Function Arguments dialog box appears.
4. Enter the required
arguments for the
VLOOKUP function.
Other
Ways to
Use the VLOOKUP
Function in a
Formula: Write the
formula using the
syntax =VLOOKUP
(lookup_value,table_
array, col_index_ Fig. 7.26. The Function Arguments for the VLOOKUP function.
num)
Tip: The HLOOKUP function is similar to the VLOOKUP function, except
it searches horizontal from left to right across the top row of a cell range
until it finds the value you specify. When it finds the specified value it
then looks down the column to find the specified value. Because of the
way data is typically structured, VLOOKUP is much more powerful than
HLOOKUP.

170 Advance Spreadsheet Tools


USER DEFINED AND COMPATIBILITY FUNCTIONS

Functions are one of the


EXERCISE
major changes in Excel 2010.
Exercise: Understand the User Defined and Compatibility
Many functions have been function categories in Excel 2010.
renamed to better reflect their
usage, or replaced with a function that is more accurate. The descriptions for the
functions themselves are also clearer, so it easier to understand how a function is
to be used.
User Defined Functions
If add-ins that you install contain functions, these add-in or automation functions
will be available in this category.
Compatibility Functions
All the functions in this category have been replaced or renamed, but they are still
available for backward compatibility. Consider using the new functions instead of
these, because they may not be available in future versions of Excel.
Tables describing the rest of the function categories, along with more detailed
examples of the functions in each category, appear in the following pages.

FINANCIAL FUNCTIONS

Excel’s financial functions EXERCISE


are vital if you work with Exercise: Become familiar with Excel’s Financial functions.
investments or real estate.
Financial functions help you do things like determine loan payment amounts,
calculate the future value of investments, and find rates of return. This table lists
some of the Financial Functions available in Excel 2010.
Table 7-5: Overview of Financial Functions
FV =FV(rate, Calculates the future value of an investment based on
number of periodic, constant payments and a constant interest rate.
periods, Example: You plan to deposit $2,000 a year for 35 into an IRA,
payment, and you expect a 10% average rate of return.
present value,
=FV(10%,35,-2000) equals $542,048.74
type)

Advance Spreadsheet Tools 171


IMPT =IPMT(rate, Calculates the interest payment for over a specified period
period, number of time, with constant periodic payments and a constant
of periods, interest rate.
present value, Example: The following formula calculates the interest due
future value, in the first month of a three-year $8000 loan at 10 percent
type) annual interest:
IPMT(0.1/12, 1, 36, 8000) equals -$66.67
IRR =IRR(values, Calculates the internal rate of return of investment. The
guess) investments do not have to be equal, but they must occur at
regular intervals. The internal rate of return is the interest
rate received for an investment consisting of payments
(negative values) and income (positive values) that occur at
regular periods.
Example: You want to start a business. It will cost $40,000 to
start the business, and you expect to net the following income
in the first three years: $10,000,
$15,000, and $20,000. Enter the four values in the cells A1:A4
of the worksheet, making sure to enter the initial $40,000
investment as a negative value.
IRR(A1:A4) equals 5%
NPV =NPV(rate, Calculates the net present value of an investment by using
value1, value2, a discount rate and a series of future payments (negative
...) values) and income (positive values).
PMT =PMT(rate, Calculates the payment for a loan based on constant payments
number of and a constant interest rate.
periods, present Example: The following formula calculates the monthly
value, future payment on a $20,000 loan with an annual interest rate of
value, type) 9% that must be paid in 36-months.
PMT(9%/12, 36, 20000) equals ($635.99)
PV =PV(rate, Returns the present value of an investment.
number of Example: An annuity that pays $600 every month for the next
periods, 20 years costs $50,000, and the money paid out will earn
payment, future 7 %. You want to determine whether this would be a good
value, type) investment. Using the PV function, you find that the present
value of the annuity is:
PV(0.07/12, 12*20, 600, , 0) equals ($77,389.50)

172 Advance Spreadsheet Tools


RATE =RATE(total Determines the interest rate per period of an annuity.
number of Example: You want to calculate the rate of a four-year (48
payments, month) $8,000 loan with monthly payments of $200. Using
payment, the RATE function you find:
present value)
RATE(48, -200, 8000) equals 0.77 percent
This is the monthly rate, because the period is monthly. The
annual rate is 0.77%*12, which equals 9.24 percent.

DATE & TIME FUNCTIONS

You can use dates and time in your EXERCISE


formulas just like any other value.
Exercise: Become familiar with Excel’s functions.
For example, if cell A1 contained the
entry 5/1/12 you could use the formula =A1+100 to calculate the date 100 days
later, which is 8/9/12.
One very important thing to know about working with date and time functions:
while Excel can display dates and times using just about any format, it actually
stores dates as chronological numbers called serial values. So when you think of
dates as months, days, and, years, such as May 1, 2012, Excel thinks of dates in
terms of serial numbers, such as 36281.
Since the date and time formulas often return serial number values, you should
format any cells with date or time formulas with data and time formats that you
can easily understand. You can also create custom number formats to display the
results of date formulas. For example, the custom format dddd would display only
the day, Monday, instead of the entire date, 8/9/2012.
This table lists some of the Date & Time Functions available in Excel 2010.
Table 7-6: Overview of Date & Time Functions
DATE =DATE(year, month, Enters a date in the cell.
day) Example: DATE(12,5,1) equals May 1, 2012.
TODAY =TODAY( ) A special version of the DATE function. While the
DATE function can return the value of any date, the
TODAY function always returns the value of the
current date.
TIME =TIME(hour, minute, Enters a time in the cell. Uses a 24-hour (military)
second) time system.
Example: TIME(14,30) equals 2:30 PM.

Advance Spreadsheet Tools 173


NOW =NOW( ) A special version of the TIME function. While the
TIME function can return the value of any time,
the NOW function always returns the value of the
current time.
WEEKDAY =WEEKDAY (serial_ Returns a day of the week for a specific date.
number, return_ The serial_number argument is a date value (or
type) reference to one).
Example: WEEKDAY(“2/14/12”) equals
Wednesday.
YEAR =YEAR (serial_ Returns a value of the year for a specific date.
number, return_ The serial_number argument is a date value (or
type) reference to one).
Example: YEAR(“3/15/2012”) equals 1998.
MONTH =MONTH (serial_ Returns a value of the month for a specific date.
number, return_ The serial_number argument is a date value (or
type) reference to one).
Example: MONTH(“3/15/2012”) equals 3.
DAY =DAY(serial_number, Returns a value of the day for a specific date.
return_type) The serial_number argument is a date value (or
reference to one).
Example: DAY(“3/15/2012”) equals 15.

Table 7-6: Overview of Date & Time Functions


HOUR =HOUR (serial_number) Returns hour value for a specific time. The
serial_number argument is a time value (or
reference to one). Uses a 24-hour time format.
Example: HOUR(“12:15:45”) equals 12.
MINUTE =MINUTE (serial_number) Returns the minute value for a specific time.
The serial_number argument is a time value
(or reference to one). Uses a 24-hour time
format.
Example: MINUTE(“12:15:45”) equals 15.
SECOND =SECOND (serial_number) Returns a value of a second for a specific
time. The serial_number argument is a time
value (or reference to one). Uses a 24-hour
time format.
Example: SECOND(“12:15:45”) equals 45.

174 Advance Spreadsheet Tools


HOUR =HOUR(serial_number) Returns the hour as a number from 0 (12:00
A.M.) to 23 (11:00 P.M.).
Example: HOUR(“3:30 PM”) equals 15.
DAYS360 =DAYS360(start_date,end_ Returns the number of days between two
date) dates based on a 360-day year (twelve 30-day
months), which is used in some accounting
calculations.
Example: DAYS360(“1/30/12”, “2/1/12”)
equals 1.

MATH & TRIG FUNCTIONS

You can find many of Excel’s


EXERCISE
mathematical functions on a typical
Exercise: Become familiar with Excel’s Math &
scientific calculator. If you still Trig functions.
remember youralgebra classes, many
of these functions, such as SIN, COS, and LOG should be familiar to you.
This table lists some of the Math & Trig Functionsavailable in Excel 2010.
Table 7-7: Overview of Math & Trig Functions
ABS =ABS(number) Determines the absolute value of a number.
The absolute value of anumber is the number
without its sign.
ACOS =ACOS(number) Returns the arccosine of an angle. ACOS is the
inverse of the COSfunction.
ACOSH = ACOSH(number) Returns the inverse hyperbolic cosine of a
number.
AGGREGATE =AGGREGATE(…) Returns an aggregate in a list or database.
ASIN =ASIN(number) Returns the arcsine of an angle. ASIN is the
inverse of the SINfunction.
CEILING =CEILING(number, Rounds a number up, to the nearest multiple
CEILING. significance) of significance.
PRECISE =CEILING. Rounds a number up, to the nearest integer or
PRECISE(number, to the nearestmultiple of significance.
significance)

Advance Spreadsheet Tools 175


COMBIN =COMBIN(number, Calculates the number of possible
number_chosen) combinations from a givennumber of items.
Example: You want to form a two-person team
from five candidates, and you want to know
how many possible teams can be formed.
COMBIN(5, 2) equals 10 teams.
COS =COS(number) Returns the cosine of an angle.
DEGREES =DEGREES(angle) Converts radians into degrees.
EVEN =EVEN(number) Rounds a number up to the nearest even or
ODD =ODD(number) odd integer.
EXP =EXP(number) Calculates the value of the constant e
(approximately 2.71828182845904) raised
to the power specified by its argument.
Example: EXP(2) equals e2, or 7.389056
FACT =FACT(number) Calculates the factorial of a number. The
factorial of a number is the product of all the
positive integers from one up to the specified
number.
Example: FACT(5) equals 1*2*3*4*5 equals
120
FLOOR =FLOOR(number, Rounds a number down to the nearest
FLOOR. significance) multiple of significance.
PRECISE =FLOOR. Rounds a number down, to the nearest integer
PRECISE(number, or to the nearestmultiple of significance.
significance)
LN =LN(number) Calculates the natural (base e) logarithm of a
positive number.
LOG =LOG(number, base) Calculates the logarithm of a positive number
using a specifiedbase.
LOG10 =LOG(number) Calculates the base 10 logarithm of a number.

Table 7-7: Overview of Math & Trig Functions


MOD =MOD(number, divisor) Returns the remainder after number is
divided by divisor. Example: MOD(3, 2)
equals 1, the remainder of dividing 3 by 2.
PI =PI( ) Returns the value of the constant pi ( ),
accurate to 14 decimalplaces.

176 Advance Spreadsheet Tools


PRODUCT =PRODUCT(number1,
Multiplies all the numbers in a range of
number2…) cells
RADIANS =DEGREES(angle) Converts degrees to radians.
RAND =RAND() Generates a random number between 0
and 1.
RANDBETWEEN =RANDBETWEEN Generates a random number between the
(bottom,top) bottom and toparguments.
ROUND =ROUND(number, num_ Rounds a number to a specified number
ROUNDDOWN digits) of digits. The ROUNDDOWN and
ROUNDUP ROUNDUP function take the same form
asthe ROUND function, and as their name
implies, always round either up or down.
SIGN =SIGN(number) Determines the sign of a number. Results
in 1 if the number is positive, zero (0) if
the number is 0, and -1 if the number is
negative.
SIN =SIN(number) Returns the sine of an angle.
SQRT =SQRT(number) Returns a positive square root of a
number.
SUM =SUM(number1, Adds all the numbers in a range of cells.
number2…)
SUMIF =SUMIF(range,criteria, Adds the cells only if they meet the
sum_range) specified criteria.
Example: You want to total the cell range
B1:B5 only if the valuein cellA1 is greater
than 500.
SUMIF(A1,”>500”,B1:B5)
TAN =TAN(number) Returns the tangent of an angle.

STATISTICAL FUNCTIONS

Excel offers a large number of EXERCISE


functions to help you analyze Exercise: Become familiar with some of Excel’s
statistical data. Statistical functions.
This table lists some of the Statistical Functions available in Excel 2010.

Advance Spreadsheet Tools 177


Table 7-8: Overview of Statistical Functions
AVERAGE =AVERAGE(number1, Calculates the average, or arithmetic
number2…) mean, of the numbers in the range or
arguments.
COUNT =COUNT(number1, Counts the number of cells that
number2…) contain numbers, including dates and
formulas. Ignores all blank cells and
cells that contain text orerrors.
COUNTA =COUNTA(number1, Counts the number of cells in a range
number2…) that are not empty.
COUNTIF =COUNTIF(range,criteria) Counts the number of cells within a
range that meet the givencondition.
MAX =MAX(number1, Returns the largest value in a range.
number2…) Ignores logical values and text.
MEDIAN =MEDIAN(number1, Returns the median, or the number in
number2…) the middle of the set of givennumbers.
MIN =MIN(number1, number2…) Returns the smallest value in a set of
numbers. Ignores logical values and
text.
MODE.MULT =MODE.MULT(number1, Determines which value occurs most
number2…) frequently in a set of numbers.
MODE.SNGL =MODE.SNGL(number1, Returns the most frequently
number2…) occurring, or repetitive, value in an
array or range of data.
STDEV =STDEV(number1, Estimates standard deviation based
number2…) on a sample. The standard deviation
is a measure of how widely values are
dispersed from theaverage value.
STDEVA =STDEVA(value1, value2…) Estimates standard deviation based
on a sample, including logical values
and text. Text and the logical value
FALSE have the value 0; the logical
STDEVPA =STDEVPA(value1, value2…)
value TRUE has the value 1.

178 Advance Spreadsheet Tools


Calculates standard deviation based
on an entire population, including
logical values and text. Text and the
logical value FALSE have the value 0;
the logical value TRUE has the value 1.
VAR.P =VAR.P(number1, Estimates variance based on the
number2…) entire population (ignores logical
values and text in the population).
VAR.S =VAR.S(number1, Estimates variance based on a sample
number2…) (ignores logical values and text in the
sample).
VARA =VARA(value1, value2…) Estimates variance based on a sample,
including logical values and text. Text
and the logical value FALSE have the
value 0; the logicalvalue TRUE has the
value 1.
VARPA =VARPA(value1, value2…) Calculates variance based on the
entire population, including logical
values and text. Text and the logical
value FALSE have the value 0; the
logical value TRUE has the value 1.

LOOKUP & REFERENCE FUNCTIONS

You can use Excel’s Lookup & EXERCISE


Reference functions to locate values Exercise: Become familiar with Excel’s Lookup &
in rows or columns of data. Reference functions.
This table lists some of the Lookup & Reference Functions available in Excel 2010.
Table 7-9: Overview of Lookup & Reference Functions
COLUMN =COLUMN(reference) Returns the column number of a
COLUMNS =COLUMNS(array) reference.
Returns the number of columns in
an array or reference.

Advance Spreadsheet Tools 179


HLOOKUP =HLOOKUP(lookup_value, Looks for a value in the top row of a
table_array, row_index_num, table or array of values and returns
range_lookup) the value in the same column from a
row you specify.
LOOKUP =LOOKUP(…) Looks up a value either from a one-
row or one-column range or from
an array. Provided for backward
compatibility.
ROW =ROW(reference) Returns the row number of a
ROWS =ROWS(array) reference.
Returns the number of rows in a
reference or array.
TRANSPOSE =TRANSPOSE(array) Converts a vertical range of cells as
a horizontal range, or vice versa.
VLOOKUP Looks for a value in the leftmost column of a table, and then returns
a value in the same row from a column you specify. By default, the
table must be sorted in an ascending order.

DATABASE FUNCTIONS

Database functions return results based on EXERCISE NOTES


filtered criteria. All the database functions use Exercise File: None required.
the same basic syntax =Function(database, Exercise: Become familiar with Excel’s
Database functions
field, criteria). The arguments include:
›› Database: The cell range that makes up the list ordatabase.
›› Field: Indicates which column is used in the function. You can refer to fields
by their column labelenclosed with double quotation marks, such as “Name”
or as a number that represents the position ofthe column in the list: 1 for the
first column, 2 for thesecond, and so on—not the column heading numbers!
›› Criteria: Is a reference to the cell or cell range that specifies the criteria for
the function. For example, you might only want to total records from a certain
region.
This table lists some of the Database Functions available in Excel 2010.

180 Advance Spreadsheet Tools


Table 7-10: Overview of Database Functions
DAVERAGE =DAVERAGE(database, Averages the values in a column in a list or
field,criteria) database that matchconditions you specify.
DCOUNT =DCOUNT(database, field, Counts the cells containing numbers in the
criteria) field (column) of records in the database
that match the conditions you specify.
DGET =DGET(database, field, Extracts from the database a single record
criteria) that matches theconditions you specify.
DMAX =DMAX(database, field, Returns the largest number in the field
criteria) (column) of records in the database that
match the conditions you specify.
DMIN =DMIN(database, field, Returns the smallest number in the field
criteria) (column) of records in the database that
match the conditions you specify.
DSTDEV =DSTDEV(database, field, Estimates standard deviation based on a
criteria) sample from selecteddatabase entries.
DSUM =DSUM(database, field, Adds the numbers in the field (column)
criteria) of records in the database that match the
conditions you specify.
DVAR =DVAR(database, field, Estimates variance based on a sample from
criteria) selected database entries.

TEXT FUNCTIONS

Excel offers a category of functions aimed EXERCISE NOTES


at working with text. These functions allow Exercise File: None required.
you to remove, combine, and replace different Exercise: Become familiar with Excel’s
pieces of text in a worksheet. Text functions.
This table lists some of the Text Functions available inExcel 2010.
Table 7-11: Overview of Text Functions
CONCATENATE CONCATENATE Joins several text strings into one text
(text1,text2,...) string.
EXACT EXACT(text1,text2) Checks whether two text strings are
exactly the same, and returns TRUE or
FALSE. EXACT is case-sensitive.

Advance Spreadsheet Tools 181


LEFT LEFT(text,num_chars) Returns the specified number of
characters from the start of a textstring.
LEN LEN(text) Returns the number of characters in a text
string.
LOWER LOWER(text) Converts all letters in a text string to
lowercase.
MID MID(text,start_ Returns the characters from the middle of
num,num_chars) a text string, given astarting position and
length.
PROPER PROPER(text) Converts a text string to proper case; the
first letter in each word inuppercase, and
all other letters to lowercase.
REPLACE REPLACE(old_ Replaces part of a text string with a
text,start_num,num_ different text string.
chars,new_text)
RIGHT RIGHT(text,num_chars) Returns the specified number of
characters from the end of a textstring.
SUBSTITUTE SUBSTITUTE(text,old_ Replaces existing text with new text in a
text,new_text,instance_ text string.
num)
TRIM TRIM(text) Removes all spaces from a text string
except for single spacesbetween words.
UPPER Converts a text string to all uppercase
letters.

LOGICAL FUNCTIONS

Excel has a number of logical functions to EXERCISE NOTES


choose from. These functions allow you to
Exercise File: None required.
evaluate logical argumentsand conditions. The
Exercise: Become familiar with Excel’s
most famous logical function is probably the IF Logical functions.
function.
This table lists some of the Logical Functions available inExcel 2010.
Table 7-12: Overview of Logical Functions
AND AND(logical1,logical2, ...) Checks whether all arguments are TRUE, and
returns TRUE if allarguments are TRUE.

182 Advance Spreadsheet Tools


FALSE FALSE() Returns the logical value FALSE.
IF IF(logical_test,value_if_ Checks whether a condition is met, and
true,value_if_false) returns one value if TRUE, and another value
if FALSE.
IFERROR IFERROR(value,value_if_ Returns value_if_error if expression is an
error) error and the value of the expression itself
otherwise.
NOT NOT(logical) Changes FALSE to TRUE, or TRUE to FALSE.

OR OR(logical1,logical2,...) Checks whether any of the arguments are


TRUE, and returns TRUE or FALSE. Returns
FALSE only if all arguments are FALSE.
TRUE TRUE() Returns the logical value TRUE.

INFORMATION FUNCTIONS

Excel has a number of information functions


EXERCISE NOTES
to choose from. These functions allow you to
evaluate logical arguments and conditions. Exercise File: None required.
This table lists some of the Information Exercise: Become familiar with
Functions available in Excel 2010. Excel’s functions.

Table 7-13: Overview of Information Functions


AND AND(logical1,logical2, ...) Checks whether all arguments are TRUE,
and returns TRUE if all arguments are
TRUE.
FALSE FALSE() Returns the logical value FALSE.
IF I F ( l ogi c a l _ te s t , val ue_if_ Checks whether a condition is met, and
true,value_if_false) returns one value if TRUE, and another
value if FALSE.
IFERROR IFERROR(value,value_if_ Returns value_if_error if expression is an
error) error and the value of theexpression itself
otherwise.
NOT NOT(logical) Changes FALSE to TRUE, or TRUE to FALSE.

Advance Spreadsheet Tools 183


OR OR(logical1,logical2,...) Checks whether any of the arguments are
TRUE, and returns TRUEor FALSE. Returns
FALSE only if all arguments are FALSE.
TRUE TRUE() Returns the logical value TRUE.

ENGINEERING AND CUBE FUNCTIONS


These last functions are also possibly the functions that will be used the least. .
This table lists some of the Engineering Functionsavailable in Excel 2010.
Table 7-14: Overview of Engineering Functions
BESSELI BESSELI(x,n) Returns the modified Bessel function
In(x).
BIN2DEC BIN2DEC(number) Converts a binary number to decimal.
COMPLEX COMPLEX(real_num,i_ Converts real and imaginary
num,suffix) coefficients into a complex number.
CONVERT CONVERT(number,from_ Converts a number from one
unit,to_unit) measurement system to another.
DELTA DELTA(number1,number2) Tests whether two numbers are equal
This table lists some of the Cube Functions available in Excel 2010.
Table 7-15: Overview of Cube Functions
CUBEKPIMEMBER CUBEKPIMEMBER Returns a key performance
(connection, kpi_name kpi_ indicator (KPI) property and
property, [caption]) displays the KPI name in the
cell. A KPI is a quantifiable
measurement, such as monthly
gross profit or quarterly
employee turnover, that is used
to monitor an organization’s
performance.
CUBEMEMBER CUBEMEMBER(connection, Returns the logical value
member_expression, FALSE Returns a member or
[caption]) tuple from the cube. Use to
validate that the member or
tuple exists in the cube.

184 Advance Spreadsheet Tools


CUBEMEMBERPROPERTY CUBEMEMBERPROPERTY Returns the value of a member
(connection, property from the cube. Use to
member_expression, validate that a member name
property) exists within the cube and to
return the specified property
for this member.
CUBERANKEDMEMBER CUBERANKEDMEMBER Returns the nth, or ranked,
(connection,set_expression, member in a set. Use to return
rank, [caption]) one or more elements in a set,
such as the top sales performer
or the top 10 students.
CUBESET CUBESET(connection, Defines a calculated set of
set_expression, [caption], members or tuples by sending
[sort_order], [sort_by]) a set expression to the cube on
the server, which creates the
set, and then returns that set
to Microsoft Excel.
CUBESETCOUNT CUBESETCOUNT(count) Returns the number of items
in a set.
CUBEVALUE CUBEVALUE(connection, Returns an aggregated value
[member_expression1], from the cube.
[member_expression2], …)

More Functions and Formulas Review


QUESTIONS
1. To change the order of evaluation, enclose the part of the formula to be calculated first
in parentheses. (True or False?)
2. Which of the following is NOT a category of functions in Excel?
(a) Scientific (b) Financial
(c) Logical (d) Math & Trig
3. By default, Excel recalculates the formulas in a workbook whenever you change a value
that affects another value. (True or False?)
4. You can define a name for multiple non-adjacent cells. (True or False?)

Advance Spreadsheet Tools 185


5. Which of the following is NOT a button found in the Defined Names group?
(a) Name Manager (b) Evaluate Formula
(c) Define Name (d) Use in Formula
6. Click the __________________ button to display arrows that show what cells affect the
currently selected cell.
(a) Show Formulas (b) Watch Window
(c) Define Name (d) Trace Precedents
7. The Error Checking dialog box does not include which one of the following buttons?
(a) Help on this error
(b) Show Calculation Steps
(c) Edit in Formula Bar
(d) Show Formulas
8. What are the three arguments or parts of an IF formula?
(a) IF, THEN, ELSE
(b) The conditional statement, the value if the test is false, and the value if the test is
true.
(c) The logical test, the value if the test is true, and the value if the test is false.
(d) The conditional statement, the expression, and the value.
9. Which is NOT a required part of a PMT function?
(a) The interest rate.
(b) The amount of the loan, or principal.
(c) The number of payments.
(d) If the interest rate is Fixed or Variable.
10. The DSUM function calculates the totals of specific records based on your criteria.
(True or False?)
11. Which of the following functions looks up values vertically down a column and then
horizontally across a row?
(a) HLOOKUP (b) DSUM
(c) DLOOKUP (d) VLOOKUP

ANSWERS
1. True. To change the order of evaluation, enclose the part of the formula to be calculated
first in parentheses.
2. (a) Scientific is not a category of functions in Excel.
3. True. By default, Excel recalculates the formulas in a workbook whenever you change
a value that affects another value.
4. True. You can define a name for multiple non-adjacent cells.

186 Advance Spreadsheet Tools


5. (b) The Evaluate Formula button is not found in the Defined Names group.
6. (d) Click the Trace Precedents button to display arrows that show what cells affect the
currently selected cell.
7. (d) The Error Checking dialog box does not have a Show Formulas button.
8. (c) The three parts of an IF formula are the logical test, the value if the test is true, and
the value if the test is false.
9. (d) A fixed or variable interest rate option is not part of the PMT function.
10. True. The DSUM calculates the totals of specific records based on your criteria.
11. The VLOOKUP functions can look up values vertically down a column and then
horizontally across a row.

Advance Spreadsheet Tools 187


Working with Chap
8
ter
Data Ranges
If you organize data into a range of rows and columns, you can then easily sort the data
into a desired order, or filter the data to display specific information, such as records
from a specific zip code.
In this chapter, you will learn how to sort and filter data in data ranges in several
different ways.
Using Exercise Files
This chapter suggests exercises to practice the topic of each lesson. There are two ways
you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and close the
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the file
open to perform the remaining lesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the exercises
in a chapter can be performed in succession from the first lesson to the last.

SORTING BY ONE COLUMN

In Excel you can take ranges of data and sort EXERCISE NOTES
them into different orders. For example, you Exercise File: SalesReps8-1.xlsx
can sort text alphabetically, numbers by size,
Exercise: Sort the data in the Last
dates and times chronologically, cells or fonts column from A to Z. (Don’t include the
by color or icon, or you can create a custom column header—Last—along with the
sort. Usually you sort by column (or field), but data.)
you can also sort by row (or record).
Before you sort your data, make sure it’s organized intotwo components:
›› Fields (columns): Records are broken up into fields which store specific
pieces of information, such as first and last name.
›› Records (rows): Each record contains information about a unique thing or
person, just like a listing in aphone book.

188 Advance Spreadsheet Tools


Once you have your data organized in columns and rows, you can sort by
values in a certain column.
 Trap: If your data
has column headings,
don’t select them when
sorting, or they’ll be
sorted along with your
data—unless you first
click the Sort & Filter
button in the Editing
group on the Home tab, Fig. 8.1. Before and after sorting data.
select Custom Sort, and check the Mydata has headers box.
1. Select the range of data or select a cell in the columnyou want to sort by.
 Trap: If you select a column of data with more data next to it, the Sort
Warning dialog box appears, asking if you want to expand your selection.
Normally you will want to do this; otherwise, the column of data you’ve
selected willbe sorted independently of the surrounding data.
2. Click the Home tab on the Ribbon and click the Sort & Filter button in the
Editing group.
A list of sorting options appears, which changeaccording to the type of data
you are sorting:
›› Text options: Sort A to Z or Sort Z to A.
›› Number options: Sort Smallest to Largest or SortLargest to Smallest.
›› Date options: Sort Oldest to Newest or SortNewest to Oldest.
3. Select a sort option.
The column is sorted
based on the values in
the left- most column in
the selected range. All
the fields within each
record move together. For
example, if you sort a list
Fig. 8.2. Always expand the selection if you are sorting
of first and last names by data in a list. If you don’t, the data will be
last name, the first names mismatched with other records or fields.
still correspond to the last names after sorting.
Advance Spreadsheet Tools 189
Other Ways to Sort: Select the entire range or select a cell in the column

you want to sort by. Click the Data tab on the Ribbon and click one of the
sort buttons in theSort & Filter group. Or, right-click a cell in a column that
contains data, point to Sort, and select a sort option from the list.
Tip: To sort by rows instead of columns, click the Sort& Filter button
in the Editing group on the Hometab, select Custom Sort, click Options
in the Sortdialog box and select Sort left to right.

SORTING BY COLORS OR ICONS

If you want to sort by cell colors, font colors, or EXERCISE NOTES


by icons,you need to use a custom sort. Exercise File: SalesReps8-2.xlsx
1. Select the range of data or a cell within Exercise: Sort the data by the Sales
the range. column so that the red cell icon is on
top.
The data should contain cell or font
Add a second sort level to sort by the
color formatting or icons created with Sales column, Cell Icon, and this time
conditional formatting. with the yellow icon on top. Now
2. Click the Home tab on the Ribbon and the sales reps should be sorted from
click the Sort & Filter button in the red icons on top, green icons on the
bottom.
Editing group.
Finally, clear conditional formatting
3. Select Custom Sort. from the sheet: click the Conditional
The Sort dialog box appears. First you Formatting button in the Styles group
on the Home tab. Point to Clear Rules
need to selectwhich column to sort by.
and select Clear Rules from Entire
Tip: If the range you are sorting Sheet.
includes headers,select the My data
has headers option so that the headers aren’t sorted with the rest of
the data.
4. Click the Sort by list arrow
and select the column you
want to sort by.
Next specify the type of sort.
You can choose from Values
(which allows you to sort on
text, numbers or dates like
you already learned about), Fig. 8.3. Sorting by cell icon in the Sort dialog box.
Cell Color, Font Color, and Cell Icon.

190 Advance Spreadsheet Tools


5. Click the Sort On list arrow and select the type ofsort you want to use.
Based on the type you select, the Order area will update to display different
options. If you are sorting by colors or icons, you’ll need to select the order
thatyou want the colors or icons to be sorted.
Tip: You need to define the sort order for cell colors, font colors, or icons. Excel
does not have adefault order like it does for values.
6. Click the first list arrow in the Order column andselect a cell or font color, or
icon.
Now you need to tell Excel where you want to put the color or icon you selected.
You can select On Top or On Bottom to move it to the top of bottom of the
column sort; if you are sorting by rows, select from On Left or On Right.
7. Click the second list arrow in the Order column and select the option you
want to use.
Now the data will be sorted with the color or icon you selected placed on
top or bottom as you specified. You can specify additional colors or iconsby
adding additional levels to the sort.
8. (Optional) Click Add Level button in the Sort dialogbox.
A sort level is added.
Tip: Click the Delete Level button to delete the selected sort level you
no longer want to use.
9. (Optional) Repeat the steps to define the new sortlevel. Click OK when you’re
done.
For example, if you sort by a different color in the second sort level and order
it On Top, it will move up just below the color selected to be On Top in the
firstlevel of the sort.

SORTING BY MULTIPLE COLUMNS

If you want to sort by more than one column, EXERCISE NOTES


you need to use a custom sort. For example, Exercise File: SalesReps8-3.xlsx
you can sort first by last name column, then by Exercise: Sort by multiple columns
first name. That way, all the Andersons will be to see who has the highest sales by
region: Sort first by the Region column
listed before the Bakers, and Andy Anderson
and sort on Values from A to Z, then
will come before Bill Anderson. sort by the Sales column and sort on
Values from Largest to Smallest.

Advance Spreadsheet Tools 191


1. Select a range of cells with at least two columns ofdata or select a cell within
the range.
2. Click the Home tab on
the Ribbon and click the
Sort & Filter button in
the Editing group.
3. Select Custom Sort.
The Sort dialog box
appears.
4. Click the Sort by list Fig. 8.4. Sorting by multiple columns in the Sort dialog box.
arrow and select the firstcolumn you want to sort by.
5. Click the Sort On list arrow and select the type ofsort you want to use.
Most of the time you’ll sort by values, which includes text, numbers, and
dates.
6. Click the Order list arrow(s) and select the option(s)you want to use.
To sort by multiple columns, you need to use moresort levels.
7. (Optional) Click Add Level.
Excel will sort the data by each level in order.

Fig. 8.5. The results of the custom sort.

8. (Optional) Repeat the sorting steps for the next level, selecting the next
column you want to sort by, and add more levels.
Excel will sort the data by each level in order.
Tip: Click the Delete Level button to delete a sort level you no longer
want to use.
9. Click OK.
The data range is sorted accordingly.

192 Advance Spreadsheet Tools


SORTING BY A CUSTOM LIST

A custom list allows you to sort by criteria


EXERCISE NOTES
that you define or by one of Excel’s
Exercise File: SalesReps8-4.xlsx
predefined custom lists (which include,
Exercise: This exercise sorts the sales reps
for example, Sun, Mon, Tue… or Jan, Feb, by position from most senior to least senior.
Mar…). In cells A10:A12, enter Senior Manager,
Create a Custom List Manager, and Associate. Create a custom
list using those values.
First let’s look at how to create your own
Next, sort the data by the Position field
custom list. using the custom list you just created (if
1. Enter the values you want to sort Sort levels appear in the dialog box from
by, in the correct order from top to previous sorts, you can just modify the first
bottom, in a column of cells. one for this new sort).
Then delete the values from cells A10:A12.
For example, you could enter Small,
Medium, andLarge in successive cells.
2. Select the values you just entered.
Now you need to create the list.
3. Click the File tab on
the Ribbon and select
Options from the list.

The Excel Options
dialog box appears.
4. Click the Advanced
tab, scroll down and
click the Edit Custom
Lists button.
The Custom Lists
dialog box appears.
Here you can see the
custom lists that are
already stored in Fig. 8.6. Adding a custom list in the Custom Lists dialog box.
Excel.
5. Make sure the cells you want to use as a list are selected in the Import list
from cells. Click the Import button.
Your new custom list appears in the dialog box.
Advance Spreadsheet Tools 193
6. Click OK.
The Custom Lists dialog
box closes.
7. Click OK.
The Excel Options dialog
box closes and the
customlist is created.
Tip: You can only
create a custom list
based on a value,
not on cell color,
font color, or an
icon. Fig. 8.7. The Custom Lists dialog box after the custom list is added.
Sort by a Custom List
Once you’ve created a list, or if you just want to use oneof Excel’s predefined custom
lists, you’re ready to sort.
1. Select the range of data
you want to sort or
select a cell within the
range.
2. Click the Home tab on Fig. 8.8. Results sorted by custom list.

the Ribbon, click the Sort & Filter button in the Editing group, and select
CustomSort.
The Sort dialog box appears.
3. Click the Sort by list arrow and select a column tosort by (the column with
data that matches the custom list).
4. Click the Order list arrow and select Custom List.
The Custom Lists dialog box appears.
5. Select the custom list you want to use and click OK.
6. Click OK.
The data is sorted according to the custom list.
Tip: To sort by rows instead of columns, click Options inthe Sort dialog
box and select Sort left to right.

194 Advance Spreadsheet Tools


FILTERING DATA

When you filter data, Excel displays only the EXERCISE NOTES
records that meet the criteria you specify—
Exercise File: SalesReps8-5.xlsx
other records are hidden. You can also filter
Exercise: Filter the data by region so
by multiple columns; each time you filter by an that only North sales reps appear.
additional column, the data is further reduced. Then filter those records additionally
so only Associates appear (only
Filter Text, Numbers and Dates
Denise Winters should remain).
You can filter by values such as text, numbers, Remove the filters so all the data once
or dates. again appears and the
1. Select the range of data you want to filter filter buttons disappear.
or select a cell within the range.
2. Click the Home tab on
the Ribbon, click the
Sort &Filter button in
the Editing group, and
click Filter.
Fig. 8.9. Data filtered to display only North region sales reps.
Filter buttons that
look like arrows appear in the firstcell of each field header.
Other Ways to Filter: Click the Data tab on the Ribbon and click the Filter
button in the Sort & Filter group.
3. Click the filter button for
the column you want to
filter.
A list of filter options
appears at the bottom
of the list. There is an
option for every entry in
the field.
4. Checkmark the check
boxes of values that you
want to display. Remove
the checkmarks from
check boxes of values
Fig. 8.10. Setting criteria for a field. Items that are checked are shown.
that you want to hide. Items that are not checked are filtered out.

Advance Spreadsheet Tools 195


The data is filtered so that records that do not meetthe criteria are hidden.
Other Ways to Select Filter Criteria: Click the Search box in the filter list
and type thecriteria by which you want to filter. The list displays criteria that
match your search.
You can keep filtering by additional columns.
5. (Optional) Click another column’s filter button andapply more filter criteria.
6. Click OK.
The data is further reduced.
Remove filtering
You can remove a filter to once again display all the data.
1. Click the Home tab on the Ribbon, click the Sort &Filter button in the Editing
group, and select Filter.
The filter buttons disappear and filtering is removed.
Filter buttons appear as arrows inthe field headers.

CREATING A CUSTOM AUTOFILTER

Excel offers some predefined filter criteria that EXERCISE NOTES


you can access using a Custom AutoFilter. This Exercise File: SalesReps8-6.xlsx
lesson explains how to filter data using Custom Exercise: Use a custom filter to
AutoFilter. display only the sales reps that are
not Associates. (Hint: For the Position
1. Select a range of cells to filter plus the column, select “Does not equal” as
column header row (or a blank row, if the operator and “Associate” as the
there isn’t a header). value.)
2. Click the Home tab on the Ribbon, click Clear the filter.
the Sort & Filter button in
the Editing group, and click
Filter.
Filter buttons appear in the
first cell of each column in
the range.
3. Click the filter button in the
column you want tofilter.
A list of options appears.
Depending on whether the Fig. 8.11. The Custom AutoFilter dialog box.
selected cells contain text, numbers, or dates, the options will differ.
196 Advance Spreadsheet Tools
4. Point to the option that appears in the list: TextFilters, Number Filters, or
Date Filters.
A list of comparison operators, such as Equals,appears, as well as the Custom
Filter option.
5. Select Custom Filter.
The Custom AutoFilter dialog box appears.
Tip: If you’re working with numbers or dates andyou select a comparison
operator such as Above Average (instead of selecting Custom Filter),
the Custom AutoFilter dialog box won’t appear—the data will simply be
filtered.
6. Click the first list arrow and select a comparisonoperator.
7. Click the second list arrow in the first row and selecta value from the list or
enter your own value in the text box.
8. (Optional) Select And or Or and select a second criteria to filter the column by.
Tip: You can use wildcards when entering values in the Custom
AutoFilter dialog box. Use a ? to represent any single character or a * to
represent aseries of characters.
9. Click OK.
The Custom AutoFilter dialog box closes and the datais filtered.

USING AN ADVANCED FILTER

Advanced filtering is the most powerful and EXERCISE NOTES


flexible way to filter your Excel data. It’s also
Exercise File: SalesReps8-7.xlsx
the most difficult method, and requires more
Exercise: Use the Advanced Filter to
work to set up and use. With an Advanced filter for Sales >18,000, and a Position
Filter, you can: that ends with r (Hint: use *r). Clear
›› Filter using criteria located outside of the filter.
the data range. Do the same Advanced Filter again,
but this time extract the results to a
›› Use wildcards in the filter criteria. different range. Extract only the Last
›› Extract and copy filtered results to and First columns to a different range
another range onthe worksheet. (you should end up with Clem
Brown being displayed in the extract
To create an Advanced Filter you must start
range).
by defining a criteria range. A criteria range is a
cell range located outside of your data range that contains the filter criteria.

Advance Spreadsheet Tools 197


1. Copy the desired column labels from the data range and paste them in the
first row of the criteria range.
For example, if you wanted
to filter for sales reps with
sales greater than $20,000
and who are also managers,
you would copy the Sales
and Positioncolumn labels
to the criteria range.
Tip: The criteria
range can be any area
of open cells on your
worksheet and you
only need to copy the Fig. 8.12. The Advanced Filter dialog box.
labels for the columns that contain criteria you’ll be filtering on.
2. In the rows below the criteria labels, type the criteriayou want to filter for.
In the above example, you would type >20000 under the Sales label and
Manager under the Position label.
Tip: You can enter values or text you want to filter for, and you can
incorporate operators such as < or > to specify the records you want to filter
for. You can also use wildcards—for example, enter *r to filter out text that
doesn’t end with
the letter “r”.
3. Click the Data tab on
the Ribbon and click
the Advanced button
in the Sort & Filter
group.
The Advanced Filter
dialog box appears.
Here you need to
specify the range of
data you want to filter,
as well as the criteria
you want to filter by. Fig. 8.13. Data filtered in place using the Advanced Filter.

198 Advance Spreadsheet Tools


4. Make sure the Filter the list, in-place option isselected in the Action area.
That way, the filtered results will be displayed rightin the original data range.
Tip: To copy filtered results to another location on the worksheet, first
prepare an extract range with labels for the fields you want to display.
The extracted fields needn’t be the same fields that are used in your
criteria range. For example, you can set the filter to only show records
from USA, and then extract only the names of records that match those
criteria. Select Copy to another location in the Action area of the
Advanced Filter dialog box. In the “Copy to” box, click the Collapse
Dialog button, select the range for the extracted results— including
labels and blank rows to hold the results—and press <Enter>.
5. Click the List range collapse
dialog button and select the
data range you want to filter.
Press the <Enter> key.
6. Click the Criteria range
collapse dialog button and
select the criteria range,
including the column labels.
Fig. 8.14. Filter results copied to another location (extracted)
Press the <Enter> key. using the Advanced Filter.
7. Click OK.
The data is filtered based on the criteria in the criteriarange, and the results
are displayed in the data range.
Tip: To remove the advanced filtering, click theClear button in the Sort
& Filter group on the Data tab.
The table below, Comparison Operators and Wildcards, provides a description
of operators andwildcards you can use for entering filter criteria.
Table 8-1: Comparison Operators and Wildcards

= Equal to

<> Not equal to

> Greater than

< Less than

Advance Spreadsheet Tools 199


>= Greater than or equal to

<= Less than or equal to

Wildcard--any number of characters in the same position as the asterisk


*
Example: “*east” finds “Northeast” and “Southeast”

Any single character in the same position as the question mark


?
Example: sm?th finds “smith” and “smyth”

Working with Data RangesReview


QUESTIONS
1. Before you sort data, make sure it’s organized into...
(a) a chart. (b) alphabetical order.
(c) a pivot table. (d) columns and rows.
2. You can sort Excel data by any of the following, except by...
(a) font color. (b) cell icon.
(c) number formatting. (d) cell color.
3. To sort by multiple columns, use the .
(a) Sort dialog box (b) Column Specifier button
(c) Sort Columns window (d) drag and drop feature
4. You can create your own custom list for sorting or use a predefined custom list. (True
or False?)
5. Which one of the following is a way to turn on the filtering buttons?
(a) Click the Insert tab and click the Filter button in the Filter group.
(b) Click the Filter tab and click the Filter button in the Filter group.
(c) Click the Home tab on the Ribbon, click the Sort & Filter button in the Editing group,
and click Filter.
(d) Type the formula =Filter(Data) in the first cell of the column you want to filter.
6. You can use wildcards when entering values in the Custom AutoFilter dialog box. (True
or False?)
7. With an Advanced Filter, you can do all of the following, except...
(a) Extract and copy filtered results to another range on the worksheet.
(b) Use wildcards in the filter criteria.
(c) Filter using criteria located outside of the data range.
(d) You can do all of these things.

200 Advance Spreadsheet Tools


ANSWERS
1. D. Before you sort data, make sure it’s organized into columns and rows.
2. C. You can sort data by cell icon, cell or font color, but not by number formatting.
3. A. Use the Sort dialog box to sort data by multiple columns.
4. True. You can either create your own custom list or use a predefined custom list.
5. C. To display the filtering buttons, click the Home tab on the Ribbon, click the Sort &
Filter button in the Editinggroup, and click Filter.
6. True. You can use wildcards when entering values in the Custom AutoFilter dialog box.
7. D. You can do all these things with an Advanced Filter.

Advance Spreadsheet Tools 201


Working with Chap
9
ter
Tables
Tables—called lists in previous versions of Excel—make it easier to work with
ranges of Excel data. By turning an Excelrange into a table, you can work with the
table data independently from the rest of the worksheet. You can quickly sort and
filter the table columns, add total rows, and apply table formatting to an Excel
table.
Some examples of things you might track in a table include telephone numbers,
clients, and employee rosters. Once you create a table in Excel, you can easily find,
organize, and analyze its information with Excel’s rich set of table-management
features.
Using Exercise Files
This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and closethe
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them,” meaning the
exercisesin a chapter can be performed in succession from the first lesson to the
last.

CREATING A TABLE

By turning an Excel range into a table,


EXERCISE
you can work with the table data
Exercise File: Table 9.1.xlsx
independently from the rest of the
Exercise: Turn the data range A1:H19, including
worksheet, and filter button arrows thecolumn labels, into a table.
appear automatically on the column
headers, allowing you to filter and sort columns even faster. You can also add total
rows and quickly apply table formatting.

202 Advance Spreadsheet Tools


Tables, like normal data ranges of data, consist of twoparts:
›› Records (rows): Each
record contains information
about a unique thing or
person, just like a listing in a
phone book.
›› Fields (columns): Records
are broken up into fields
which store specific pieces
of information, such as first
and last name.
Tips
• Before you turn a range
of data into a table,
This option should be
remove blank rows and
selected if headers
columns, and make
are included in the
sure that you don’t have
selected cell range.
different types of data
withinone column.
If desired, make sure you have entered column headers. For example,
if you want to make a tablethat lists your company’s sales reps, you
could enter headers such as Last Name, First Name, Territory, etc.
Unique records, such as the names and territories of each of your
sales reps, should be entered as rows.
Create a table from a cell range
If you already have an
organized range of data, you
canturn it into a table.
1. Select a cell range that
you want to make into a
table.
Normally you will want
the cell range to include
aheader row, with labels Fig. 9.1. Creating a table from a cell range.
identifying each of the columns.

Advance Spreadsheet Tools 203



Other Ways to Create a Table: You can simultaneously create and format a table.
Select the cells you want to include in the table and click Format as Table in
the Styles group onthe Home tab. Select a table style. Click OK.
2. Click the Insert tab on the Ribbon and click the Table button in the Tables
group.
The Create a Table dialog box appears. Here you canedit the range that will
become a table, and you can specify whether or not your table has a header
row (ifit doesn’t, Excel adds a header row above the table data).
3. Set the options in the Create a Table dialog box andclick OK.
The table is created. Filters are added to each column, and the table is
automatically formatted. Under Table Tools on the Ribbon, the Design
contextual tab appears.

CREATE A BLANK TABLE

If you haven’t already entered the data you want toinclude in a table, you can create
the table first.
1. Select a range of cells that is approximately the size you want your table to
be.
You can always change the size later.
2. Click the Insert tab on the Ribbon and click the
Table button in the Tables group. The Create Table dialog box appears.

3. Click OK.
The table appears, including placeholder column headers that you can edit,
and a resize handle thatappears in the lower-right corner of the table.
The table below, Tips for Organizing Tables, providesideas for setting up your
table data.
Table 9.1: Tips for Organizing Tables
Avoid putting blank rows and columns So that Microsoft Excel can more easily
in the table. detect and select the table.
Create column labels in the first row of Excel uses the labels to create reports and
the table. to find and organize data.
Design the table so that all rows have This makes the table more meaningful and
similar items in the same column. organized.

204 Advance Spreadsheet Tools


Try to break up information as much as This gives you more power to sort, filter
possible. and manipulate the table.
Each column should contain the same This will make the table easier to read and
type of information. understand.
Don’t use duplicate field names. Duplicate field names can cause problems
when entering and sorting information.

ADDING AND REMOVING DATA

You can easily add or remove table data.


Add table rows and columns EXERCISE NOTES
1. Select a cell in the table row Exercise File: Table 9.2.xlsx
or the table column next to Exercise: Add this data to the bottom of the table:
which you want to add the First Last Address City State Zip
row or column. Elsa Martinez 413 Oak St Faribault MN 55021
You will be able to add a Bob Arthur 326 Elm Ave Toma WI 54660
new table row above the Annual Trips Income
row you selected, or add a 4 $40,000
new column to the left of 5 $88,000
the column you selected
(unless you selected the lastcolumn, in which case you can also add a column
tothe right).
Tip: Select only the
columns or rows within
thetable for more inserting
options. For example,
clicking a column header
does not allow you to
choose if you want to
insert new columns to the
right or left.
2. Click the Home tab on the
Ribbon and click the Insert
button list arrow. Fig. 9.2. : Adding data to a table. If data appears previously in
a column, Excel will offer an AutoComplete
The options available here option as you enter data

change, depending on thecell(s) that are selected in the table or sheet.

Advance Spreadsheet Tools 205


3. Select the insertion option you want to use.A row or column is inserted into
the table.
Other Ways to Insert a Table Row Or Column:Right-click the row or column

where you want to add a row or column, point to Insert in the contextual
menu, and select Insert Table Rows Above or Insert Table Columns to the
Left or Right. Or, to add a new row to the bottom of the table, place the cell
pointer in the last cell of the table and press <Tab>.
Tips
When you enter a formula in a blank column of a table, the formula is
automatically extended to all the rest of the column—without using the AutoFill
feature. If you add rows to the column, the formula appears in those rows as well.
Remove table rows and columns
You can also remove unwanted table rows and columnsby deleting them.
1. Select the table row(s) or columns(s) you want todelete.
Remember that doing this removes the data from theworksheet completely.
2. Click the Home tab on the Ribbon and click the Delete button list arrow in
the Cells group.
3. Select Delete Table Columns or Delete Table Rows.The selected row(s) or
column(s) are deleted.
Other Ways to Delete a Table Row or Column: Right-click the row or

column you want to delete,point to Delete in the contextual menu, and select
Table Columns or Table Rows.
Resize a table
Expand the size of a table to
include more data, or reduce
the size to remove data.
1. Select a cell in the table.
2. Under Table Tools on the
Ribbon, click the Design tab.
3. Click the Resize Table
button in the Properties
group. Fig. 9.3. Resizing a table using the sizing handle.
The Resize Table dialog
box appears.
206 Advance Spreadsheet Tools
4. Select the range you want to include in the table.
5. Click OK.
The table is resized. If cells are added to the table,they are empty so you can
enter data in the cells.
Other Ways to Resize a Table: Click and drag the sizing handle in the lower-

rightcorner of the table to include more or fewer cells. Or, enter data in a cell
below or to the right of the table; the table automatically expands.

WORKING WITH THE TOTAL ROW

With the Total Row feature, Excel will EXERCISE NOTES


automatically adda total row to the bottom of a Exercise File: Table 9-3.xlsx
table and sum the last column of the table. The Exercise: Add a Total row to the table.
total row can also perform other types of Calculate the Average of the Income
column.
calculations.
Add a Total row
1. Select a cell in the table.
Table Tools appear on the
Ribbon.
2. Click the Design contextual
tab under Table Tools on the
Ribbon.
Now you have access to Click the list arrow for a cell in the Total
commands that can help you row to view common functions you can
do with the table column’s values
change the design of your Fig. 9.4. The table with the Total row added to the
table. bottom of the table.

3. Click the Total Row option in the Table Style Options group so that it is
selected.

A Total row appears at the bottom of your table andthe last column is summed.
Tip: If the last column doesn’t contain numbers,Excel displays a count
of the number of items inthe column.
Calculate Total row values
Once you’ve added a total row, you can decide what typeof calculation you want to
perform for the total of each table column.

Advance Spreadsheet Tools 207


1. In the Total row, select the cell at the bottom of the column that contains
values you want to calculate.
2. Click the cell’s list arrow and select the calculationyou want to perform.
The table below, Total Row Calculation Options,describes the different types
of calculations that Excel can perform in the Total row.
Structured references
Structured references allow you to work easily with cell references and formulas
in a table. For example, instead of using a cell range reference such as C2:C6 in a
formula, you can refer to the cell range as SaleAmt (thetable column name) instead.
When you create a formula using structured references, you can use several
different elements in place of the regular arguments. These include the table name,
column header names, or special items that refer to areas of the table, such as a
total row.
Working with Tables
Tip: When entering references in a formula in atable, if you click on the
cells to select them (instead of typing in their cell addresses) Excel will
enter structured references for you.
Table 9.2: Total Row Calculation Options
None No function is inserted.
Average Calculates the average, or arithmetic mean, of the numbers in the
column.
Count Counts the number of all nonblank cells, regardless of what they
contain.
Count Numbers Counts the number of cells that contain numbers, including dates
and formulas. Ignores all blank cells and cells that contain text or
errors.
Max Returns the largest value in a column.
Min Returns the smallest value in a column.
Sum Adds all of the numbers in a column.
StdDev Estimates standard deviation based on a sample. The standard
deviation is a measure of how widely values aredispersed from the
average value.
Var Estimates variance based on a sample.
More Functions… Opens the Insert Function dialog box, where you can choose a
different function to perform on the column’s values.

208 Advance Spreadsheet Tools


Sorting a Table
Excel is very good at sorting information. Excel EXERCISE NOTES
can sort records alphabetically, numerically, or Exercise File: Table9-4.xlsx
chronologically (by date). Additionally, Excel Exercise: Sort by Last name in
can sort information in ascending (A to Z) or Ascending order (A-Z).
descending (Z to A) order. You can sort an entire Apply a custom sort to sort first by
list or any portion of a list by selecting it. Last name, and then First name.
1. Click the filter button for the
column you want tosort.

A list appears, displaying several
options for sortingthe table data.
The options at the top are for
sorting.
Other Ways to
Sort: Click the
Home tab and click the Sort
& Filter button in the Editing
group. Select a sorting option
from the list.
2. Select the sort option you want
to use.
3. Click
Ok Tip: If you add or
edit data in a table that is
filtered or sorted, you need
to click the Reapply button
in the Sort & Filter group on
the Data tab to include the
new or edited data. Fig. 9.5. The list before and after being sorted in ascending
order by the Last field.
Custom Sorting
When you need to sort by more than one field, you haveto use a Custom Sort.
The Custom Sort can sort records by more than one field,such as if you want to
sort alphabetically by first and lastname, or by state and city.
1. Click a field’s filter button and select Sort byCustom Sort from the list.
The Custom Sort dialog box appears.

Advance Spreadsheet Tools 209


Other Ways to Use Custom Sort: Click the Home tab and click the Sort &

Filter button in the Editing group. Select Custom Sortfrom the list.
2. Click the Sort by list arrow and select the field by which you want to sort.
This is the first field
you want to sort by.
3. Click the Sort on list
arrow and choose
what you want to sort
by in the field.
The options for
the Order change
Fig. 9.6. An example of sorting a table by multiple fields
depending on what
you choose for the Sort On
variable.
4. Click the Order list arrow and
select the order by which you
want to sort the data.
5. Click OK.
6. (Optional) To sort by multiple
fields, click the AddLevel button
and set the sort specifications
for the next field.
7. Click OK. Fig. 9.7. The table sorted by last name, then first name.
The data in the table is sorted by the sortspecifications.
Filtering a Table
EXERCISE NOTES
When you create a table, a filter button that
Exercise File: Table9-5.xlsx
looks like a list arrow is added to the header
Exercise: Filter the table to show only
of each column in the table. You can use this records that take 2 annual trips and
arrow to filter the table columns; they remain are from Duluth. Clear the filters.
available when you scroll down the list. Apply a custom filter to show the top
1. Click the filter button for the column 10 records from the Incomes fields.
you want tofilter. Clear the filters.


A list appears, displaying several options for sorting or filtering the table data.
The check boxes are all thedata entries for the selected field.

210 Advance Spreadsheet Tools


2. Click the check box(es) of the filter criteria you wantto use.
Other Ways to Select

Filter Criteria: Click the
Search box in the filter
list and type thecriteria by
which you want to filter.
The list displays criteria
that match your search.
3. Click OK.
Clear a filter
When you’re finished with a Fig. 9.8. To filter, click a column filter button and click the check
box(es) for the criteria by which you want
filter, you can clear it so all the to filter the table.
table data appears again.
1. Click the filter button for the filter you want to clear.
2. Select Clear Filter From from the list.
The filter is cleared and When a filter is applied
to a column, the filter
the table data is displayed button changes
without the filter.
Custom Auto Filter
When you need to filter using
more complicated criteria, you
have to use a Custom AutoFilter.
Custom AutoFilters are more
difficult to set up and create
than ordinary AutoFilters, but
they’re much more flexible and
powerful. Fig. 9.9. Removing a filter

1. Click a field name list arrow and select Custom fromthe list.
2. Select Text Filters or Number Filters from the list.A list of ways to filter the
text appears.
3. Select a filter option from the list.
The Custom Filter dialog box appears.
4. Complete the dialog box as necessary
and click OK. Fig. 9.10. The Top 10 Custom Sort dialog box.

Advance Spreadsheet Tools 211


Excel now filters the table by the custom filter.
Removing Duplicate Rows of Data
EXERCISE NOTES
If there are duplicate rows of identical data in
Exercise File: Table 9-6.xlsx
your table, Excel can find and remove the
Exercise: Remove duplicate rows of
duplicate rows for you.
data (select all columns).
 Trap: Removing duplicate values
actually deletesthe duplicate data, so you may want to copy the data to
another worksheet or workbook first in case.
1. Select a cell in the table.
Tip: You can remove duplicates
from cell rangesoutside of a table
as well, but in that case you need
to select the entire cell range you
want to examine.
2. Click the Data tab on the Ribbon and
click the Remove Duplicates button
in the Data Tools group. The Remove
Duplicates dialog box appears.
Other Ways to Display the Remove

Duplicates Dialog Box: Select a cell
Fig. 9.11. The Remove Duplicates dialog box.
in the table. Under Table Tools on the
Ribbon, click the Design tab. Click the Remove Duplicates button in the
Tools group.
3. Select the columns you want to check for duplicates.
All columns are selected by default, but you can select/deselect individual
columns in the Columns list. You can also use the Select All and Unselect All
buttons to select columns.
4. Click OK.

Duplicate values are
deleted and a message
appears, telling you how
many duplicate values that
were found and removed.
Fig. 9.12. The results of the remove duplicates command.
5. Click OK.

212 Advance Spreadsheet Tools


FORMATTING THE TABLE

You can change the appearance of a table by EXERCISE NOTES


applying a preset table formatting style. Exercise File: Table9-7.xlsx
Apply a style while creating a table Exercise: Apply Table Style Light 17 to
the table.
You can apply a style while also creating a table. Select the First Column and Last
1. Select a cell range that you want to Column options in the Table Style
format as a table. Options group.
2. Click the Home tab on the Ribbon and click the Format as Table button in
the Styles group.
The table format gallery appears. Here you can select styles from the Light,
Medium, or Dark categories. You may need to scroll down the list to see the
Dark category.
3. Select a table style.
The Format As Table dialog box appears.
4. Click OK.
The Table Styles Gallery
A table is created and
formatted with the
selected style. Table
Tools appear on the
Ribbon, and the Design
contextual tab appears.
Apply a Table Style to an
Existing Table
1. Select a cell in the table.
2. Under Table Tools on the
Ribbon, click the Design
tab.
3. Select the style you want
to use in the Table Styles Fig. 9.12. The table with a new table style, and with First
group. Column and Last Column style options applied.

Tip: To display the entire Table Styles gallery, click the More button in
the Table Styles group.

Advance Spreadsheet Tools 213


Remove a Table Style
You can easily remove a table style from a table.
1. Select the table that is formatted with the table style. The Design tab appears.
2. Under Table Tools on the Ribbon, click the Design tab.
3. Click the None style or select Clear in the Table Styles group.
The table format is removed.
Format the Table Style
After applying a table style, you can format individual table style elements.
1. Select a cell in the table.
2. Under Table Tools on the Ribbon, click the Design tab.
The formatting options available in the Table Style Options group include:
›› Header Row: Toggles the table’s header row on and off.
›› Total Row: Adds a total row to the bottom of the table. This option
doesn’t just change formatting, but also allows you to calculate values in
the total row.
›› First/Last Column: Displays special formatting for the first or last
columns in the table.
›› Banded Rows/Columns: Displays odd and even rows and columns
differently for easier reading.
3. Select the option(s) you want to use in the Table Style Options group.

USING DATA VALIDATION


You can help users enter accurate EXERCISE NOTES
and appropriate information into Exercise File: Table9-8.xlsx
your worksheets with Excel’s Exercise: Extend the table to include column I, and
Data Validation feature. Data add a“Purpose” label to the column.
validation restricts the type of Set data validation in column I so that the data entry
information that can be entered can be selected from a list of these options: Senior
into a cell and can provide Manager, Manager, Associate. Enter “Associate” using
the user with instructions on the list in I2.
entering information in a cell. Set data validation in column E that sets the text length
of the entries equal to 2. Create an input message for
Set Validation Criteria column Ecells that displays: “Enter the state code.”
To use data validation, you first To test it, enter “Minnesota” in cell E2 and press
need to specify the validation <Enter>.Click Retry and enter “MN”.
criteria you want to use.
214 Advance Spreadsheet Tools
1. Select the cells you want to validate.
You will usually want to select a
column of data, although you can
select a single cell as well.
2. Click the Data tab on the Ribbon
and click the Data Validation
button in the Data Tools group.
The Data Validation dialog box
appears, displaying the Settings
tab.
3. Click the Allow list arrow and
select the criteria option you
Fig. 9.14. Creating a list in the Data Validation dialog box.
want to use.
The table below and to the right, Validation Criteria Options, describes your
choices.
Depending on your criteria selection, you will next need to select a Data
option, and/or select additional options in the dialog box. You may also need
to enter values.
4. Complete the remaining fields on the Settings tab and click OK.
The data validation is set for the selected cell(s). Now when a user tries to
enter data that is not valid, Excel will prevent the entry and display a message
about the cell being restricted.
Table 9.3: Validation Criteria Options
Any value No validation criteria applied. Any valuecan be entered.
Whole Allows a whole number between minimum and maximum limits you set.
number
Decimal Allows a decimal or a percent entered as adecimal between limits you set.
List Allows a value from a list of choices youinput or select from a range. A list
arrow then appears in the cell, allowing the userto make a choice from the
list.
Date Allows a date within prescribed limits.
Time Allows a time within prescribed limits.
Text length Allows text containing a certain number of characters that you prescribe.
Custom Allows you to enter a formula to calculatewhat is allowed in the cell.

Advance Spreadsheet Tools 215


Tips
• By default, when you enter invalid data in a validated cell, a warning
message appears and entry of the invalid data is not allowed.
However, you can modify the message that appears, and even allow
invalid data to be entered into a validated cell. To do this, click the
Error Alert tab in the Data Validation dialog box and select the desired
options.
• To find validated
data in a worksheet,
click the Find &
Select button in
the Editing group
on the Home tab
and select Data
Validation. The
validated cells are
highlighted. Fig. 9.15. Selecting data from a data validation list.

• To remove validation criteria, select the cells that contain the validation
you want to remove, and click the Data Validation button in the Data
Tools group on the Data tab. Click Clear All, then click OK.
Create an Input Message
You can set up Excel to display a message whenever a cell or range of cells is
selected. These messages are useful for providing data entry instructions.
1. Select the cells where you want an input message to appear.
The input message will
appear when the cell or cells
are selected.
2. Click the Data tab on the
Ribbon and click the Data
Validation button in the Data
Tools group.
The Data Validation dialog
box appears.
3. Click the Input Message tab.
Fig. 9.16. Defining text length in the Data Validation dialog box.

216 Advance Spreadsheet Tools


Tips: Make sure the “Show input message when cell is selected” box is
selected—it should be selected by default.
4. Click in the Title box and type
a title for the message.
The title will be displayed
along with the message when
you select the cell(s).
5. Click in the Input message
box and type a data input
message. Fig. 9.17. An error message appears when you try to enter data
For example, you could enter that does not match a data validation rule.

instructions such as “Enter State name as a two-letter abbreviation”.


6. Click OK.
Now when you select the cell(s), you will see the title and message displayed.

SUMMARIZING A TABLE WITH A PIVOTTABLE

You can analyze table data by using it in a Pivot EXERCISE NOTES


Table. Exercise File: Table9-9.xlsx
1. Select a cell in the table. Exercise: Summarize the table with
a PivotTable on a new worksheet.
The Table Tools appear on the Ribbon. Experiment with the PivotTable tools,
2. Under Table Tools on the Ribbon, click then delete the worksheet containing
the Design contextual tab and click the the PivotTable.
Summarize with PivotTable button in the Tools group.

The Create PivotTable
dialog box appears.
3. Click OK.
A new sheet is added
to the workbook to
accommodate the
PivotTable report. Here
you can create a PivotTable
to analyze the data in your
table, according to your
specifications.
Fig. 9.18. The Create PivotTable dialog box.

Advance Spreadsheet Tools 217


Tips: Other lessons describe how to work with PivotTables in more
detail. This is the simplest way to view a summary of the table in a
PivotTable.

Fig. 9.19. Summarizing table data with a PivotTable.

CONVERTING TO A RANGE

If you no longer want a table, you can turn it EXERCISE NOTES


back into a normal range. Exercise File: Table9-10.xlsx
1. Select a cell in the table. Exercise: Convert the table back to
Under Table Tools on the Ribbon, the a normal range of cells. Undo that
action.
Design contextual tab appears.
2. Under Table Tools on the Ribbon, click the Design contextual tab and click
the Convert to Range button in the Tools group.
3. Click Yes.
The table converts back to a normal range of cells, but the table formatting is
still applied.

218 Advance Spreadsheet Tools


Other Ways to Convert a Table to a Range: Select the table, right-click the

table and select TableConvert to Range from the contextual menu.

Fig. 9.20. The Convert to Range button.

Working with Tables Review


QUESTIONS
1. You can create a blank table or a table that uses an existing data range. (True or False?)
2. Which of the following is NOT a way to resize a table?
(a) Click the Resize Table button in the Properties group.
(b) Use the Resize Table Wizard.
(c) Enter data in a cell below or to the right of the table.
(d) Click and drag the table’s sizing handle.
3. By default, when you add a total row to a table, the last column is summed. (True or
False?)
4. Custom sorting allows you to sort data by multiple columns. (True or False?)
5. Which of these is NOT a custom autofilter in Excel?
(a) Top 10 (b) Equals
(c) Contains (d) Color
Advance Spreadsheet Tools 219
6. Removing duplicates from a table moves the duplicate data to another worksheet.
(True or False?)
7. Once you apply a table style to a table, you can’t change it to a different one.
(True or False?)
8. Which of the following is NOT a formatting option in the Table Style Options
group?
(a) Header Row (b) Checkered Rows
(c) Banded Columns (d) First Column
9. Which of the following statements is NOT true?
(a) You can provide users with information and feedback using Data Validation.
(b) To use Data Validation, click the Data Validation button in the Data Tools group on
the Data tab.
(c) You must protect the worksheet to use the data validation feature.
(d) Data validation lets you restrict which type of information is entered in a cell.
10. You can summarize and analyze table data using a .
(a) PivotTable (b) PivotSheet
(c) PivotGrid (d) DataSheet
11. When you convert a table to a range, the table formatting remains applied to the cells.
(True or False?)

ANSWERS
1. True. You can create a blank table or a table that uses an existing data range.
2. B. There isn’t a Resize Table Wizard in Excel.
3. True. When you add a total row to a table, the last column is summed by
default.
4. True. Custom Sorting allows you to sort by multiple levels, so you can sort by
multiple columns.
5. D. Color is not a filter option in Excel. It is, however, a way you can sort.
6. False. Removing duplicates from a table deletes the data completely.
7. False. You can always change table styles.
8. B. Checkered Rows is not an option in the Table Style Options group.
9. C. You don’t need to protect the worksheet to use the data validation feature.
10. A.You can summarize and analyze table data using a PivotTable.
11. True. When you convert a table to a range, the table formatting remains
applied to the cells.

220 Advance Spreadsheet Tools


Getting Started 10
Chap
ter
with Worksheets

There are many ways to analyze worksheet data, including sorting and filtering
records. This chapter explains how to use a PivotTable to analyze dataranges.
A PivotTable is usually the best way to summarize and analyze data ranges or
tables. PivotTables are good for grouping or expanding levels of data, switching
columns and rows (“pivoting” data), and filtering and sorting. They lend themselves
particularly well to summarizing long lists of data that need to be summed.
This chapter explains how to create PivotTables, modify their structure, and
create PivotCharts that graphically illustrate PivotTables.
Using Exercise Files
This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and closethe
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the
exercisesin a chapter can be performed in succession from the first lesson to the
last.

CREATING A PIVOTTABLE

To create a PivotTable, you need to decide


which fields you want to include, how you want EXERCISE NOTES
your PivotTable organized, and what types of Exercise File: TripSales10-1.xlsx
calculations your PivotTableshould perform. Exercise: Create a PivotTable on a new
worksheet using the data from the
Don’t worry if PivotTables are confusing Promotion Sales worksheet.
at first, they will make a lot more sense once
you’ve actually created one.

Advance Spreadsheet Tools 221


1. Select a cell in a data range.
Other Ways to Create a PivotTable: Select a cell in a table, click the Design
tab on the Ribbon, and click
the Summarize with Pivot
button in the Tools group.
2. Click the Insert tab on
the Ribbon and click the
PivotTable button in the
Tables group.
The Create PivotTable dialog
box appears and a moving
dashed line appears around
the data range that Excel will
Fig. 10.1. The Create PivotTable dialog box.
use for the PivotTable.
Tip: The data range doesn’t have to be in the current workbook. Select
the Use an external data source option to select data outside the
workbook.
3. If necessary, select the data range you want to analyze, including column
labels.
Next you need to decide
if you want to display
the PivotTable in a new
worksheet or one that
already exists in your
workbook.
4. Select where you want
the PivotTable report
to beplaced.
You can choose a new
or existing worksheet.
Tip: If you
select Existing
Worksheet, click Fig. 10.2. Creating a new PivotTable.

the Collapse Dialog button and select the worksheet and upper-left
cell of the range where you want toput the PivotTable.

222 Advance Spreadsheet Tools


5. Click OK.
The Excel window changes to display the structure for a new PivotTable,
along with the PivotTable Field List task pane. No data has been pulled into
the PivotTable yet—you’ll need to use the task pane to tell Excel how you
want to lay out the PivotTable.
Tip: You can change how the PivotTable Field List task pane looks. Click
the button arrow near the top rightcorner of the task pane and select a
layout option.

SPECIFYING PIVOTTABLE DATA

Once you’ve created your PivotTable, you have EXERCISE NOTES


to specifythe data you want to analyze. You’ll Exercise File: TripSales10-2.xlsx
simply select the fields you want to display Exercise: Add the Office, Destination,
in the PivotTable Field List, then adjust the and Tickets fields to the PivotTable.
layout by dragging them between the desired Move the Office field to the Column
report areas at the bottom of the task pane. Labels area.
You’renot going to understand how to do this Switch the positions of the Office and
unless you try it—so let’s get started! Destination fields.

Add fields
1. Click the check boxes
next to the fields you
want touse as data in
the PivotTable.

By default, non-
numeric fields are
added to the Row
Labels area, numeric
fields are added
to the Values area,
and OLAP date and
time hierarchies are
added to the Column
Labels area. However, Fig. 10.3. A PivotTable with data.
the fields can be
rearranged to other areas.

Advance Spreadsheet Tools 223


Other Ways to Add Fields: Right-click a field name and select the layout

area to which you want to add the
field. Or, click and drag a field
name into a layout section.
Rearrange fields
1. Click and drag fields between the
areas in the task pane to reposition
the PivotTable layout.
The data and layout of the
PivotTable changeaccordingly.
Tips
• Drag a field between the
Row Labels and Column Fig. 10.4. This diagram illustrates how areas in the
PivotTable Field List correspond to areas in the
Labels boxes to change PivotTable report
the orientation of the
PivotTable.
• You can change PivotTable labels by typing a newlabel.
1. The report filter area.
Move a field to this area, then select the
criteria by which you want to filter the
PivotTable.
2. The Column Label area.
3. The Row Label area.
4. The Results area.
The results include data that from the fields
in the column and row areas. Results are
also filtered from the reportfilter area.

CHANGING A PIVOTTABLE’SCALCULATION

Besides adjusting the layout of your PivotTable EXERCISE NOTES


data, you can also change how a PivotTable Exercise File: TripSales10-3.xlsx
summarizes values. For example, you might Exercise: Change the calculation of
want a PivotTable to display averages instead the Tickets field fromSum to Max.
of totals. Change it back to Sum.

224 Advance Spreadsheet Tools


1. Make sure the cell pointer is located in thePivotTable.
To change the calculation in a PivotTable, you needto change the value field
settings.
2. Under PivotTable Tools on the Ribbon, click the Options tab and click the
Field Settings button in theActive Field group.

The Value Field
Settings dialog box
appears, displaying the
“Summarize by” tab. Here
you can select calculation
options including Sum,
Count, Average, or Max,
among others.
3. Select the type of
calculation you want to
use to summarize the
value data from the list.
4. Click OK.
The summarized value
Fig. 10.5. The Value Field Settings dialog box.
data in the PivotTable
changesto using the new calculation.

FILTERING AND SORTING APIVOTTABLE

Much like you can with basic data ranges and EXERCISE NOTES
tables inExcel, you can filter and sort data in a Exercise File: TripSales10-4.xlsx
PivotTable. Exercise: Use the Row Labels filter
Filter a PivotTable button to display only records from
Blaine. Clear the filter.
1. Select a cell in the PivotTable.
Try another way to filter: Add the
The Options and Design tabs appear Commission field to the Report
underPivotTable Tools on the Ribbon. Filter area of the PivotTable Field
2. Click the filter button for a row or List and filter the PivotTable so only
commissioned sales appear. Clear the
column label. filter.
A list sorting and filtering options Sort the PivotTable by Office (Row
appears. The bottom area of the list Labels) from Z to A, then sort again
displays criteria by which youcan filter. from A to Z.

Advance Spreadsheet Tools 225


Other Ways to Select Filter Criteria: Click the Search box in the filter list

and type the criteria by which The filter button changes to make you
you want to filter. The list aware that a filter has been applied.
displays criteria that match
your search.
3. At the bottom of the list, click
the check boxes nextto the fields
you want to filter out to uncheck
them. Fig. 10.6. The PivotTable filtered to display only
“Blaine” records.
Fields with checkmarks next to
them will remain, while those without checkmarks will be filtered out.
4. Click OK.
The PivotTable is updated.
Other Ways to Filter a PivotTable: Drag a field into the Report Filter area
of the PivotTable Field List task pane. Click the field’s filter button above the
PivotTable and select whatyou want to filter by. Or, click a filter button, point
to Label Filters or Click the list arrow to choose how
you want to filter the PivotTable.
Values Filters, and
select a filtering
option.
Sort a PivotTable
Drag fields you
1. Select a cell in the want the filter for
to this area.
PivotTable.
The Options and
Design tabs appear
under PivotTable Fig. 10.7. Adding a field to the Report Filter area.
Tools on the Ribbon.
2. Click a filter button.
Here you’ll see sort options at the top of the list,along with the filter options
toward the bottom.
3. Select a sort option.
Other Ways to Sort: Click the Options tab on the Ribbon. Click the button

you want to use in the Sort group.

226 Advance Spreadsheet Tools


WORKING WITH PIVOTTABLELAYOUT

There are several options for altering the EXERCISE NOTES


layout of your PivotTable and the PivotTable Exercise File: TripSales10-5.xlsx
Field List task pane. Exercise: Change the layout of the
Adjust PivotTable Field List layout PivotTable Field List so the field and
area sections are side-by-side. Then
You can change the layout of the PivotTable changethem back to stacked.
Field List makes it easier to work with. For In the Show/Hide group of the Options
example, you can display only the fields section tab on the Ribbon, hide the Field List
if you have a long list of fields to choose from. and Field Headers. Show both again.
Or, if you are done setting up the PivotTable, In the Layout group of the Design tab
you can display only the area section. on the Ribbon, turn off the row and
column grand totals. Enable them
1. Select a cell in the PivotTable. again.
The PivotTable Field List task pane Change the report layout to Tabular
appears. Form.
2. Click the layout button at the top of the PivotTable Field List task pane and
select a layout option.
You can choose to display only the fields section, only the report areas section,
or both sections
in different
arrangements. Layout button
The table below
and to the right,
PivotTable Field
List Layout
Options, is has
more information
about these
arrangements.
Show/Hide PivotTable
elements
You can change which
elements are displayed
in thePivotTable.

Fig. 10.8. Changing PivotTable Field List layout.

Advance Spreadsheet Tools 227


1. Select a cell in the PivotTable.
The Options and Design tabs appear underPivotTable Tools on the Ribbon.
2. Under PivotTable Tools on the Ribbon, click the Options tab.
The Show/Hide group contains three buttons. Bydefault, they are all shown
in the PivotTable.
Table 10.1. PivotTable Field List Layout Options

This is the default layout. The fields are stacked abovethe areas.

The fields appear side by side with the areas. This isuseful if there is a long list
of fields to choose from.

Only the fields list is displayed. This is ideal if you only need to work with adding
fields to the PivotTablereport.

Only the areas are displayed (2 by 2). This is ideal if the fields you want have
been added and you want towork with the report’s layout.

Only the areas are displayed (1 by 4). This is ideal if the fields you want have
been added and you want to work with the report’s layout

›› Field List: Show or hide the PivotTable Field Listtask pane.


›› +/- Buttons: Show or hide the +/- buttons that allow you to expand or
collapse multi-level PivotTable items.
›› Field Headers: Show or hide column and rowfield headers.
3. Click the button you want to use in the Show/Hidegroup.
If the button is an orange color, the element is displayed in the PivotTable. If
the button is notorange, the element is hidden.
Layout Group on the Design Tab
The Layout group on the Design tab allows you to changewhat elements appear on
the PivotTable.
1. Select a cell in the PivotTable.
The Options and Design tabs appear underPivotTable Tools on the Ribbon.
2. Under PivotTable Tools on the Ribbon, click the Design tab.
Here you can see the Layout group. It contains fourbuttons:

228 Advance Spreadsheet Tools


›› Subtotals: Click to show or hide subtotals, and tospecify where to show
them.
›› Grand Totals: Click
to show or hide grand
totals, and to specify
whether they appear for
rows, columns, or both.
›› Report Layout: Show the
PivotTable in compact,
outline, or tabular form.
›› Blank Rows: insert
or remove a blank line
between each grouped
item in the PivotTable.
3. Click the button you want to
use in the Layout group.
A list of options appears,
depending on the buttonthat
was selected.
Fig. 10.9. The layout of the PivotTable in Tabular layout,
4. Select an option from the list. and the Layout group on the Design tab.
The PivotTable layout is changed accordingly.

GROUPING PIVOTTABLE ITEMS

You can group PivotTable data in order to set it EXERCISE NOTES


apart additional subsets of data. You can group
Exercise File: TripSales10-6.xlsx
most items, but dates are a common item to
Exercise: First, set up the PivotTable
group. For example, you maywant to group the for grouping: Remove the Office
information in the PivotTable by days, months, field from the Row Labels area of
quarters, or years. the PivotTable Field List. Move the
Destination field to the Row Labels
Group dates or times area. Add the Date field to the Column
1. Select the date or time field in the Labelsarea.
PivotTable. Select cell B3 and group the dates by
month. Then ungroupthe dates.
To select the field, click the name of the
field in thePivotTable, such as the row or column header.

Advance Spreadsheet Tools 229


2. Under PivotTable Tools on the Ribbon, click the Options tab and click the
Group Field button in theGroup group.
The Grouping dialog box
appears.
3. Specify the starting and
ending dates you want to
group and the interval you
want to group by.
By default, the starting
and ending dates are the
first and last dates in the 1. Select the field by which you want to group. This
example happens to group by the Date field.
PivotTable.
4. Click OK.
The grouping is applied to the
PivotTable report.
Tip: To group dates by weeks,
select Days in the By area of
the Grouping dialog box and
enter 7 in the Number of days
box.
Group numeric items
1. Select the numeric field in the
PivotTable that contains the data
you want to group by.
2. Under PivotTable Tools on the
Ribbon, click the Options tab and
click the Group Field button in the
2. Select the increment by which you want to
Group group.
group. This example will group the data so
The Grouping dialog box appears. it is displayed by month, rather than by day.
3. Specify the starting and ending values you want togroup and the interval you
want to group by, then click OK.
Group other selected items
You can also group items that are not dates or numericdata, such as labels.
1. Select the items in the PivotTable that you want to group.

230 Advance Spreadsheet Tools


2. Under PivotTable Tools on the Ribbon, click the Options tab and click the
Group Selection button inthe Group group.
The items are grouped and
collapse buttons appear so
you can collapse or expand the
group of data.
Tip: You can also use this
method to group specific
items in a field.
Ungroup items
1. Select the items in the 3. The data for each month is grouped together
PivotTable that you want to under one column, rather than being shown as
ungroup. separate days.
Fig. 10.10. Grouping the PivotTable dates by month.
2. Under PivotTable Tools on the
Ribbon, click the Options tab and click the Ungroup button in the Group
group.
The items are ungrouped.

UPDATING A PIVOTTABLE

If you make changes to the source data a PivotTable EXERCISE NOTES


is based on, the PivotTable isn’t automatically Exercise File: TripSales10-7.xlsx
updated. Instead you must manually refresh the Exercise: View the Promotion Sales
PivotTable anytime you change its underlying worksheet and changethe value in cell
source data. This lesson explains how to do that, G2 to 5. Return to the PivotTable on
Sheet2and refresh the PivotTable. The
as well as how to change the source of the data data updates in C23.
the PivotTable is based on. Change the PivotTable data source so
Refresh PivotTable data that it uses only the range A1:G4 on
the Promotion Sales worksheet.
If you’ve made changes to the data what your
PivotTable pulls from, you need to refresh the PivotTable to update it.
1. Select a cell in the PivotTable.
The PivotTable Tools are displayed on the Ribbon.
2. Under PivotTable Tools on the Ribbon, click the Options tab and click the
Refresh button in the Datagroup.
The PivotTable updates to include any changes to thesource data.

Advance Spreadsheet Tools 231


Change PivotTable data source
You can easily change which
data is used by thePivotTable.
1. Select a cell in the
PivotTable.
The PivotTable Tools are
displayed on the Ribbon
2. Under PivotTable Tools
on the Ribbon, click the
Options tab and click
the Change Data Source
button in the Data group.
The Change PivotTable
Data Source dialog box
appears, along with the
current data source—
which has a moving
dotted line around it.
Fig. 10.11. The Data group on the Options tab.
3. Select a new data range.
4. Click OK.
The PivotTable updates with the
data from the newsource range.

Fig. 10.12. The Change PivotTable Data Source


dialog box.
FORMATTING A PIVOTTABLE

You can quickly format a PivotTable with Excel’s EXERCISE NOTES


built-instyles and style options. Exercise File: TripSales10-8.xlsx
Apply a built-in style Exercise: Apply Pivot Style Medium 24
from thePivotTable Styles gallery.
1. Select a cell in the PivotTable.
Select the Banded Rows style option
The PivotTable Tools are displayed on and deselect the Column Headers
the Ribbon. option.

232 Advance Spreadsheet Tools


2. Click the Design tab and select a style in thePivotTable Styles group.
The PivotTable is formatted with the style youselected.
PivotTable
Tip: Click the
style options Built-in styles
More button in the
PivotTable Styles
group to display
an expanded
PivotTable Styles
gallery.
Work with style options
Besides applying a style to the
table, you can select PivotTable
style options that allow you to
adjust the format for a part of
a PivotTable. For example, you
can apply special formatting
to row headers or make the
Fig. 10.13. Selecting a built-in PivotTable style from the
columns banded. PivotTable Styles group.
1. Select a cell in the PivotTable.
The PivotTable Tools are displayed on the Ribbon.
2. Click the Design tab and select an option in thePivotTable Style Options group.
Here is a brief description of the style options you can select from in the
PivotTable Style Options group:
›› Row/Column Headers: Displays special formatting for the first row or
column of thePivotTable.
›› Banded Rows/Columns: Applies differentformatting to alternate rows
or columns.
Tip: Besides using the
formatting options on
the Designtab, you can
format a PivotTable
using general format-
ting commands found
on the Home tab. Fig. 10.14. The PivotTable report with the updated style
and style options

Advance Spreadsheet Tools 233


CREATING A PIVOTCHART

A PivotChart is similar to an ordinary chart


EXERCISE NOTES
created in Excel, except that it plots a
Exercise File: TripSales10-9.xlsx
PivotTable’s information. Like PivotTable
Exercise: Insert a Clustered Column
reports, PivotCharts are dynamic, which means
PivotChart.
you can change a PivotChart’s structure.
1. Select a cell in the PivotTable.
The PivotTable Tools are
displayed on the Ribbon.
2. Under PivotTable Tools
on the Ribbon, click the
Options tab and click the
PivotChart button in the
Tools group.
The Insert Chart dialog
box appears, displaying
different types of charts.
3. Select the type of chart you Fig. 10.15. The Insert Chart dialog box.
want to use and click OK.
The chart appears in the worksheet with yourPivotTable.
Tip: Click and drag the PivotChart’s border tomove the chart around in
the worksheet.
4. Modify the chart using the PivotChart Filter Pane andthe PivotTable tools.
Tips
• If you modify the PivotTable, the PivotChart willchange also.
• More detailed information about modifying and formatting charts
can be found in the “Creating andWorking with Charts” chapter.

234 Advance Spreadsheet Tools


Fig. 10-16: A clustered column PivotChart.

USING SLICERS

Slicers are a new feature in Excel 2010 that EXERCISE NOTES


has been added in order to provide an easy Exercise File: Slicers1.xlsx; Sheet1
way to filter PivotTable data. Slicers label the Exercise: View the number of tickets
filters applied, with details, so you can easily the St. Cloud office sold to Boston,
New York, and Washington D.C.
understand the data that is displayed and
(Insert slicers for the Destination
filtered in the PivotTable report.
and Office fields. Select the St. Cloud
Create a PivotTable Slicer button in the Office slicer. Select the
Boston, New York, and Washington,
Here’s how to create a slicer in an existing
D.C. buttons in the Destinationslicer.)
PivotTable.
1. Click the PivotTable report to select
it.
The PivotTable Tools contextual tabs
appear on theRibbon.
2. Click the Options tab under
PivotTable Tools on the Ribbon and
click the Insert Slicer button in the
Sort& Filter group.
The Insert Slicers dialog box
appears. All the fields in your Fig. 10-17: The Insert Slicers dialog box.

Advance Spreadsheet Tools 235


PivotTable are listed here; you decide which fields you want to filter by in the
PivotTable.
3. Click the check box of the PivotTable fields by whichyou wish to filter.
Keep in mind that you’ll get a separate slicer for eachfield you select.
4. Click OK.
The slicer(s) appear above the PivotTable. You can move a slicer to another
location on the worksheet,and resize it as needed.

Fig. 10-18: The PivotTable with two slicers applied.

Filter Data Using a Slicer


After you create a slicer, it appears on the worksheet alongside the PivotTable, in a
layered display if you havemore than one slicer.
1. Click a button in a slicer. Press and hold the <Ctrl> or <Shift> keys to select
multiple buttons.
The button is selected, and the PivotTable data isfiltered accordingly.
Tip: Simply click the button again to stopfiltering out the selected data.

236 Advance Spreadsheet Tools


Format a Slicer
You can change the appearance of a
slicer to match the color scheme of
your PivotTable.
1. Click the slicer you want to
format.
The Slicer Tools appear on the
Ribbon.
2. Click the Options tab under
Slicer tools on the Ribbon and
select the style you want in the Fig. 10-19: Anatomy of a slicer.

SlicerStyles group.
The style is applied to the slicer.
Tip: You can also click the More button in theSlicer Styles group to view
more styles.
Delete a Slicer
If you no longer want to filter PivotTable data, you canremove the slicer completely.
1. Click the slicer and press <Delete>.
The slicer no longer appears in the worksheet.
Other Ways to Delete a Slicer: Right-click the slicer, and then select Remove

<Name of slicer> from the contextual menu.

SHARING SLICERS BETWEENPIVOTTABLES

If you’re working with a workbook that has


EXERCISE NOTES
several different PivotTables, it’s likely that
Exercise File: Slicers2.xlsx, Sheet2
you’ll want to apply the same filter to other
Exercise: Apply the Destination slicer
PivotTables. This lesson shows you how from PivotTable 1 to PivotTable 2.
to share slicers between PivotTables in a
workbook.
Apply a slicer to another PivotTable
If you want to use a slicer in another PivotTable, you haveto make the slicer available
to that PivotTable.
1. Click the slicer that you want to share in anotherPivotTable.
The Slicer Tools appear on the Ribbon.
Advance Spreadsheet Tools 237
2. Click the Options tab under Slicer Tools on the Ribbon and click the
PivotTable Connections button.
The PivotTable Connections
dialog box appears. Other
PivotTables you can share the
slicer with arelisted.
3. Click the check boxes of the
PivotTables in whichyou want
the slicer to be available.
4. Click OK.
The slicer is now applied to Fig. 10-20: The PivotTable connections dialog box.
the selectedPivotTable(s).

Working with PivotTables Review


QUESTIONS
1. You can create a PivotTable in its own new worksheet or in one that already exists in
your workbook. (True or False?)
2. Specify the data you want to use in the PivotTable in the___________task pane.
(a) Select Fields (b) Specify Fields
(c) PivotTable Field List (d) PivotTable Layout
3. Which of the following is NOT a calculation available in the Value Field Settings dialog
box?
(a) Count (b) Average
(c) StdDev (d) These are all available
4. You can filter a PivotTable by dragging a field into the___________box in the PivotTable
Field List.
(a) AutoFilter (b) Report Filter
(c) Pivot Filter (d) Data Filter
5. Which of the following is NOT a button found in the Layout group on the Design tab?
(a) Header Row (b) Grand Totals
(c) Report Layout (d) Blank Rows
6. You can group any type of PivotTable item except for dates. (True or False?)
7. When you make changes to your PivotTable’s source data, the PivotTable
refreshes automatically to include the edits. (True or False?)

238 Advance Spreadsheet Tools


8. Which of the following is NOT an option in the PivotTable Style Options
group?
(a) Banded Columns (b) Banded Rows
(c) Bold Headers (d) Row Headers
9. When you modify a PivotTable, the PivotChart is updated along with it. (True or False?)
10. A slicer is a visual way to filter PivotTable content. (True or False?)
11. PivotTables can only be applied to a single PivotTable at a time. (True or
False?)

ANSWERS
1. True. You can create a PivotTable in either a new or existing worksheet
2. C. Specify the data you want to use in the PivotTable in the PivotTable Field
List task pane.
3. D. All are available.
4. B. You can filter a PivotTable by dragging a field into the Report Filter box in
the PivotTable Field List.
5. A. Header Row is not a button found in the Layout group on the Design tab.
6. False. Dates are commonly grouped in PivotTables.
7. False. You must manually refresh the PivotTable to include changes made to
your source data.
8. C. Bold Headers is not an option in the PivotTable Style Options group.
9. True. When you modify a PivotTable, the PivotChart is updated along with it.
10. True. Slicers provide a visual way to filter PivotTables.
11. False. PivotTables can applied to other PivotTables in a workbook.

Advance Spreadsheet Tools 239


Working with 11
Chap
ter
Tables
Most people don’t realize that Excel has numerous tools for analysis and
organization, so they perform Excel tasks the manual way.
This method can help you get by in simple situations, but isn’t very effective
when you need to perform more complex what-if analysis or organize large lists
of data.
In this chapter, you will learn about Excel’s tools for analyzing and organizing.
These include tools for creating multiple worksheet scenarios, using Goal Seek and
Solver tools to perform what-if analysis, and organizing your data by subtotaling,
outlining, or consolidating.
Using Exercise Files
This chapter suggests exercises to practice the topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and close the
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaining lesson exercises for the chapter. (This
chapter does not use the same exercise file for the duration of the chapter.)
The exercises are written so that you may “build upon them”, meaning the
exercises in a chapter can be performed in succession from the first lesson to the last.

CREATING SCENARIOS

If you’ve ever used a worksheet to answer the EXERCISE NOTES


question “What if?” you’ve already performed Exercise File: LoanPayment11-1.xlsx
what-if analysis. For example, what would Exercise: Add a scenario called
happen if your advertising budget increased Original that uses the original values
in cell range A4:C4.
by 40 percent? How about 50 percent?
Next, add a scenario called 30 Year Loan
Excel has several tools for performing and change the term of the loan to 30.
What-If Analysis, including Goal Seek, Show the 30 Year Loan scenario in the
Data Tables, and Solver. In this lesson, you worksheet.

240 Advance Spreadsheet Tools


will learn how to create multiple what-if scenarios using Excel’s Scenario
Manager.
Create scenarios
A scenario is a set of input values that you can substitute in a worksheet to perform
what-if analysis. For example, you could create scenarios to show various interest
rates, loan amounts, and terms
for a mortgage. Excel’s scenario
manager lets you create and store
different scenarios in the same
worksheet.
1. Create or open a worksheet
that contains one or more
formulas.
2. Click the Data tab on the
Ribbon, click the What-If Fig. 11.1. The Add Scenario dialog box.
Analysis button in the Data
Tools group, and select Scenario Manager from the list.
The Scenario Manager dialog box appears with the message “No Scenarios
defined. Choose Add to add scenarios.” You want to add a new scenario.
3. Click the Add button.

The Add Scenario dialog box appears.
4. Type a name for the scenario and press <Tab>.
The cursor moves to the Changing cells box. Here you need to select the cells
that contain the values you
want to change.
Tip: To select multiple
nonadjacent cells, hold
down the <Ctrl> key as
you click them.
5. Select the cells in the worksheet
that contain the values you
want to change, then click OK.
Fig. 11.2. The Scenario Values dialog box.
The Scenario Values dialog box
appears. Here you need to enter desired values for the changing cells.

Advance Spreadsheet Tools 241


Tip: To make sure you don’t lose the original values for the changing
cells, use the original cell values in the first scenario you create.
6. Enter values in each of the boxes. Click OK, or click Add to add another
scenario.
The scenario is added.
If you clicked OK, the
scenario is listed in
the Scenario Manager.
If you clicked Add, the
Add Scenario dialog box
appears so you can add
another scenario.
7. Repeat steps 4 – 6 to add
a new scenario. Click
OK.
The Scenario Manager
dialog box lists each
scenario that you
created.
8. Click the Close button.
The Scenario Manager Fig. 11.3. The Scenario Manager dialog box.

closes.
Tip: To edit a scenario, select the scenario in the Scenario Manager
dialog box and click the Edit button.
Display a scenario
Once you have created scenarios in a worksheet, you can display the worksheet
using the values from those scenarios.
1. Click the Data tab on the Ribbon, click the What-If Analysis button in the
Data Tools group, and select Scenario Manager from the menu.
The Scenario Manager dialog box appears.
2. Select the scenario that you want to display and click the Show button.
The worksheet’s values are changed to the values you specified in the
scenario.

242 Advance Spreadsheet Tools


CREATING A SCENARIO REPORT

A scenario summary report is a single EXERCISE NOTES


compiled report that summarizes the results Exercise File: LoanPayment11-2.xlsx
from several scenarios. It’s easier to read than Exercise: Select the cell range A3:F4
and name the cells from the selection.
switching between different scenarios.
Create a scenario summary report
Create cell names (the result cell range is D4:F4).
The first step in creating a scenario summary
report is to create names for the cells that
change.
1. Select the cells involved in the
scenario and the labels you want
to use to name them.
2. Click the Formulas tab on the
Ribbon and click the Create from
Selection button in the Defined
Names group.
The Create Names from Selection
dialog box appears. Fig. 11.4. The Create Names from Selection dialog box.

3. Select the option that describes where the labels are located in the selected
cell range.
The labels that are in the selected cell range will be used as names.
4. Click OK.
The cells are named using the labels.
Create a Scenario Summary Report
Once you’ve created at least two scenarios and have named cells, you can create a
summary report.
1. Click the Data tab on the
Ribbon, click the What-
If Analysis button in the
Data Tools group, and select
Scenario Manager from the
menu.
The Scenario Manager dialog
box appears. Fig. 11.5. A Scenario Summary report.

Advance Spreadsheet Tools 243


2. Click the Summary button.
The Scenario Summary dialog box appears.
3. Make sure the Scenario summary option is selected.
Next you need to specify the result cells. These are the cells that are affected
by the changing cells.
Tip: Alternatively, select the “Scenario PivotTable report” option
to create a report that gives you an instant what-if analysis of your
scenarios.
4. Select the result cell range and click OK.

A new Scenario Summary worksheet is added to the workbook that contains
the summary report.

WORKING WITH DATA TABLES

Another way to get answers to your what-if EXERCISE NOTES


questions is by using a data table. A data table is
Exercise File: LoanPayment11-3.xlsx
a cell range that displays the results of a formula
Exercise: Create a one-input data
using different values. table: Enter =PMT(C4/12,B4*12,A4)
For example, you could create a data table in cell B7. Enter 6.0, 6.5, 7.0, 7.5, 8.0
to calculate loan payments for several interest in cells A8:A12.
rates and term lengths. Select the cell range A7:B12 and
create a data table. In the Data Table
There are two types of data tables: dialog box, enter C4 in the Column
›› One-input Data Table: Displays the input cell box and click OK.
results of a formula for multiple values Delete the contents of B8:B12 to
of a single input cell. For example, if you prepare for the two-input table.
have a formula that calculates a loan Create a two-input data table: Move
the formula in cell B7 to cell A7.
payment you could create a one-input
Enter 5, 10, 15, 20 in cells B7:E7.
data table that shows payment amounts Select the cell range A7:E12.
for different interest rates. Create a data table and enter B4
›› Two-input Data Table: Displays as the row input cell and C4 as the
the results of a formula for multiple column input cell.
values of two input cells. For example, Delete the contents of A7:E12.
if you have a formula that calculates a
loan payment you could create a two-input data table that shows payment
amounts for different interest rates and different term lengths.

244 Advance Spreadsheet Tools


Create a one-input data table
1. Set up the table area. Make
sure you include the formula
in the top row and the input
values in the left column.
Make sure the formula refers
to the input cell.
2. Select the table range that
contains the formula and
substitution values.
This should include blank
cells below the formula and to
the right of the values—this is
where the data table will go.
3. Click the Data tab on the
Ribbon, click the What-If
Analysis button in the Data Fig. 11.6. The Data Table dialog box and the resulting one-
input data table showing different monthly payments at
Tools group, and select Data different interest rates.
Table.
The Data Table dialog box appears.
4. Type the cell reference for the input cell in the Column input cell box and
click OK.
Excel displays the results of the formula using each
Tip: If you set up your table with the data in a row instead of a column,
you would enter the cell reference for the input cell in the Row input
cell box instead.
Create a two-input data table
1. Set up the table area. Make sure you include the formula in the upper-left
cell and the values for the first input cell in the left column and the values for
the second input cell in the top row.
Make sure the formula refers to the two input cells.
2. Select the table range that contains the formula and substitution values
(both the row and column values).

Advance Spreadsheet Tools 245


This should include blank
cells below the formula and
to the right of the values—this is where the data table will go.
3. Click the Data tab on the Ribbon, click the What-If Analysis button in the
Data Tools group, and select Data Table.
The Data Table dialog box appears. Since this is a two-input table, two input
cells need to be entered.
Enter the cells you want to use for the Row input cell.

Fig. 11.7. The Data Table dialog box and the resulting two-input
data table showing different monthly payments
at different interest rates and different terms.

USING GOAL SEEK

When you know the desired result of a single EXERCISE NOTES


formula, but not the value the formula needs
Exercise File: LoanPayment11-4.xlsx
for the result, you can use the Goal Seek feature.
Exercise: Use Goal Seek to determine
For example, you can afford a $1,200 monthly the maximum loan amount you could
payment, so how much of a loan can you take afford with a $1200 monthly payment.
out? When goal seeking, Excel plugs different
values into a cell until it finds one that works.
246 Advance Spreadsheet Tools
1. Open or create a workbook that contains the formulas you want to work
with.
2. Click the Data tab on the Ribbon, click the What-If Analysis button in the
Data Tools group, and select Goal Seek.
The Goal Seek dialog box appears.
3. Click the Set cell box, and click the cell in the worksheet that contains the
formula you want to use.
4. Click the To value box and enter the value you want to change it to.

Fig. 11.8. Using Goal Seek to determine the maximum loan amount with a $1200 monthly payment.

5. Click the By changing cell box, and click the cell you want to change to
achieve the formula result.
This cell must be a cell that is referenced by the formula.
Advance Spreadsheet Tools 247
6. Click OK.
Excel calculates and displays the value needed to achieve the formula result
you desire.
7. Click OK to replace the original values or click Cancel to keep the original
values.

USING SOLVER

Excel’s Solver tool can perform advanced EXERCISE NOTES


what-if analysis on problems with many Exercise File: Mailings11-5.xlsx
variable cells. You can also specify constraints, Exercise: Imagine you’re in charge of
or conditions that must be met to solve the a mailing campaignfor five states. You
problem. have been given the following budget
constraints: your total budget is
Solver has been improved in Excel 2010
$35,000, you must spend atleast 50%
to include a new user interface, and better of the budget on Minnesota mailings,
functionality. and at least three mailings must go
out in each state.
Install the Solver add-in
Based on this information, and the
Solver is an optional Excel add-in. You need to fact that the number of mailings must
install it before you can use it. be a whole number, use Solver to
1. Click the File tab on the Ribbon and calculate
select Options from the menu. the maximum number of mailings you
can send out to eachstate.
The Excel Options dialog box appears.
2. Click the Add-Ins tab.
By default, Excel Add-ins
are displayed. The top of the
list displays add-ins that are
active, the bottom displays
add-ins that are available,
but are not currently active.
3. Click the Go button.
The Add-Ins dialog box
appears, displaying a list
of the add-ins available for
Excel.
Fig. 11.9. The Add-Ins tab of the Excel Options dialog box.

248 Advance Spreadsheet Tools


4. Click the Solver Add-in check box to select it and click OK.

A dialog box appears, asking to confirm that you want to install the add-in.
5. Click Yes.
Microsoft Office reconfigures so that Solver
is installed in Excel. The Solver command
will now be available in the Analysis group
on the Data tab on the Ribbon.
Tip: You may need to restart Excel so
that Solver installs properly.
Use Solver
1. Open or create a workbook that contains
the problem you want to solve.
A problem should consist of a formula that
you want Excel to solve by changing the
Fig. 11.10. The Add-Ins dialog box.
values of its inputs until it arrives at the
desired result.
2. Click the Data tab on
the Ribbon and click
the Solver button in
the Analysis group.
The Solver Parameters
dialog box appears.
First you need to tell
Excel the target cell.
This is the cell that
contains the formula
you want to solve.
3. Select the target cell in
the worksheet.
The cell reference for
the target cell appears
in the Set Target Cell
Fig. 11.11. The Solver Parameters dialog box.
box.
4. Select a To option. If you select the Value of option, enter a value.

Advance Spreadsheet Tools 249


Choose from Max, Min, or Value Of, depending on what value you want Solver
to calculate. For example, if you select Max, Solver will change the specified
cells to make the target cell as large as possible.
Next, you need to specify the
cells that Solver can change
to meet your target cell goal.
5. Click the Collapse Dialog
button in the By Changing
Cells box and select the cells
that need to change to reach
your goal.
Tip: Press and hold the
<Ctrl> key to select
multiple nonadjacent
cells. Fig. 11.12. The Solver Results dialog box.

Finally, add any constraints on the problem. For example, you could specify
that one of the formula’s input cells can’t be greater than a certain value.
6. Click the Add button in the Subject to the Constraints section.
The Add Constraint dialog box appears.
7. Enter a cell reference, select an operator, then enter the constraint value you
want to apply to the cell.
8. Click Add to add another constraint, or OK to continue.
You return to the Solver Parameters dialog box.
9. Click the Solve button.
The Solver Results dialog
box appears, letting you
know whether or not Solver
found a solution.
10. Select Keep Solver Solution
or Restore Original Values
and click OK. Fig. 11.13. The solution calculated by Solver.

250 Advance Spreadsheet Tools


USING TEXT TO COLUMNS
The Convert Text to Columns feature in Excel EXERCISE NOTES
allows you to split the contents of a cell into Exercise File: MonthlySales11-7.xlsx
different columns. For example, you could split Exercise: Select cell A7 and split
a person’s first and last name into separate Denise Winters’ first and last names
columns. into two cells using the space between
the words
You can split data into columns using two
as the delimiter.
different methods:
›› Delimited: The data will be separated
based on the location of commas
or tabs within the data.
›› Fixed Width: You specify a fixed
column break location.
Let’s take a look at both methods.
Tip: Before using the text to
columns feature, make sure
there are enough blank
columns next to your data so
Fig. 11.14. Before splitting text.
that the split data will have
somewhere to go without copying over the rest of your data.
Split data using a delimiter
If the data has delimiters
such as commas or tabs, you
can use them to split the
data.
1. Select the cell range
you want to convert.
2. Click the Data tab on
the Ribbon and click
the Text to Columns
button in the Data
Tools group.

The Convert Text
to Columns Wizard Fig. 11.15. Step 2 of the Convert Text to Columns
dialog box appears. Wizard dialog box.

Advance Spreadsheet Tools 251


3. Select the Delimited option and click Next.
Here you need to select the types of delimiters you want to use to separate
your data. Tabs, semicolons, commas, and spaces are all common delimiters.
Your selection will depend on the types of delimiters you have present in
your data. For example, if you want to split first and last names using the
space between the names, you’d select the Space option.
4. Click the check box next to each delimiter
you want to select in the Delimiters area.

A preview appears, showing you how the
data will be split into different columns
based on your selection.
5. Click Next.
Next you can select a format for each
Fig. 11.16. After splitting text.
column of data.
6. Select a column in the Data preview area and then select a format option for
that column in the Column data format area. Repeat for additional columns.
Tip: If you don’t want the new columns to replace the original data, click
the Destination Collapse Dialog button and select the range where you
want to put the split data.
7. Click Finish.
Tip: A message may appear, asking if you want to replace the contents
of the destination cells. If so, click OK.
The data is split into different columns.
Split data using a fixed column break
You can also decide for yourself where you want to split the data using a fixed
column break.
1. Select the cell range you want to convert.
2. Click the Data tab on the Ribbon and click the Text to Columns button in the
Data Tools group.
The Convert Text to Columns Wizard dialog box appears.
3. Select the Fixed width option and click Next.
Here you can manually add break lines to separate your data into different
columns.

252 Advance Spreadsheet Tools


4. Click in the Data preview area where you want to place a break line.
A line appears, showing you where the data will be separated.
5. Add additional break lines as desired, then click Next.
Next you can select a format for each column of data.
6. Select a column in the Data preview area and then select a format option for
that column in the Column data format area. Repeat for additional columns.
7. Click Finish.
Tip: A message may appear, asking if you want to replace the contents
of the destination cells. If so, click OK.
The data is split into different columns.

GROUPING AND OUTLINING DATA

Many spreadsheets are created in a hierarchical EXERCISE NOTES


style. For example, a worksheet might contain Exercise File: MonthlySales11-8.xlsx
a column for each month, followed by a Exercise: Manually group rows 3
total column. By outlining your worksheets, through 6 and practice hiding and
you make them easier to understand and displaying details.
read. Instead of sifting through irrelevant Then remove the grouping.
information, you can collapse an outline to Use the Auto Outline feature (Excel
should outline columns E to G). Clear
display each group’s bottom line.
the outline.
There are several ways to outline a
workbook:
›› Using the Auto Outline Feature: The Auto Outline command automatically
outlines a selected range of cells or the entire worksheet, based on formulas
and the direction of references.
›› Grouping Data: You can group rows and columns manually by selecting
them.
›› Using the Subtotals Feature: The Subtotals command calculates subtotal
values for the labeled columns you select. Excel automatically inserts and
labels the total rows and outlines the list.
›› Using the Consolidate Feature: You can consolidate several sheets using
the Consolidate feature.
This lesson explains how to use the Auto Outline feature and how to group data
manually.

Advance Spreadsheet Tools 253


Group rows or Columns Manually
1. Select the column or row data you want to group.
2. Click the Data tab on the Ribbon and click the
Group button in the Outline group.


The Group dialog box
appears. Here you need to
select whether you want to
group rows or columns.
3. Select the Rows or Columns
option and click OK. The
selected rows or columns are
grouped together.
Hide or Show Detail
Once you’ve grouped or outlined
data, you can collapse or expand
the group detail.
1. Click the Data tab on the
Ribbon and click the Hide
Detail or Show Detail button
Fig. 11.17. An example of grouped rows.
in the Outline group.
Other Ways to Hide or Show Detail: Click the outline symbols next to

or above the worksheet. These include the Row Level and Column Level
buttons and the plus and minus button.
Ungroup rows or Columns
1. Select the grouped row or column data.
2. Click the Data tab on the Ribbon and click the Ungroup button in the Outline
group.
Outline Data Automatically
If your data contains detailed rows or columns that are summed or subtotaled,
Excel can automatically group the data into outline form.
Tip: Excel will only outline numerical data that is related by a sum or
subtotal formula. It cannot outline text data or numerical data that is
not totaled by a formula.

254 Advance Spreadsheet Tools


1. Make sure your data has column labels and contains formulas that summarize
the data.
The sum and subtotal
functions are commonly
used to summarize rows or
columns.
Tip: Summary rows
and columns should
be below and to the
right of the data,
respectively. If they
are above or to the Fig. 11.18. An example of spreadsheet after using the
Auto Outline command.
left, click the Outline
Dialog Box Launcher in the Outline group.
Remove the checkmark from the Summary rows below detail or
Summary columns to right of detail check box.
2. Select a cell in the data range you want to outline.
3. Click the Data tab on the Ribbon, click the Group button list arrow in the
Outline group, and select Auto Outline.
The data is automatically outlined so that you can collapse the detailed rows
or columns and view only the totals or subtotals.
Remove an Outline
1. Click the Data tab on the Ribbon, click the Ungroup button list arrow in the
Outline group, and select Clear Outline.
The outline is cleared from the worksheet.

Fig. 11.19. The Settings dialog box.

Advance Spreadsheet Tools 255


USING SUBTOTALS

A quick and easy way to group and summarize EXERCISE NOTES


data is to use Excel’s Subtotals feature. Usually Exercise File: MonthlySales11-9.xlsx
you create subtotals with the SUM function, but Exercise: Subtotal the data at each
you can also create subtotals using functions change in Position using the SUM
function and subtotal the Sales and
such as COUNT, AVERAGE, MAX, and MIN.
Commission columns.
The Subtotals feature also outlines the data,
Click the 2 Column Level Symbol
allowing you to display and hide the detail button to hide details, then click the
rows for each subtotal. 3 Column Level Symbol button to
display them again.
Create subtotals
Remove the subtotals.
1. Make sure your data is arranged into
labeled columns, that the data in each
column is of the same type, and that
you’ve sorted the data based on the
column you want to group the subtotals
by.
Now you’re ready to subtotal your
data.
Tip: Excel’s Subtotals feature
subtotals your data by
automatically inserting the
SUBTOTAL function.
2. Select a cell in the data range.
3. Click the Data tab on the Ribbon
and click the Subtotal button in the
Outline group. The Subtotal dialog box
appears. Fig. 11.20. The Subtotal dialog box.

4. Click the At each change in list arrow and select the column you want to
subtotal.
This command specifies what it is that you want to subtotal. For example, if
you have a list of customers, the products they bought, and the amounts of
the sales, and you want to subtotal the list by the type of product, you would
select the column that contains the products.

256 Advance Spreadsheet Tools


5. Click the Use function list arrow and select the function you want to use to
calculate the subtotals.
For example, you could select Sum, Count, Average, or Max.
6. In the “Add subtotal to” box, click the check box next to each column that has
values you want to subtotal.
7. Click OK.
The data is organized with subtotals.
Tips
• To hide or show subtotals detail, click the Hide Detail and Show
Detail buttons in the Outline group on the Ribbon or use the outline
symbols next to the worksheet to hide or display individual subtotals.
• To add more subtotals, repeat the steps but uncheck the Replace
current subtotals check box so you don’t overwrite the existing
subtotals.
Remove subtotals
1. Click the Data tab on the Ribbon and click the Subtotal button in the Outline
group. The Subtotal dialog box appears.
2. Click the Remove All button.

The subtotals are removed.

Fig. 11.21. Subtotals of sales and commissions calculated at each change in position. In other words,
the subtotal of each position appears in the list, with the grand total appearing at the bottom.

Advance Spreadsheet Tools 257


CONSOLIDATING DATA BY POSITION OR CATEGORY

Excel can automatically summarize or EXERCISE NOTES


consolidate information from multiple Exercise File: MonthlySales11-10.xlsx
worksheets into a single master worksheet Exercise: Add a new worksheet
using the Consolidate feature. For example, to the workbook. Consolidate the
if you have sales data from three different data in E1:E6 (the Sales totals) from
offices on three different worksheets, Excel worksheets Jan, Feb, and Mar into the
new worksheet.
can total them for you on another worksheet.
Copy the Sales label to the
Excel can consolidate information in three consolidated worksheet.
different ways: by position, by category, or by
using formulas. This lesson describes the first
two ways:
›› Consolidate by position: Used when data in all the worksheets is arranged
in exactly the same order and location.
›› Consolidate by category: Used when the worksheets have the same row and
column labels, but the rows and columns aren’t arranged in the same order
on all the worksheets. Excel
uses the labels to match the
data.
Tip: Make sure the
label spelling and
capitalization are
identical on each of the
worksheets you want to
consolidate by category.
Consolidate by position or category
Before you begin consolidating by
position or category, make sure the
data is arranged in labeled rows
and columns without blank rows
or columns. Each of the ranges you
want to consolidate needs to be on
a separate worksheet, with a blank Fig. 11.22. Consolidating sales data from three
worksheet for the consolidation’s different worksheets.
destination.
258 Advance Spreadsheet Tools
When consolidating, you don’t actually specify whether you are consolidating
by position or category—Excel knows how to consolidate based on the data
range you select and whether or not the consolidating worksheets are arranged
identically.
1. On the worksheet where you want to put the consolidated data, click the
upper-left cell in the area where you want to put the consolidated data.
2. Click the Data tab on the Ribbon and click the Consolidate button in the
Data Tools group. The Consolidate dialog box appears.
3. Click the Function list arrow and select the function you want to use to
consolidate the data.
Consolidation functions include Sum, Count or Average.
4. Click the Reference text box. Then click the first worksheet tab you want to
consolidate and select the range you want to consolidate.
Tip: If source data is in a different workbook, click Browse to locate the
file and click OK.
5. Click the Add button.
6. Repeat steps 4 and 5 to
select the ranges on any
other worksheets.
Tip: If you’re
consolidating from
multiple workbooks
and you want the
consolidation to
update automatically
whenever the source
data changes, click
the Create links to
source data check
Fig. 11.23. The Consolidate dialog box.
box to select it.
7. To copy labels to the consolidated worksheet, click the Top row and Left
column options.
This tells Excel where the labels are located in the source ranges.
8. Once you’re ready to consolidate, click OK.

Advance Spreadsheet Tools 259


The values from the selected ranges are combined on the consolidation
worksheet using the function you selected.
Tip: If you choose to copy labels onto the consolidation worksheet,
any labels that don’t appear in all of the source ranges will appear in
separate rows or columns on the consolidation worksheet, along with
their corresponding data cells.

CONSOLIDATING DATA USING FORMULAS

Consolidating with formulas is the most


EXERCISE NOTES
versatile and powerful way to consolidate
Exercise File: MonthlySales11-11.xlsx
data from multiple worksheets into a single
Exercise: Find the total commissions
worksheet because there is no prescribed paid to managers in the first quarter
format for the data that is consolidated. of the year. Copy the Commission
The cells you reference don’t need to be in label from the Jan worksheet to cell
the same position on each sheet, or even have C1 of the Sheet2 worksheet.
the same labels, to be consolidated using this In cell C2 on Sheet2, enter =SUM(
method. Then select cells G3:G4 on the Jan
sheet, type a comma, select G3:G4 on
1. Copy any column or row labels you the Feb tab, type a comma, and select
want to use from the source worksheets G3:G4 on the Mar tab. Press Enter.
to the consolidation worksheet, then The total 19,650 appears in cell C2 on
paste the labels where you want to see Sheet2.
consolidated data.
2. Enter a formula that references the source cells in each worksheet that you
want to consolidate.
For example, you could combine three different cells on three different
worksheets by typing =SUM(Sheet2!A6,Sheet3!B7,Sheet4!D2). Or,
to reference the same cell on different worksheets, you could enter
=SUM(Sheet2:Sheet4!A6).
Tips
• Instead of typing each cell reference, you can type the first part of
the formula, for example =SUM(, and then click the cells you want to
include.
• Enter a comma between cell selections from different worksheets.
• The consolidation will automatically update when the source cell
ranges are changed.

260 Advance Spreadsheet Tools


Fig. 11.24. Consolidating data using a formula.

Analyzing Data Review


QUESTIONS
1. To make sure you don’t lose the original values for the changing cells, you should use
the original cell values in the first scenario you create. (True or False?)
2. The result cells you specify in the Scenario Summary dialog box are .
(a) the total row of your scenarios
(b) qthe data labels used in your scenarios
(c) the cells that you change in the scenarios
(d) the cells that are affected by the changing cells in the scenarios
3. You can create either a one- or a two-input data table. (True or False?)
4. Use Goal Seek when .
(a) you don’t know the result of a formula, but you know the formula input values
(b) you know the desired result of a formula, but not the input value the formula needs
to arrive at the result
(c) you want to quickly create scenarios
(d) you know the result of one formula, but not the result of another formula that
references that formula
5. Solver is an optional Excel Add-In feature. (True or False?)
6. Which of the following is NOT a delimiter that Excel can use to split cell data?

Advance Spreadsheet Tools 261


(a) Space (b) Semicolon
(c) Comma (d) All of these are common delimiters
7. You can group rows and columns manually by selecting them. (True or False?)
8. You should sort data before you group and summarize its information using
the Subtotals command. (True or False?)
9. You can consolidate by____________when the data in all the worksheets is arranged in
exactly the same order and location.
(a) position (b) category
(c) absolute reference (d) column
10. The cells you reference don’t need to be in the same position on each sheet, or even
have the same labels, to be consolidated using formulas. (True or False?)

ANSWERS
1. True. To make sure you don’t lose the original values for the changing cells, you should
use the original cell values in the first scenario you create.
2. D. The result cells you specify in the Scenario Summary dialog box are the
cells that are affected by the changing cells in the scenarios.
3. True. You can create either a one- or a two-input data table
4. B. Use Goal Seek when you know the desired result of a formula, but not the
input value the formula needs to arrive at the result.
5. True. Solver is an optional Excel Add-In feature.
6. D. All of these are common delimiters that Excel can use to split cell data.
7. True. You can group rows and columns manually by selecting them.
8. True. Always sort data before using the Subtotals command.
9. A. You can consolidate by position when the data in all the worksheets is
arranged in exactly the same order and location.
10. True. The cells you reference don’t need to be in the same position on each
sheet, or even have the same labels, to be consolidated using formulas.

262 Advance Spreadsheet Tools


Working with 12
Chap
ter
Tables
Excel’s Internet features let you add hyperlinks to your workbooks to link them to
EXERCISE NOTES
another workbook, a file created in another program, or even a Web page. You can
Exercise File: TradeShow12-1.xlsx,
also connect to data sources through the Web, or Mileage.xlsx
to other databases.
Exercise: Open the TradeShow12-1.
INSERTING A HYPERLINK
xlsx workbook. Type “Mileage Report”
In this lesson, you will learn how to use in cell A10. Select cell A10 and insert
a hyperlink to the Mileage file in your
hyperlinks in Excel. A hyperlink is text or an
Practice folder.
image that points to a file, a specific location
Click the hyperlink you just created to
in a file, or a Web page on your computer, on open the Mileage.xlsx file.
a network, or on the Internet. Whenever you
click on a hyperlink, you jump to the hyperlink’s destination (if it’s available).
A hyperlink is usually indicated by colored and underlined text. On the Internet,
hyperlinks are used all the time to move between different Web pages.
1. Select the cell you
want to use for
the hyperlink and
enter the text or
image you want to
hyperlink.
2. Click the Insert tab
on the Ribbon, and
click the Hyperlink
button in the Links Fig. 12.1. The Insert Hyperlink dialog box.
group.
Other Ways to Insert a Hyperlink: Select the text and press <Ctrl> + <K>.

Or, right- click the cell and select Hyperlink from the contextual menu.
The Insert Hyperlink dialog box appears. There are four different types of
Hyperlink destinations you can create:

Advance Spreadsheet Tools 263


›› Existing File or Web Page: Creates a link that takes you to another Excel
workbook or to a file created in another program, such as a Microsoft
Word document, or to a Web page on the Internet.
›› Place in This Document: Takes you to a bookmark in the same
document.
›› Create New Document: Creates a new Excel workbook and inserts
hyperlinked text into your existing workbook that connects to the new
one.
›› E-mail Address: Creates a clickable e-mail address.

Fig. 12.2. Click hyperlinked text to display the linked file or Web page.

3. Either browse to or enter the hyperlink’s destination and click OK.


The hyperlink is created. Now whenever you click the hyperlink, Excel will
take you to the hyperlink’s destination file or the location that you specified.
Tips
• To edit an existing hyperlink, right-click the hyperlink and select
Edit Hyperlink from the contextual menu.
• To remove a hyperlink, right-click the hyperlink and select Remove
Hyperlink from the contextual menu.
264 Advance Spreadsheet Tools
IMPORTING DATA FROM AN ACCESS DATABASE OR TEXT FILE

Excel can connect to external data sources EXERCISE NOTES


including other files, databases or Web pages.
Exercise File: Board of Directors
In order to work with data from an external Meeting.txt
source, you need to create a data connection Exercise: Create a new workbook
in Excel. and import the Board of Directors
Meeting.txt file data into it. In the
Import Data from an Access Database
Text Import Wizard, leave the default
1. Click the Data tab on the Ribbon and options selected. Save the new
click the From Access button in the Get workbook as April.xlsx.
External Data group.
The Select Data Source
dialog box appears. By
default, it searches for data
sources available on your
computer and displays them
in the dialog box.
 Trap: If the Get External
Data group does not
appear on the Ribbon,
click the Get External
Data button and select
an option from the list. Fig. 12.3. The Select Data Source dialog box.

2. Browse to and select the database file that contains the data you want to
import. Click the Open button.
The Select Table dialog box appears.
Here you need to select which
table you want to import from the
database.
Tip: If the Select Table dialog
box does not appear, there is
only one table in the database,
and it is automatically selected.
3. Select a table and click OK.
Fig. 12.4. Select how you want to import the data into
The Import Data dialog box appears. the workbook in the Import Data dialog box

Advance Spreadsheet Tools 265


Here you tell Excel how you want the data displayed in your workbook—as
a table, PivotTable, etc.—as well as where you want to put the data—in the
existing worksheet or in a new one.
4. Select an option for how you want to view the data and then select an option
for where you want to put
it. Click OK.
Tip: If you select to
put the data in your
existing worksheet,
also select the cell
where you want to put
it.
Fig. 12.5. The Access database data imported into a table in Excel.
The data is imported from
the Access database into your workbook.
Tip: If, while connecting to external data, you see a security notice
telling you that you are connecting to an external source that may not
be safe, click OK.
Import Data from a Text File
You can also import data from text files with .txt and .csv extensions.
1. Click the Data tab on
the Ribbon and click the
From Text button in the
Get External Data group.
The Import Text File
dialog box appears.
 Trap: If the Get
External Data group
does not appear on
the Ribbon, click the
Get External Data
button and select an Step 1: Select the file type that describes the
option from the list. data you want to import from the text file.
2. Browse to and select the text file that contains the data you want to import.
Click the Import button.

266 Advance Spreadsheet Tools


Step 1 of the Text Import Wizard appears. Here you need to select whether
the file is delimited or fixed width. You also need to select the row of text
from which you want to
start importing data.
3. Select a file type and enter
the row at which you
want to start importing.
Click Next.
Step 2 of the Text Import
Wizard appears. Specify
the delimiters used to
separate the data in the
text file.
4. Select delimiters or
specify fixed width Step 2: Set the delimiter used to separate data in the text
file. A preview is shown of how the data looks with the
column breaks. Click selected delimiter.
Next.
Step 3 of the Text Import
Wizard appears. Select a
column and choose the
format you want to use
for its data.
You can also select “Do
not import column
(skip)” and the column
will not be included in
the Excel workbook.
5. Specify a format for
each column, or skip the
column. Click Finish. Step 3: Select a column and choose the format you want to
use for the data. Or, select the option to skip the column.
The Wizard closes and Fig. 12.6. Importing data with the Text Import Wizard.
the Import Data dialog
box appears, asking you where you want to import the data in the workbook.
6. Select where you want to put the imported data. Click OK.
The data from the text file appears in the workbook.

Advance Spreadsheet Tools 267


Step 3: Select a column and choose the format you want to use
for the data. Or, select the option to skip the column
Fig. 12.6. imported from a text file.

IMPORTING DATA FROM THE WEB AND OTHER SOURCES


Instead of copying and pasting data into a EXERCISE NOTES
worksheet from a Web page—which normally Exercise File: None required.
causes no end of formatting problems—you Exercise: Create a new workbook
can import data from a growing number of and import data from http://
moneycentral.msn.com.
Web sites. You can also get data from a variety
Close the workbook without saving.
of sources such as a SQL server.
Tip: Some data sources
may require special
security access, and the
connection process can
often be very complex.
Enlist the help of your
organization’s technical
support staff to assist you.
Import data from the Web
1. Click the Data tab on the
Ribbon and click the From
Web button in the Get External
Data group.
Fig. 12.8. The New Web Query Window.
The New Web Query window
opens, displaying the Internet Explorer Home page.
 Trap: If the Get External Data group does not appear on the Ribbon,
click the Get External Data button and select an option from the list.
268 Advance Spreadsheet Tools
2. Enter the address of the Web site you want to visit in the Address box and
click Go.
If the Web site is set up for you to export data, you’ll see table selection
arrows next to the pieces of data.
3. Click the table selection arrows next to the data you want to import, then
click Import.
Tip: When you click a yellow table selection arrow, it turns into a green
checkmark.
The Import Data dialog box appears. Here you can specify where you want
to put the data.
4. Select an option for where you want to put the data. Click OK.
The Web data appears in the workbook.
Import Data from other Sources
1. Click the Data tab on the Ribbon. Click the From Other Sources button in
the Get External Data group.
 Trap: If the Get External Data group does not appear on the Ribbon,
click the Get External Data button and select an option from the list.
Several data source options appear.
2. Select a data source, then follow the onscreen instructions or instructions
from your organization’s technical support staff to complete the connection.

WORKING WITH EXISTING DATA CONNECTIONS

Besides allowing you to add EXERCISE NOTES


connections, Excel has tools to Exercise File: April.xlsx
help you view and manage the data Exercise: Click cell outside the A1:D6 data range and
connections that are accessible in view the existing connections from which you can get
your workbook, on your computer, external data. Close the dialog box.
or on your network. Click a cell within the A1:D6 data range and click the
Connections button in the Connections group. Click
Access Existing Connections “Click here to see where the selected connections
If you have added connections that are used” in the Workbook Connections dialog box.
Close the dialog box.
you want to display, or if you want
Click the Properties button in the Connections
to open a connection that Excel has
group to view the properties for the external data
built in for you, you can use the range. Close the dialog box.
Existing Connections dialog box.
Advance Spreadsheet Tools 269
1. Click the Data tab on the Ribbon and click the Existing Connections button
in the Get External Data group.
 Trap: If the Get External Data group does not appear on the Ribbon,
click the Get External Data button and select an option from the list.
The Existing Connections dialog box appears. Here you can see the connections
in the open workbook,
on your network, or on
your computer. Excel has
automatically included a
few Web site connections
in the “on your computer”
section.
2. Select the connection you
want to display and click
the Open button.
The Import Data dialog box
appears.
3. Select how and where you
want to display the data in
your workbook and click
OK. Fig. 12.9. The Existing Connections dialog box.

The data appears in your workbook.


Manage connections
You can see the connections that
are present in your workbook
and change their properties
using the commands in the
Connections group.
1. Click the Data tab on the
Ribbon.
The Connections group
offers several options
for working with your
workbook’s connections: Fig. 12.10. The Workbook Connections dialog box.

270 Advance Spreadsheet Tools


›› Connections button: Display the Workbook Connections dialog box
where you can see the connections and locations of connections in your
workbook. Here you can add, remove, refresh, or adjust the properties of
the connections.
›› Properties button: Change the connection properties of the imported
data currently selected
in your worksheet.
Properties include the
name of the connection,
formatting and layout,
and refresh options. Refer
to the table below, Data
Range Properties, for
more information about
properties.
›› Refresh All button:
Updates workbook data
to match the external
data source.
›› Edit Links: Shows the
other files the workbook
is connected to so you can
edit or remove the links.
2. Click a button in the
Connections group and
Fig. 12.11. The External Data Range Properties dialog box.
work with the connection as
necessary.
Tip: When working with workbooks that have data connections, a
Security Warning banner may appear below the Ribbon telling you
that connections have been disabled. Click the Options button, select
Enable this content, and click OK.

Advance Spreadsheet Tools 271


Table 12.1: Data Range Properties
Save query Check this option so your worksheet remembers where to go
definition when it refreshes the data. Uncheck it so the data source cannot
be refreshed again.

Save password Check this option so that Excel automatically enters the
password when the data source is refreshed.

Enable background Check this option so that when you refresh the data source
refresh you can continue working in Microsoft Excel. Otherwise, you
must wait until Excel is completely finished refreshing the data
source to work with the program.

Refresh every Check this option to refresh the data source at specific intervals,
and then enter the number of minutes you want between
refreshes in the minutes box.

Refresh data on file Check this option so that the data source automatically refreshes
open when you open the workbook. The Save query definition check
box must be selected to refresh the data.

Remove external Check this option so that Excel deletes the data source
data from information when you save the worksheet.
worksheet before
saving
Include field names Check this option so that Excel automatically inserts the data
source’s field names as column labels for the data source.

Preserve column Check this option to preserve any sort order, filtering or column
sort/filter/layout order changes you make in a data source when it is refreshed.

Include row Check this option to allow the data source to use its own row
numbers numbering.

Preserve cell Check this option to retain cell formatting that you apply in
formatting Microsoft Excel when you refresh the data source.

Adjust column width Check this option so that Excel automatically adjusts its column
width to display the imported data source information.

Fill down formulas Check this option if you want Excel to copy formulas in a data
in columns adjacent source to new columns when it is refreshed.
to data

272 Advance Spreadsheet Tools


Working with the Web and External Data Review
QUESTIONS
1. A hyperlink is text or an image that points to a file, a specific location in a file, or a Web page
on your computer, on a network, or on the Internet. (True or False?)
2. To import data into Excel, use the buttons in the__________group on the Data
tab on the Ribbon.
(a) Connect to External Data (b) Get External Data
(c) Import Data (d) Import Files
3. When you click a yellow table selection arrow on a Web page, it turns into a green
checkmarked box. (True or False?)
4. Which of the following is NOT a button in the Connections group on the Data tab on the
Ribbon.
(a) Hyperlink (b) Refresh All
(c) Properties (d) Connections

ANSWERS
1. True. A hyperlink is text or an image that points to a file, a specific location in a file, or a Web
page on your computer, on a network, or on the Internet.
2. B. To import data into Excel, use the buttons in the Get External Data group on the Data
tab on the Ribbon.
3. True. When you click a yellow table selection arrow on a Web page, it turns into a green
checkmarked box.
4. A. Hyperlink is not a button in the Connections group.

Advance Spreadsheet Tools 273


Working with 13
Chap
ter
Macros
If you find yourself performing the sametask over and over again, you might want
to consider creating a macro to complete the task for you. A macro helps you
perform routine tasks by automating them. Instead of manually performing a
series of time-consuming, repetitive actions, you can record a single macro that
does the entire task all at once for you.
This entire chapter is devoted to macros.We start with the basics: learning how to
record and play a macro. Then you’ll move into some more advanced topics including
how to write and edit macros using the Visual Basic programming language.
Using Exercise Files
This chapter suggests exercises to practicethe topic of each lesson. There are two
ways you may follow along with the exercise files:
›› Open the exercise file for a lesson, perform the lesson exercise, and closethe
exercise file.
›› Open the exercise file for a lesson, perform the lesson exercise, and keep the
file open to perform the remaininglesson exercises for the chapter.
The exercises are written so that you may “build upon them”, meaning the exercisesin a
chapter can be performed in succession from the first lesson to the last.

RECORDING A MACRO

A macro is a series of Excel EXERCISE NOTES


commands and instructions Exercise File: WeeklySales13-1.xlsx
that are recorded so that Exercise: Create a macro that inserts the current date with Bold
they can be executed as a and Center Alignment formatting:
Click cell B3. Open the Record Macro dialog box and name the
single command. Instead new macro “DateStamp”. Assign the macro the shortcut
of manually performing a <Ctrl> + <d>, make sure This Workbook is selected, and enter
series of time-consuming, the description “This macro inserts the current date”. Click OK.
repetitive actions in Excel To record the macro, type =Today() and click the Enter button
on the Formula Bar. Make sure cell B3 is selected, copy it, and
yourself, you can create a use the Paste Special command to paste values only in cell B3.
macro to perform the task Apply bold and center formatting. Stop recording the macro.
for you. Save the workbook as a macro-enabled file type (.xlsm).

274 Advance Spreadsheet Tools


There are two ways to create a macro: by recording themor by writing them in
Excel’s Visual Basic programming language. This lesson explains the easy way to
create a macro—by recording the task(s) you want the macro to execute for you.
When you record a macro, imagine you’re being videotaped; everything is
recorded—all your commands, the data you enter, even any mistakes you make.
Before recording a macro, it’s helpful to write down a script that contains all the
steps you want the macro to record.
Practice or rehearse your script a couple times, to make sure it works, before
you actually record it. If you do make a mistake while recording a macro, don’t
worry— you can always delete the existing macro and try again oredit the macro’s
Visual Basic source code to fix the mistake.
1. Click the View tab on the
Ribbon and click the Macros
button list arrow in the Macros
group. SelectRecord Macro.
The Record Macro dialog box
appears.
Tip: If you click the
Macros button list arrow
and select Use Relative
References, actions are
recorded relative to the
initially selected cell.
Fig. 13.1. The Record Macro dialog box.
2. Enter a name for the macro and
press <Tab>.
Next you can enter a shortcut key that will allow you to run the macro by
pressing the <Ctrl> + <shortcut key>.
3. Enter a shortcut key, if desired.
Now you can tell Excel where to store the macro.You have three choices:
›› Personal Macro Workbook: If you want a macro to be available
whenever you use Microsoft Excel, store the macro in your Personal
Macro Workbook.
›› New Workbook: Stores the macro in a newworkbook.
›› This Workbook: Stores the macro in the active orcurrent workbook.

Advance Spreadsheet Tools 275


4. Click the Store macro in list arrow and select where you want to store the
macro.
5. Click in the Description box
and enter a descriptionfor
the macro, if desired.
6. Click OK.
Now comes the important
part—recording the
macro.
7. Record the macro: perform
the actions you want to
include in your macro.
Once all the actions have
been recorded, stop Fig. 13.2. The Stop Recording button in the status bar indicates all
your actions are being recorded in the macro. Click the Stop Recording
recording. button to stop recording the macro.
8. Click the Macros button list arrow in the Macros group and select Stop
Recording.
The macro is recorded and ready to use.
Other Ways to Stop Recording: Click the Stop Recording button on the

statusbar.
9. Save the workbook.
Click No to save the
file as a macro-enabled
workbook.
The Save As dialog box Fig. 13.3. This dialog box appears to warn you that macros must be
appears. saved in a different file type.

10. Click the Save as type list arrow and select ExcelMacro-Enabled Workbook
(.xlsm) from the list.Click Save.
The workbook is saved, and the macros will be available next time the
workbook is opened.

276 Advance Spreadsheet Tools


PLAYING AND DELETING A MACRO

Once you’ve recorded a macro, you’re ready to EXERCISE NOTES


view andplay it.
Exercise File: WeeklySales13-2.xlsm
Tip: If you see a Security Warning Exercise: Run the DateStamp macro
message beneath the Ribbon telling so that the current date appears in
you that macros have been disabled, cell C3.
click the Enable Content button.
Play a macro
1. Click the View tab on the Ribbon
and click the Macros button
list arrow in the Macros group.
SelectView Macros.
The Macro dialog box appears.
Here you can see themacros that
you have recorded.
2. Select the macro you want to
run and click the Run button.
The macro runs, performing the
steps you recorded.
Delete a macro Fig. 13.4. Macros are usually disabled when the file is opened,
even if the file is saved to be macro-enabled.
1. Click the View tab on
the Ribbon and click the
Macros button list arrow
in the Macros group.
SelectView Macros.
The Macro dialog box
appears.
2. Select the macro you
want to delete and click
the Delete button.
3. Click Yes.
The macro is deleted.

Fig. 13.5. Playing a macro in the Macro dialog box

Advance Spreadsheet Tools 277


ADDING A MACRO TO THE QUICKACCESS TOOLBAR

To make macros fast and easy to access, you EXERCISE NOTES


can add them as buttons on the Quick Access
Exercise File: WeeklySales13-3.xlsm
Toolbar.
Exercise: Add the DateStamp macro
Tip: It may seem obvious, but you to the Quick Access Toolbar, selecting
must create a macro before you can the green triangle symbol to represent
add it to the Quick Access Toolbar. the macro on the Toolbar.
Then remove the DateStamp macro
1. Click the Customize Quick Access from the Quick Access Toolbar.
Toolbar button next to the Quick Access
Toolbar and select More Commands.
The Quick Access Toolbar tab of the
Excel Optionsdialog box appears.
2. Click the Choose commands from list
Fig. 13.6. The Quick Access Toolbar with a macro
arrow andselect Macros. button added

A list of your macros appears.


3. Select the macro you
want to add to the Quick
AccessToolbar and click
the Add button.
The macro now appears
in the list on the right
side of the dialog box.
At this point, you can
select a symbol to
represent your macro
on the toolbar.
4. Click the Modify button.
The Modify Button
dialog box appears,
Fig. 13.7. Adding the DateStamp macro button to the Quick Access Toolbar.
displaying dozens of
symbols to choose from.
5. Select a symbol.
You can also modify the display name that willappear when you hover over
the button on the toolbar.

278 Advance Spreadsheet Tools


6. (Optional) Enter a different name for the button in theDisplay name box.
7. Click OK to close the Modify Button
dialog box.
Click OK to close the Excel Options
dialog box.
The macro appears as a button on the
Quick Access Toolbar. Now you can
click it to run the macro.
8. Click the macro button on the Quick
Access Toolbar.
Tip: To remove a macro from the
Quick Access Toolbar, right-click
the button and select Remove
Fig. 13.8. Selecting a button symbol in the Modify
from QuickAccess Toolbar. Button dialog box.

EDITING A MACRO’S VISUAL BASICCODE

This lesson introduces you to the Visual EXERCISE NOTES


Basic (also called VB or VBA) programming Exercise File: WeeklySales13-4.xlsm
language—the code Excel uses to record Exercise: Open the DateStamp macro
macros. Using the Visual Basic language in editing mode. Edit the code so that
and the Visual Basic editor you can make the date is horizontally aligned to the
left instead of on center.
minor changes to your macros once you have
Run the macro in cell D3 to see that
recorded them.
the macro enters the date so it is
The best way to learn about Visual Basic is aligned to the left side of the cell.
to view existing code. In this lesson we’ll look
at how to view andedit the code for an existing
macro.
1. Click the View tab on the Ribbon and click the Macros button list arrow in
the Macros group. SelectView Macros.
The Macro dialog box appears. Here you can see the macros that you have
recorded.
2. Select the macro you want to edit and click the Edit button.
The Microsoft Visual Basic Editor program appears. Those funny-looking
words are Visual Basic—the language that was used by Excel to record the
macroyou created.
Advance Spreadsheet Tools 279
You don’t have to learn Visual Basic to be proficient at Excel, but knowing the
basics can be helpful if youever want to modify an existing macro. If you take a
close look at the code for
your macro, some of the
procedures should make a
little sense to you. For
example, if your macro
contains a copy or paste
command, you may see
the text “Selection.Copy”
or “Selection.Paste”.
You can delete sections
of code to delete certain
actions from the macro,
or edit the code to change
themacro’s actions.
3. Edit the macro’s code as
desired, then click the Fig. 13.9. Editing a macro’s code using the Microsoft Visual Basic Editor.

Save button on the Standard toolbar.


4. Click the Close button in the upper right-hand corner.
The Visual Basic Editor window closes.
Edit code by finding the property you want to change, and changing its code.
For example,this property controls if the text is aligned to the Left, Center, or Right
side of the cell.
INSERTING COPIED CODE IN AMACRO

Unless you’re a pro- EXERCISE NOTES


Exercise File: ExpenseReport13-5.xlsm
grammer, it’s unlikely that
you will ever learn many Exercise: The object of the exercise is to copy the code that inserts
today’s date from the DateStamp macro into the ExpenseFillin macro.
of Visual Basic’s hundreds
First, open the ExpenseReport13-5 workbook, display the
of functions, statements,Developer tab and enable macros.
and expressions—and Open the DateStamp macro and copy the block of code starting at
the line ActiveCell.FormulaR1C1 = “=TODAY()” and ending at the
that’s okay. line Selection.PasteSpecial Paste:=xlPasteValues.
A very useful techni- Paste this code into the ExpenseFillin macro under the line
que you can use to edit Range(“C5”).Select
Save the changes to the ExpenseFillin macro. Run the ExpenseFillin
and create macros macro in cell A5.

280 Advance Spreadsheet Tools


is to insert code that has been copied, or plagiarized, from another macro. This
technique lets you add steps to your existing macros by recording the steps you
want to add in new macros, copying the appropriatecode and inserting it into the
existing macro.
Display the Developer tab and enablemacros
Before copying code, we’ll display the Developer tab andenable macros by turning
off macro security.
1. Open any workbook, click the File tab on the Ribbonand select Options.
The Excel Options window appears.
2. Click the Customize Ribbon tab. Click Developercheck box in the Customize
the Ribbon column. Click OK.
Next, enable all macros.
3. Click the Developer tab on the Ribbon and click the Macro Security button
in the Code group.
The Trust Center window appears, displaying theMacro Settings.
4. Select the Enable all macros… option and click OK.
Tip: For security
purposes, once you’re
done working with
macros you’ll want to
disable them again in the
Trust Center.
Other Ways to Enable Macros

for a Single Workbook: When
a file that uses macros is open,
click the Enable macros button
in the Security Warning bar. Fig. 13.10. You can enable macros in the Trust Center so that macros
are never blocked. Only do this if you are sure that
Insert code in a macro files that you open that have macros are safe.

1. Open the workbooks containing the macros you wantto work with.
This includes both the workbook with the macro to be copied from and the
workbook with the macro tobe pasted into.
2. Click the View tab on the Ribbon and click the Macros button in the Macros
group. Select the macrothat contains the code you want to copy and click the
Edit button.
Advance Spreadsheet Tools 281
The Visual Basic Editor window opens. In the Projectpane on the left side of
the window you’ll see the macros associated with all the workbooks that are
open.
3. In the Project pane on the left
side of the window, click the
expand button to expand the
source workbook’s project
until you see the Modules
folder. Expand this folder and
double-click the module that
contains the code you want to
copy.
The code for the selected
module, or macro, appears in
the window to the right.
Fig. 13.11. The Macro dialog box.
Tip: A module is just like
a folder where Excelputs the code each time you record a macro.
4. Scroll through the code until you see the code you want to copy, then select
the code and click the Copybutton on the Standard toolbar.
The code is copied.
Now open the macro in
which you want to paste the
copied code.
5. In the Project pane along the
left side of the window,open
the module in which you
want to paste the copied
code.
The code for the selected
module, or macro, is
displayed in the window.
Tip: If the macros
you want to copy and
paste between are in Fig. 13.12. An example of copying code from one macro into another.
The macros for the open workbook are displayed on the
the same workbook, same screen. A line separates the macros.

282 Advance Spreadsheet Tools


they appear in the code part of the window together. They are simply
separated by a line.
6. Click where you want to paste the code and click the Paste button on the
Standard toolbar.
The copied code is inserted into the macro.
7. Click the Save button on the Standard toolbar, then click the Visual Basic
Editor window’s Close button.
The Visual Basic Editor window closes. The macro with the newly inserted
code is now ready to be run.

DECLARING VARIABLES AND ADDING REMARKS TO VBA CODE

You’ve probably heard that programming is a


lot like algebra. In algebra you use variables, EXERCISE NOTES
like r in the equation r2. Programming uses Exercise File: ExpenseReport13-6.
variables too. You should always declare xlsm
any variables when you use them in code. Exercise: Open the ExpenseFillin
macro in the Visual Basic Editor.
Declaring a variable is like telling Excel “I’m
Enter the following DIM and REM
going to be using a variable named r in my statements at the top of the macro’s
code.” code:
This lesson explains how to declare Dim EmployeeName As String
variables and how to add remarks—or ‘Declares the EmployeeName variable
declare variables—in your code. as a text string
Dim EmployeeNo as Long
Declare a variable (DIM statement)
‘Declares the EmployeeNo variable as
In Visual Basic, you use the DIM statement an integer
to declare variables, using the syntax DIM
variablename As datatype.
1. Open the workbook that contains the macro
with thecode you want to change.
2. Click the View tab on the Ribbon and click the
Fig. 13.13. The syntax of a DIM statement.
Macros button in the Macros group.
The Macros dialog box appears.
3. Select the macro that contains the code you want towork on and click Edit.
The macro opens in the VBA window.

Advance Spreadsheet Tools 283


4. Click where you want to add the statement in the code. Add a Dim statement
at the beginning of the procedure, using the syntax Dim VariableName As
DataType.
Here’s what the arguments
of the Dim statementmean:
›› VariableName:Thename
of the variable. Example:
EmployeeName.
›› DataType: The type of
data you want to use in
the variable, such as a
number, date, or text.
See the table on the next
page, Data Types used in
DIM Statements for a list
of data types that can be
Fig. 13.14. An example of DIM and REM statements.
used.
Make sure you add an As between the variable name and the data type.
Example: As String.
Add a Remark to a Procedure (REMstatement)
Code can be confusing, but you Table 13.1: Data Types used in DIM Statements
can make it easier to understand
Date Type Size Range
by adding explanatory remarks
to it. These remarks are called Byte 1 byte 0 to 255
REM statements. A REM statement Boolean 2 bytes True or False
doesn’t do anything—it’s just a Integer 2 bytes -32,768 to 32,767
way to add notes explaining the Long (Long 4 bytes 2,147,483,648 to
function of the code. Integer) 2,147,483,647
Date 8 bytes January 1, 1000 to
1. Open the workbook that
December 31, 9999
contains the macro with
String (Text) Varies Approximately 2
the code you want to billion characters
change.
2. Click the View tab on the Ribbon and click the Macros button in the Macros
group.
The Macros dialog box appears.

284 Advance Spreadsheet Tools


3. Select the macro that contains the code you want towork on and click Edit.
The macro opens in the VBA window.
4. Click where you want to add the remark in the code.Type ‘ (an apostrophe)
then type the rest of the remark.

PROMPTING FOR USER INPUT

When creating macros and code it is EXERCISE


often useful to prompt the user for Exercise File: ExpenseReport13-7.xlsm
information. You can then use this Exercise: Open the ExpenseFillin macro in the
information in any number of ways— Visual Basic Editor. Enter the following InputBox
place it in a cell, use it in a calculation, statements below the second REM statement:
or print it in a header or footer. EmployeeName = InputBox(“Enter the Employee
This lesson explains one of the Name.”) EmployeeNo = InputBox(“Enter the
Employee Number.”)
easiest ways to prompt the user for
Run the ExpenseFillin macro in A5, entering your
information—using the InputBox name and employee number when prompted.
function. The InputBox function (Note: The result of the macro will not be the
prompts the user for information by data you entered when prompted because the
displaying a dialog box. macro is still set to enter Jeff Nelson and 45177
in B5 and C5.)
The syntax for the InputBox
function is InputBox(“Prompt”) where “Prompt” is the message youwant to display
(usually enclosed in quotation marks).
1. Open the workbook
that contains the
macro with the code
you want to change.
2. Click the View tab on
the Ribbon and click
the Macros button in
the Macros group.The
Macros dialog box
appears.
3. Select the macro that
contains the code you
want to work on and
click Edit.
Fig. 13.15. An example of the InputBox code in a macro.

Advance Spreadsheet Tools 285


The macro opens in the VBA window.
4. Click where you want to
add the InputBox function
to the code.
5. Add an Input statement
using the syntax
InputBox(“Prompt”).

Fig. 13.16. An example of a dialog box prompting a user for information.

USING THE IF…THEN…ELSESTATEMENT

The If…Then…Else statement takes EXERCISE


action based on a certain condition. Exercise File: ExpenseReport13-8.xlsm
For example, if an employee’s weekly Exercise: Use the If…Then…Else statement
sales are more than $2,500, then to enter the employee number 45177 if the
calculate a 5% commission bonus for employee is Jeff Nelson, else the user will have
the employee, else don’t calculate a to enter their employee number.
bonus. Open the ExpenseFillin macro in the Visual
Basic Editor. Enter the following If…Then…Else
1. Open the workbook that statement under the statement: EmployeeName
contains the macro with thecode = InputBox(“Enter the Employee Name”)
you want to change. If EmployeeName = “Jeff Nelson” Then
2. Click the View tab on the Ribbon EmployeeNo = 45177
and click the Macros button in Else
the Macros group. EmployeeNo = InputBox(“Enter the Employee
Number.”) End If
The Macros dialog box appears.
Run the ExpenseFillin macro entering Jeff
3. Select the macro that contains Nelson as the Employee Name.
the code you want to work on
and click Edit.
The macro opens in the VBA window.
4. Click where you want to add
the remark in the code. Add an
If…Then…Else statement using
the following syntax (italicized
text is where variables belong Fig. 13.17. The syntax of an If…Then…Else statement.
in the statement):

286 Advance Spreadsheet Tools


Fig. 13.18. An example of an If…Then…Else statement used in a macro.

If condition Then
statement if true
Else
statement if false
End If

Working with Macros Review


QUESTIONS
1. Which of the following is NOT a place where you can choose to store a macro?
(a) This Workbook (b) New Workbook
(c) Universal Macro Workbook (d) Personal Macro Workbook
2. To play a macro in the Macro dialog box, click the button
(a) Run (b) Play
(c) Macro (d) Go
3. You can select a symbol of your choice to represent the macro on the Quick Access
Toolbar. (True or False?)

Advance Spreadsheet Tools 287


4. Excel macros are written in the_____________programming language.
(a) ABC (b) Visual Basic
(c) Basic Macro (d) Visual Excel
5. You can change your macro security settings in the_____________window.
(a) Macro Center (b) Code Center
(c) Trust Center (d) VBA Control
6. Which of the following statements declares a variable?
(a) REM HireDate as Date (b) Dim HireDate as Date
(c) InputBox(HireDate) = Date (d) Sub HireDate() = Date
7. Which of the following statements would prompt a user for information?
(a) REM DOB as Date (b) Sub HireDate(
(c) DIM HireDate( (d) InputBox(

ANSWERS
1. C. The Universal Macro Workbook is not a place where you can store a macro.
2. A. Click the Run button in the Macro dialog box to play a macro.
3. True. You can select a symbol of your choice to represent the macro on the Quick Access
Toolbar.
4. B. Excel macros are written in the Visual Basic programming language.
5. C. You can change your macro security settings in the Trust Center window.
6. B. Dim HireDate as Date would declare the variable ‘HireDate’ as a date.
7. D. The statement InputBox(

288 Advance Spreadsheet Tools


Customizing Chap
14
ter
Excel
Customization is a great asset in an application. Customization lets you use a
particular mix of commands and shortcutsthat are best for your working style.
The lessons in this chapter focus on how to customize the Ribbon, the Quick
Access Toolbar, and AutoCorrect. We’ll also discuss how to access and review the
default options for a program.
CUSTOMIZING THE RIBBON

One of the most useful features in EXERCISE


Office 2010 is that you can customize Exercise File: None required.
the Ribbon. Add your own tabs and Exercise: Create a new group on the Home tab
called “Printing” and include the command to
groups, or rearrange the Ribbon to
Print Preview and Print.
better fit your work style.
Restore the Ribbon defaults.
Create a New Tab or Group
You can add new groups to tabs,
or you can create new tabs with
new groups.
1. Click the File tab on the
Ribbon and select Options.
The Options dialog box
appears.
2. Click the Customize
Ribbon tab.
The left column displays
commands that you can add
to the Ribbon.
The right column displays
the tabs on the Ribbon, and
the groups and commands
Fig. 14.1. Use the buttons in the Options dialog box to add a new
in each tab. tab or group to the Ribbon.

Advance Spreadsheet Tools 289


Tip: Click the plus sign next to a tab or group toexpand it.
3. In the right column, select the tab where you wish to add the new tab or
group.
A new tab, which automatically includes a newgroup, will be inserted below
the selected tab.
A new group will be inserted within the selected tab.
4. Click the New Tab or the New Group button.
The new tab or group is added.
Rename a tab or group
Once you’ve created a tab or
group, give it a name.
1. Select the tab or group
you want to rename.
2. Click the Rename button.
The Rename dialog box
appears.
3. Enter a name for the
selected tab or group in
the Display Name text
box.
The tab or group is
renamed. For a group, Fig. 14.2. Adding commands to groups on the Ribbon.

also selecta symbol to represent the group.


4. Click OK.
The tab or group is renamed.
Add a Command to a Group
Once you have created a new
tab or group, you can add
commands to the group. You
can also add commands to
groups that already appear on
the Ribbon.

Fig. 14.3. The Home tab of the Ribbon, customized with a new group.

290 Advance Spreadsheet Tools


1. In the right column, select the group to which youwant to add a command.
This could be a group you’ve created from scratch, or even a group that
appears by default.
2. In the left column, select the command you want toadd to the Ribbon. Click
the Add button.
The command is added to the group.
Tip: Not finding the command you want to add? Click the Choose
commands from list arrow andselect the group of commands you want
to view.
Restore the Default Ribbon
If you no longer want to use the customizations you’ve added to the Ribbon, you
can restore the Ribbon to its original, default settings.
1. Click the Reset button.
Two options appear:
›› Reset only selected Ribbon tab: Restores the default settings for the
selected tab.
›› Reset all customization: Removes all Ribbon and Quick Access
Toolbar customizations, restoring them to the default arrangement and
appearance.
2. Select the reset option you wish to use.
The Ribbon is restored to its default settings.
Remove a tab or group
You can also remove a specific tab or group from theRibbon.
1. In the right column, right-click the tab or group youwish to use.
2. Select Remove from the contextual menu.
The tab or group is removed from the Ribbon.
Tips
• Any changes you make to a program’s Ribbon willappear only in that
program.
• To hide a tab on the Ribbon, deselect its check box.

Advance Spreadsheet Tools 291


CUSTOMIZING THE QUICK ACCESSTOOLBAR

The Quick Access Toolbar is a shortcut for EXERCISE NOTES


commands that are used often. If the Quick Exercise File: None required.
Access Toolbar doesn’tcontain enough of your Exercise: Add the Print Preview
frequently used commands, youcan customize command from the Popular
it by adding or deleting commands. Commands group to the Quick Access
1. Click the File tab and select Options. Toolbar.
Move the Quick Access Toolbar below
The Excel Options dialog box appears. the Ribbon.
2. Click the Quick Access Toolbar tab.
This tab displays options
for customizing the
QuickAccess Toolbar.

The left column
displays commands you
can add to the Quick
Access Toolbar. The
right column displays
commands that appear
there.
3. In the left column,
select the command
you want to add to the
Quick Access Toolbar.
4. Click the Add button.
The command is added
to the Quick Access
Toolbar. Fig. 14.4. Adding a command to the Quick Access Toolbar.
Tips
• Arrange the order in which the commands are displayed by clicking
the Move Up and Move Downbuttons to the right of the column.
• Click the Reset button and select Reset only QuickAccess Toolbar
to return the Quick Access Toolbarto its default commands.
• Select a command in the Quick Access Toolbar column and click the
Remove button to remove itfrom the Quick Access Toolbar.
292 Advance Spreadsheet Tools
USING AND CUSTOMIZINGAUTOCORRECT

AutoCorrect automatically corrects many


EXERCISE NOTES
common typing and spelling errors as you
Exercise File: None required.
type. It is also a great way to use shorthand for
Exercise: Create an AutoCorrect entry
longer words, phrases, or symbols.
that replaces “ot” with “to”.
AutoCorrect is a feature that is shared Try the AutoCorrect entry with this
across the Microsoft Office suite—so any phrase, “He was going ot the store.”
additions or changes you make to AutoCorrect
in one program, such as Word, will appear in all Microsoft Office programs, like
Excel, Excel, and Outlook.
How AutoCorrect works
You may have already noticed that
sometimes your typos are corrected as
you enter text in Word. When you type
an AutoCorrect entry and then press the Fig. 14.5. An example of how AutoCorrect works.
<Spacebar>, AutoCorrect replaces that text with the correct text.
For example, AutoCorrect will change the mistyped words “hte” to “the”, or “adn”
to “and”. AutoCorrect alsocorrects simple grammar mistakes, such as capitalization
problems. For example, it would change “GOing” to “Going,” or capitalize the first
letter in sentences.
Create an AutoCorrect entry
Excel already has many entries in
AutoCorrect, but you can add your
own entries to correct habitual
misspellings, quickly insert a
symbol, or insert a shorthand
version of a long phrase that you
frequently use.
1. Click the File tab and select
Options.
The Excel Options dialog
box appears.
2. Click the Proofing tab.

Fig. 14.6. The AutoCorrect tab of the AutoCorrect dialog box.

Advance Spreadsheet Tools 293


This tab displays options for how Excel corrects andformats text.
3. Click the AutoCorrect Options button.
The AutoCorrect dialog box appears with theAutoCorrect tab in front.
4. Type the word or phrase you want to correct or use as shorthand in the
Replace text box.
This is the text that AutoCorrect will recognize whenyou type.
5. Type the word or phrase you want to appear in the With text box.
When the text in the “Replace” text box is typed witha space, the text in the
“With” text box will appear.
6. Click Add.
The entry is added to the AutoCorrect list.
7. Click OK to close the AutoCorrect dialog box. Click OK to close the Excel
Options dialog box.
The dialog boxes close and the entry will now be available in all Excel
workbooks, and also in all otherOffice applications.

CHANGING EXCEL’S DEFAULTOPTIONS

Microsoft spent a lot of time and research EXERCISE NOTES


when it decided what the default settings for Exercise File: None required.
Excel should be. However, you may find that Exercise: Explore the tabs in the Excel
the default settings don’t always fit your own Options dialog box.
needs.
This lesson isn’t so much
an exercise as it is a reference
on how to customize Excel by
changing its default settings.
1. Click the File tab and
select Options.
The Excel Options
dialog box appears.
2. Click the tabs on the
left to view different
optioncategories.
Fig. 14.7. The Formulas tab of the Excel Options dialog box.

294 Advance Spreadsheet Tools


See the table below, Tabs in the Excel Options DialogBox, for more information
on these categories.
3. Change the options as you see fit. Click OK toconfirm the changes.
The changes are applied to the Excel program.
Table 14.1: Tabs in the Excel Options Dialog Box
General Change the most commonly modified options in Excel. This includes
enabling the Mini Toolbar and Live Preview. Also, change the color
scheme, control ScreenTips, and change the user name.

Formulas Change options related to formula calculation, performance, and error


handling.

Proofing Change how Excel corrects and formats your text. Change the types of
errors that Excel flags when lookingfor spelling and grammar errors.

Save Customize how workbooks are saved, such as how often AutoRecover
saves a workbook, and change defaultfile locations.

Language Add additional languages to edit your documents. Also set the language
priority order for added languages.

Advanced Advanced options for working with Excel. Change how Excel works
when you edit text; modify how cut, copy, and paste commands
operate; customize tools in the window, such as how it displays screen
tips and scroll bars; adjust how Slide Show view looks and operates;
control how the workbook is printed; choose advanced save options;
and control various Web options.

Customize Create custom tabs and groups for the Ribbon.


Ribbon

Quick Access Add commands to the Quick Access Toolbar.


Toolbar

Add-Ins View and manage Microsoft Office add-ins, such Acrobat PDFMaker
and custom XML data.

Trust Center Help keep your workbooks safe and your computer secure and healthy.
Read privacy statements and change Trust Center Settings to control
how Excel works with macros, add-ins, the message bar, trusted
publishers and locations, and more.

Advance Spreadsheet Tools 295


CREATING A CUSTOM AUTOFILLLIST

You’re already familiar with


EXERCISE NOTES
Excel’s AutoFill feature.
Exercise File: CustomizingExcel.xlsx
It’s the nifty function that
Exercise: Use the data in A1:A10 to create a custom AutoFill
automatically enters a
list.
series of values. If you find
Try using the AutoFill list in the worksheet.
yourself typing the same
list of words frequently, you can save yourself a lot of time by creating a custom
AutoFill list. Once you have created a custom AutoFill list all you have to do is type
the first entry of thelist in a cell, and use AutoFill to have Excel complete the rest
of the list for you.
Create a custom AutoFill list
1. Click the File tab on the Ribbon and select Options.
2. Click the Advanced tab and scroll down to the General section. Click the Edit
Custom Lists button.
The Custom Lists dialog box appears.
3. Select NEW LIST under the Custom lists section.

Fig. 14.8. Custom Lists dialog box.

4. Type the first entry you want to include in the AutoFill list and press <Enter>.
Repeat for eachentry of the list.
296 Advance Spreadsheet Tools
Other Ways to Enter Custom List Entries: Select the cell range that contains

the informationyou want to include in your custom AutoFill list.Then open the
Custom Lists dialog box. Click Import.
5. Click Add.
The custom list is added to the dialog box.
6. Click OK, OK.
Use a custom AutoFill list
Using a custom AutoFill list is just like completing anyother series with AutoFill.
1. Click the cell where you want to begin the custom fillseries.
2. Type an item from the series.
3. Click and drag the cell’s fill handle to complete the series in the cells you
select.

CREATING A CUSTOM NUMBER FORMAT

You learned how to format values (numbers) in


EXERCISE NOTES
a previous lesson in this chapter. Excel comes
Exercise File: CustomizingExcel.xlsx
with a huge number of predefined number
Exercise: Select cell C1 and create this
formats you can use. With so many available custom number format: ##-####
number formats, it is unlikely that you will
ever need to create your own custom number format, but if you do, here’s a brief
overview.
1. Click the Home tab on the Ribbon and click the Dialog Box Launcher in the
Number group.
2. Click Custom in the Category box.
This is where you can modify a copy of an existing format code to meet your
specifications. A custom number format is created by specifying format
codes that describe how you want to display a number, date, time, or text.
The table below, Format Codes for Numbers and Dates, gives some examples
of how to use these codes when creating custom number formats.
Tip: The sample area of the number dialog box becomes very important
when you’re creating custom number formats. Watch the sample area
carefully to see how the custom number format
3. In the Type list, select a number format that you want to customize.
The number format appears in the Type box.

Advance Spreadsheet Tools 297


Fig. 14.9. Creating a custom number format.

4. Make changes to the number format in the Type box using the format codes
shown in the table below, Format Codes for Numbers and Dates.
Table 14.2: Format Codes for Numbers and Dates

Numbers Dates and Times

To Display Use this Code To Display Use this Code

1234.59 as 1234.6 ####.# 1/1/11 as 1-1-11 m-d-yy

12499 as 12,499 #,### 1/1/11 as Jan 1, 11 mmm d, yy

12499 as 12,499.00 #,###.## 1/1/11 as January 1, mmmm, d, yyyy


2011

1489 as $1,489.00 $#,###.## 1/1/11 as Fri 1/1/11 ddd m/d/yy

.5 as 50% 0% 1/1/11 as Friday, January dddd, mmmm, d


1

298 Advance Spreadsheet Tools


.055 as 5.5% 0.0% 4:30 PM as 4:30 PM h:mm AM/PM

Hide value ;; 4:30 PM as 16:30 h:mm

Customizing Excel Review


QUESTIONS
1. You can only add custom groups to custom tabs. (True or False?)
2. What is the purpose of the Quick Access Toolbar?
(a) To provide quick access to the commands you use most frequently.
(b) To make Excel 2010 look more like previous versions.
(c) To provide Microsoft Access commands in the Excel program.
(d) To provide a backup in case the Ribbon fails
3. AutoCorrect changes:
(a) Spelling errors (b) Grammar errors
(c) Capitalization errors (d) All of these.
4. AutoCorrect entries created in Excel will not appear in any other programs. (True or
False?)
5. Which of the following is NOT a tab in the Excel Options dialog box?
(a) Proofing, which changes how Excel corrects your text.
(b) Display, which changes how content appears on the screen.
(c) General, which lists the most commonly modified options in Excel.
(d) Trust Center, which changes your privacy options.
6. Which of the following is NOT an example of information that could be used in an
AutoFill list?
(a) Since you can create your own AutoFill lists, you could use any of this information
in an AutoFill list.
(b) The names of the seven dwarves.
(c) A product list.
(d) A list of employees.
7. The United States decides to change the format of social security numbers. How can
you create a custom numberformat for the new social security format?
(a) Click the Number tab on the Ribbon and click the Custom List button in the Number
group. Select the Customcategory and type the number format in the Type box.
(b) Buy and install the Custom Number Wizard Add-On for Microsoft Excel.
(c) Enter the number format in the Number Format list on the Formatting tab of the
Ribbon.

Advance Spreadsheet Tools 299


(d) Click the Home tab on the Ribbon and click the Dialog Box Launcher in the Number
group. Select the Customcategory and type the number format in the Type box.

ANSWERS
1. False. You can add custom groups to default tabs or to custom tabs.
2. A. The purpose of the Quick Access Toolbar is to provide quick access to the commands
you use most frequently.
3. D. AutoCorrect changes spelling errors, grammar errors, and capitalization errors.
4. False. AutoCorrect entries created in Excel will appear in all other Microsoft Office
programs.
5. B. There is no Display tab in the Excel Options dialog box.
6. A. Since you can create your own AutoFill lists, you could use any of this information in
an AutoFill list.
7. D. To create a custom number format, click the Home tab on the Ribbon and click the
Dialog Box Launcher in the Number group. Select the Custom category and type the
number format in the Type box.

300 Advance Spreadsheet Tools

You might also like