Microsoft Office Excel 2010 Advanced 96
If we click the second link (in cell B11) another file will open, but because the target file is a
database file, it will open in Access:
To remove a hyperlink from your spreadsheet, right-click the cell containing it and click Delete:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 97
This action will remove the hyperlink from the worksheet and the cell in question will be left
empty.
You can also right-click on a cell with a hyperlink and click Remove Hyperlink:
This action will remove the target information from the link, but the text of the link will remain
in the cell.
You can also insert a hyperlink function by clicking the Insert Function button by the formula
bar:
This action will display the Insert Function dialog, from which you can select the Hyperlink
function:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 98
If you select HYPERLINK and click OK in the dialog, the Function Arguments dialog box will
appear.
In the “Link_location” text box, you can specify the target of the link. This can be a web page
URL, a local file, or a file on a network server. In the “Friendly_name” box, you can specify the
particular text or number that will be visible in the spreadsheet. When you click OK, the link will
be inserted into the spreadsheet.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 99
You can also specify an image or other graphic as a hyperlink in your spreadsheet. To do this,
just click the image and click Insert → Hyperlink:
This action will display the same Insert Hyperlink dialog that we saw earlier. Use the Insert
Hyperlink dialog to specify the target of the hyperlink, and then click OK to associate the linked
location to the image. Once you have created the link, if you click on the image the link will be
followed to its target, just like a regular hyperlink. You can edit and remove it in the same way.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 100
Section 1: Review Questions
1. Which of the following features is not a What-If Analysis tool?
A. Goal Seek
B. Subtotal
C. Solver
D. Single input data table
2. To optimize a system of equations with Solver, you must specify…
A. Constraints
B. Scenarios
C. Solutions
D. All of the above
3. What is the difference between Solver and other What-If Analysis tools?
A. Solver is an Excel add-in
B. Solver can solve for more values in more complex problems
C. Solver can be used to maximize or minimize and to solve for a value
D. All of the above
4. Which of the following statements is true?
A. You should use goal seek to optimize systems of equations
B. You should use scenarios to compare the results of different sets of values in a
spreadsheet
C. You should use scenarios to optimize systems of equations
D. Any of the above
5. Which of the following statements is false?
A. A hyperlink can link to a web page on a remote server
B. A hyperlink can link to a cell in the same worksheet
C. A hyperlink can be used to import external data into Excel
D. A picture can be used as a hyperlink
6. To use automated subtotals you need…
A. A table of data
B. Data arranged in columns with column labels
C. Numerical data arranged with row headings
D. Data arranged in separate workbooks
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 101
7. Automatic outlining works best with…
A. Numerical data organized into groups and sub groups by formulas or functions
B. Numerical data arranged with row headings
C. Numerical data organized into groups and subgroups without any formulas or
functions
D. A table of data
8. To perform a correlation analysis in Excel you should consider…
A. Using the Solver Add-in
B. Using the Analysis ToolPak
C. Using what-if analysis tools
D. You cannot perform a correlation analysis in Excel
9. The Analysis ToolPak is…
A. Part of the What-If Analysis Tool group
B. An Excel add-in with special formatting options
C. An add-in that is useful for analyzing scientific data
D. An add-in that can be used to connect with an external database
10. Which of the following statements is true?
A. Solver can be used as a goal seek tool
B. Goal Seek is an Excel add-in
C. Once installed, add-ins cannot be deactivated
D. The Outline tools are on the Excel View tab
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 102
Section 2: Pivoting Data
In this section you will learn how to:
Describe and create PivotTables
Use the contextual PivotTable Tools tabs
Add and remove PivotTable information using the Field List
Change the Field List layout
Pivot data
Expand and collapse data
Filter, sort, group, and refresh data
Edit a data source
Modify PivotTable row and column labels and values
Use the Layout group on the Design tab
Apply a style to a PivotTable
Change PivotTable style options
Manually format a PivotTable
Use the PivotTable Options dialog
Create and use a classic PivotTable frame
Switch to a classic PivotTable frame
Add data to a classic PivotTable
Pivot data in a classic PivotTable
Create a PivotTable based on external data
Refresh external data
Create a Slicer and use the Slicer Tools tab
Download, install, and use PowerPivot
Integrate Access and Excel data using PowerPivot
Create a PivotTable from PowerPivot data
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 103
Lesson 2.1: Getting Started with PivotTables
An important function of any spreadsheet program is to help you derive meaning from your
data. An Excel PivotTable is a great tool for doing this. A PivotTable can help you get different
perspectives as you analyze the relationships between the columns and rows of your data.
In this lesson you will learn what a PivotTable is and how to create one. You will also learn how
to specify and rearrange PivotTable data.
What is a PivotTable?
A PivotTable is a powerful tool for exploring, summarizing, and analyzing information. A
PivotTable helps you organize and manipulate the raw data in your spreadsheet to provide
insight into patterns or relationships that might not be obvious at first glance. PivotTables also
give you the power to summarize your data and view it in a different context, without changing
the original content or structure of the data in the worksheet.
With a PivotTable, you can conveniently drag and drop columns of your data to different areas
of the table to examine relationships or trends that may not be obvious in a traditional Excel
table or database. (You can base a PivotTable on data in your current workbook or on external
data.)
Rather than build several regular tables to explore how columns from an Excel worksheet relate
to each other (or to see the data summarized in different ways), you can use one PivotTable to
do the same thing. With a PivotTable, you can alter the table design without cutting, copying,
pasting, or adjusting formulas and cell references. In short, PivotTables enable you to organize
your data in meaningful ways, without doing a lot of tedious work. You could say that a
PivotTable is like several data tables rolled into one.
Ideally, the source data for a PivotTable should be structured like a traditional Excel table or
database. The source data should have a row of unique column headings distinguishing the
data, and there should be no empty columns interspersed within the data. Also, blank rows in
the source data can limit the usefulness of your PivotTable.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 104
The following image shows a block of contiguous data that is ideal for a PivotTable.
Notice that there are no empty rows or columns, and that every column of data has a unique
label. When data like this is arranged as a PivotTable, you can quickly create views of the data
that show (among other things):
The profit for each product type across regions
The sales figures for each product type across regions
The profit for different product types by various sales people
These are only a few of the scenarios that you could generate with a PivotTable based on the
given data.
Creating a PivotTable
To create a PivotTable, select the range of data that you want to base the table on, and then
click the PivotTable button on the Insert tab:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 105
This will invoke the Create PivotTable dialog:
Notice that you are allowed to select data from an Excel table or range, or from an external
data source. If you forgot to select the range before you opened the dialog, you can enter it
now. If you choose the external data source option, you can base your PivotTable on data
outside your current workbook (i.e. another workbook, or another source like an external
database).
To start, select the “Use an external data source” radio button and click Choose Connection:
Then you will see a list of existing connections. A typical existing connection could be an MS
query, or a connection you previously made to an Access data base for some other purpose.
(There will be more on using external data later.)
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 106
Once you select your data source, you can then choose to locate your PivotTable in an existing
worksheet or a new worksheet. If you choose to locate it in an existing worksheet, you can
specify the location for the upper left corner of the PivotTable by entering it directly into the
Location field (as a cell reference), or by clicking the target cell with your mouse.
If you choose the New Worksheet option, your PivotTable will be located in the upper left
corner of a new worksheet that will be added to your workbook.
Once you are ready, click OK to create your PivotTable:
Above you can see a new PivotTable area and the corresponding PivotTable Field List placed in
the existing worksheet that contains the source data.
Once your PivotTable area appears, you can add information to it by placing checks in the boxes
next to the fields in the PivotTable Field List. For this example, checks will be placed next to the
Month, Salesman, Region, and Profit fields:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 107
The PivotTable area will now be populated with the corresponding data:
As you can see in the following image, the profit has been organized by Month. It has also been
organized by Salesman, with a total profit for each Salesman in the Sum of Profit column.
Because Region has been checked in the PivotTable Field List, you can also see a profit
breakdown by region for each salesman.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 108
The following close-up view of the table tells us that the total profit for Month 1 is 2775. The
Salesman A. Smith generated a total of 840 in profit with 590 from the East region, and 250
from the Northeast region.
As you can see, a PivotTable can provide more informative views of your data than a regular
table.
Using the PivotTable Tools Tabs
When you create a PivotTable in Excel, some useful tools for working with it will be provided
with the rest of your Excel tabs. To access these tools, simply click anywhere within your
PivotTable area.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 109
There should be two tabs available: Options and Design. Here is what the Options tab looks
like:
Options Group
Moving from left to right, Options is the first group of tools on the Options tab:
At the top of the group, a text box is provided so you can enter a PivotTable name. (This could
help if you planned on referring to from within a macro or perhaps from another worksheet.)
The Options command will open the PivotTable Options dialog, which we will discuss later on in
this section.
Active Field Group
The next group of tools on the Options tab deals with the active PivotTable field. PivotTable
fields are the ranges of data that you included in the PivotTable and they are typically identified
by headings. The active field is the range of data that you are currently working in:
Above, you can see that the active cell is in the month column of the table, so the active field is
“Month.” The green plus and red minus buttons in the Active Field group are for collapsing and
expanding the active field.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 110
If you want more options for manipulating the active field, you can click the Field Settings
button.
This action will display a dialog that you can use for fine tuning the active field:
Here you can decide if subtotals will be included in the table and if so, what function will be
used to calculate them. By default, the subtotals in the table will be calculated as a sum:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 111
If you change this setting in the dialog to Average:
The PivotTable will reflect the change.
Group
The next group contains grouping and ungrouping options:
These options can be used to group and ungroup data in a PivotTable in a way that is a bit like
the grouping techniques that we will look at in Lesson 2.2.
Sort & Filter Group
You can use these options to sort your data in a number of ways or to insert a Slicer to filter
your data:
There will be more discussion on sorting and Slicers later in this manual.
Data Group
This group contains two commands:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 112
The Refresh button is used to update the PivotTable with any changes that may have been
made to the underlying source data. The Change Data Source command allows you to specify
an entirely new range of data to base your existing table on.
Actions Group
Next up is the Action group of buttons:
The Clear button offers two options:
Clear All will clear the PivotTable of all data. Clear Filters option will remove any filters you have
applied to the table.
The Select command provides options for selecting all of your PivotTable or just particular
elements of it:
The last button in the Action group, Move PivotTable, is useful if you want to relocate an
existing PivotTable to a new worksheet or to a different area of the existing worksheet.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 113
Calculations Group
This group provides tools for adjusting how the values and subtotals in your PivotTable are
calculated and displayed:
If you click the “Summarize Values By” button, a list of options for calculating table values (such
as subtotals) will appear:
Clicking the Show Values As button provides options to display your table values as percentages
of various numbers, as differences from certain numbers, or as ranked values:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 114
The final option in the calculations group, Fields Items and Sets, lets you create new calculated
fields for your table or even modify existing ones:
Tools Group
The next group contains three commands:
The PivotChart will initiate the process of creating a chart based on your PivotTable data. We
will explore this command in the next section.
The final two commands allow you to apply OLAP tools to your PivotTable and apply What-If
Analysis to the table. Both of these commands are beyond the scope of this manual.
Show Group
The last group on the Options tab will let you choose what elements of your PivotTable (and
associated Field List) will be visible or hidden:
If a button is selected, its corresponding elements in the PivotTable (or Field List) will be
displayed. In the image above, all buttons are highlighted, so the Field List, the collapse and
expand buttons, and the field headers will all be displayed:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 115
PivotTables are like most things in Excel; if there is something you need to do, there is usually
more than one way to go about doing it. The tools on the Options tab provide a quick and
accessible way of getting things done with PivotTables.
If you are looking to change the appearance of your PivotTable, check out the Design tab:
This tab contains three groups.
Layout Group
This group contains four commands:
Each of these commands expands into a menu allowing you to customize the chosen item.
Here’s an example:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 116
PivotTable Style Options Group
This group lets you toggle various types of formatting on or off by checking or unchecking the
respective box:
PivotTable Styles Group
Last but not least, the PivotTable Styles group contains a gallery of pre-formatted themes to
apply to your table:
Simply click a thumbnail to apply it, or use the arrows at the right of the gallery to view more
styles.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 117
Adding and Removing Data with the Field List
We have already seen how to create a basic PivotTable by selecting a range of data as the
source, and then choosing Insert → PivotTable. This leaves us with a blank PivotTable area and
a Field List containing items that are based on the headings (field names) in the source data.
As mentioned previously, a simple way to add data to the table is to place checkmarks next to
the items in the Field List that you would like to include. In the following image, we have
selected the Month and Profit fields from the Field List so that they automatically appear in the
table.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 118
You can just as easily remove the fields from the table by clearing the checkmarks. (Note that
the order in which you click to place your checkmarks is very important, as this will also be the
order of placement for the fields in the PivotTable.)
This method is quick and easy, but what if you want to have more choice in how the data is
arranged in the table? At the bottom of the Field List you will notice a panel of four data boxes:
These boxes are named Report Filter, Column Labels, Row Labels, and ∑ Values. You can use
your mouse to drag field names from the top of the Field List (the part with the checkboxes)
down to these boxes. The structure of the resulting Pivot Table depends on where you drag and
drop these field names.
Have a look at the following example. The Month field has been dragged down to the Report
Filter box:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 119
When this action is completed, the Month field will appear in the spreadsheet as part of the
PivotTable.
Now, if we drag the Salesman field down to the Column Labels box and the Sales field down to
the ∑ Values box, the Field List will look like this:
The resulting PivotTable will look like this:
Here we see the total sales for each salesman over all months combined.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 120
We could just have easily dragged other fields to the boxes at the bottom of the Field List to
add to, or change the structure of the table. Moreover, we can easily drag fields away from the
boxes at the bottom of the Field List to remove it (and remove the corresponding field/data
from the table).
For example, if you drag the Salesman field out of the “Column Labels” box and back up to the
main list area (with the check marks) or pretty much anywhere outside of the bottom area
containing the four boxes, the corresponding data will disappear from the PivotTable.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 121
Changing the Field List Layout
The default layout for the Field List looks like this:
Just like most other things in Excel, the Field List can be altered to suit your preferences. To do
this, click the Field List Layout button in the upper right corner of the list:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 122
When you perform this action, a layout menu for the PivotTable Field List will appear:
This menu displays five preset layouts that you can choose from. To apply a layout to the Field
List, just click on the layout option that you prefer. In most cases it is probably best to choose a
layout that contains both the “Fields” section (checkboxes) and the “Areas” section.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 123
Here is what the first and second layout options on the menu will do to the Field List:
Pivoting Data
Why are PivotTables called PivotTables? Because they let you move data around easily (by
dragging and dropping fields) to perform a sort of rotation on the structure of your table and at
the same time, change your view of the data. The act of moving data around to change the
table structure is called “pivoting.”
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 124
Before you begin dragging and dropping, you should have some idea of what the different
boxes at the bottom of the PivotTable Field List are used for.
As mentioned previously, you can drag fields into these boxes to add data to your PivotTable.
What kind of table you end up with depends on what boxes you drop and drag fields into. The
art of pivoting data largely depends on knowing where to place your fields.
First, let’s look at the Report Filter box. This area is best suited to fields that are used to identify
periodic or organizational groupings of your other data. For example, you may have column
headings for sales, profit, and expenses, which are grouped according to the specific month or
year in which the sales, profits, and expenses have occurred. In this case, the month or the year
field would be good candidates for the Report Filter box. This would allow you to populate the
PivotTable with the data corresponding to whatever year or month you select.
Have a look at the following PivotTable:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 125
This table shows the sales for each salesman according to region. Here is what the four Field
List boxes look like for this table:
Now, suppose we drag and drop the Month field from the Field List to the Report Filter box:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 126
The PivotTable will now look like this:
If you look carefully, you will notice the word (All) next to the Month Field heading. This means
that the table data has been summarized for all months. If you would like to summarize the
data for just a single month, you could display the drop list for the Month field and choose a
specific month:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 127
When you click OK, only the data for Month 2 will be presented in the table.
Now that you know what the Report Filter box is for, let’s look at the remaining three boxes.
Fields dragged and dropped into the ∑ Values area provide the main data for your PivotTable.
The fields you drag to this area will normally have some numerical value associated with them,
like units sold, profit, or expenses. This is the kind of data that can be measured (often
monetary) and totaled to reveal trends or indicate relationships between the non-numeric
data.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 128
In the preceding image, the ∑ Values box contains the Sales field. Because Fields in the ∑ Values
box will be subtotaled, the words “Sum of” have been tacked on so it reads Sum of Sales. In this
case, the data values associated with the Sales field will appear in the main part of the
PivotTable with totals automatically calculated:
Essentially, this PivotTable shows us the sales for each salesman, broken down across regions.
Now suppose we wanted to see the sales for each region, broken down across Salesman. To do
this, we would simply switch the positions of the Salesman and Region fields in the Field List
boxes by dragging and dropping:
Now the Region field is in the Row Labels area and the Salesman field is in the Column Labels
area. Here is what the PivotTable looks like:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 129
The data has just been pivoted in a basic way. Compare the table above to the following image
of how the table used to look.
We have just seen two different views of the same data using only one table, thanks to the
magic of PivotTables.
The preceding table displays the Sales for each Salesman broken down across Region. When
you are pivoting data and planning what view you want, it can be useful to think of things in
terms of that description. For example, think of your PivotTable as showing “numerical data”
for each “identifier or organizational heading” across “another identifier or organizational
heading.”
Even better, think of it as “field or fields in the ∑ Values box” for each “field or fields in the Row
Label Box,” broken down across “field or fields in the Column Label box.” Thinking of things in
those terms will help you understand how to pivot your data to get the view you are looking
for.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 130
Let’s look at a final example, based on the following Field List:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 131
Suppose you wanted to look at the profit for each product type broken down across salesmen.
Let’s start with the profit. To begin, we will drag the Profit Field to the ∑ Values box, since the
profit data consists of numerical values and will make up the main part of the table:
Next, we want to look at the profit for each product type, so we will drag the Product field to
the Row Labels box:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 132
Since we want to see the profit for each product type broken down by salesman, next we will
drag the Salesman field to the Column Labels box:
Here is the resulting table:
Now we can see with a glance the total profit generated by product type 4 (1255), the total
profit from salesman B. Doe (1495), and the two salesmen who sold both Type 2 and Type 4
products (J. Adams and M. Parker).
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 133
Would this information be as obvious if we look at the original data that the table is based on?
Clearly, knowing how to use PivotTables can be helpful when it is time to analyze your data.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 134
Lesson 2.2: Working with PivotTable Data
Now that you know how to create a PivotTable and how to pivot data, it is time to learn about
some of the other options that Excel provides for manipulating your PivotTable data. In the
following pages you will learn about filtering, sorting, grouping, and refreshing your PivotTable
data. We will also explore how to expand and collapse data, and how to edit a data source.
Expanding and Collapsing Data
Have a close look at the following PivotTable.
You can see that there are multiple rows that show data for different months, different
salespeople, and different product types. There are also profit figures in the column on the far
right, as well as profit subtotals (in bold in the Sum of Profit column).
This view of the table lets you see a lot of data, but it can be a little bit confusing, especially if
you are new to PivotTables. Furthermore, part of the function of PivotTables is to summarize
data, and make it easier to see what is going on.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 135
To help make the table more succinct and easier to interpret, we can use the expand and
collapse buttons.
When you see a button in your table with a minus (-) sign, it means that the field associated
with that button is fully expanded. This button is commonly called a collapse button, because
when you click it the expanded data will collapse. In the previous example, all fields in the table
are expanded. To simplify the presentation of the table and summarize the data, we can click
on the collapse buttons of our choice.
In the following image, we can see the profit generated by each salesman broken down by
product type.
Perhaps this is a little too much information. For a clearer view, we can click the buttons
next to the names of each salesman. We will lose the details about what product types were
sold to generate what profits, but the resulting table becomes less cluttered:
We now have a succinct view of the profit for each salesman, as well as the total profits for
Month 1. To show the hidden data, simply click the expansion button (+ sign).
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 136
Here is what the table looks like if we expand the data for salesman A. Smith:
Now you can see the product type data for only A Smith, as well as a subtotal for A Smith.
Note that there are also collapse and expand tools on the PivotTable Tools – Options tab:
To use these tools, just select a field in your PivotTable that has multiple rows of data
associated with it, and click the Expand (+) or Collapse (-) button as required.
By expanding and collapsing your PivotTable data intelligently, you can create a view of the
table data that best suits your needs.
Filtering Data
Even after you create your PivotTable and then pivot the data the way you want, you may still
find that the information isn’t summarized just the way you need it to be. If you end up in this
situation, the Excel filtering tools may be able to help you find exactly what you are looking for.
Like other Excel tables, a PivotTable can contain AutoFilters. In the following PivotTable, for
example, you will see an AutoFilter arrow next to the Row Labels column heading.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 137
Click the pull-down arrow to display a list of filtering commands:
The available filtering commands are shown in the red box. The list of checkmarks represents
each of the unique identifiers for the table rows; names of salesmen in this case. There is also a
checkbox that allows you to select or deselect all items.
To filter out the data for a given salesman, just clear the corresponding checkbox:
In the example below, B. Doe has been filtered out.
Take note that when a row is filtered from the table, the grand total is adjusted accordingly.
The appearance of the pull-down arrow button will also change when a filter has been applied.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 138
The button now has a funnel icon indicating that a filter has been applied. If you click the pull-
down button after a filter is applied, you will see that the Clear Filter option has become
available:
Clicking this option will remove the filter and the corresponding data will once again appear in
the table. You can also manually re-check items to show the corresponding data.
There are two additional options below the Clear Filter option: Label Filters and Value Filters.
Clicking on either of these options will provide you with another menu that enables the
creation of filters with user specified criteria. Here is what the Label Filters menu looks like:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 139
If you choose an option from the Label Filters menu, a dialog box will appear that prompts you
to enter the criteria for your filter:
In this instance, combining the letter “M” for the “begins with” filter will filter out all rows that
do not have a label (salesman’s name) that begins with M.
Note that you can click the pull-down arrow to see a drop list with more criteria options:
When you click OK, the filter will be applied.
The Value Filter works in much the same way as the Label Filters, except that they will filter
based on criteria that you apply to the numerical data in your table:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 140
The criteria in this dialog should filter all table entries where the Sum of Sales value is greater
than 650. Here is the PivotTable before and after the filter has been applied:
Before After
A PivotTable can contain hundreds or even thousands of rows of data. If you want to filter
everything out except for a particular set of data that you specify, use the search box at the
bottom of the AutoFilter menu:
Searching for a particular row label will filter out all of the data associated with the labels that
do not match, essentially finding the label that you are searching for.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 141
Finally, it is common to have a PivotTable in which there are multiple fields as row labels. For
example, take the following PivotTable where the filtering options under the pull-down arrow
are associated with the salesmen’s names rather than the product type:
What would you do if you wanted your filters to be based on product type instead of salesmen?
In a PivotTable, the filter options will be associated with the row labels that are in bold font (the
names of salesmen in this case).
To change this, just rearrange the fields in the Row Labels box in the PivotTable Field List:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 142
Because Salesman is above Product in the Row Labels box, the salesmen’s names are in bold.
Drag the product field up so it is in top position in the box, and the table will display product
type labels in bold font:
Now the filter options under the pull-down arrow will apply to product type:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 143
You can also choose which row label to filter on by using the Select Field command in the
AutoFilter menu:
This option will only be available if there is more than one row label available in the PivotTable.
Sorting Data
If you know how to filter data in PivotTables, sorting data is just as easy. If you click the same
pull-down arrow that you used for filtering, you will see a few sorting options on the menu as
well:
Choosing the “Sort A to Z” option will sort the table rows in ascending order. Choosing “Sort Z
to A” will sort the table rows in descending order. If there are multiple row fields in the table,
specify which field to sort by using the “Select Field” drop list.
If you want to sort your table on something other than just the row labels, choose More Sort
Options from the menu.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 144
When you choose this option, a Sort dialog will appear.
Once again, options to sort in ascending or descending order are available with radio buttons.
In addition, once you select a radio button, you can click the corresponding pull-down arrow to
choose a field:
These additional options allow sorting on the numerical data in the Pivot Table. The options
shown here will sort the data associated with the Salesman labels in ascending order based on
the sales values.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 145
Here is the resulting table.
Notice that when you have applied a sort option to the table, the pull-down button will display
a tiny arrow: . An upward arrow indicates an ascending sort, while a downward arrow
indicates a descending sort.
There is also a button on the bottom of the Sort dialog labeled More Options. If you choose this
button, another dialog will appear with an AutoSort option. If this option is selected, the data
will be sorted automatically every time the PivotTable is updated:
© 2005-2011 Velsoft Training Materials, Inc.