Summarize and Analyze Data

Summarize and Analyze Data:
MS Excel 2016
American University
Office of Information Technology
Training Unit
GROUPS AND SUBTOTALS .................................................................................................... 3
To group rows or columns: .................................................................................................................................... 3
To hide and show groups: ...................................................................................................................................... 3
Creating subtotals .................................................................................................................................................. 4
To view groups by level ......................................................................................................................................... 5
To remove subtotals .............................................................................................................................................. 5
TABLES ................................................................................................................................. 6
Insert a Table ......................................................................................................................................................... 6
Sort a Table............................................................................................................................................................ 7
Filter a Table .......................................................................................................................................................... 7
Advanced Filters .................................................................................................................................................... 8
Wildcard Criteria .................................................................................................................................................... 9
Total Row .............................................................................................................................................................. 9
Structured References ......................................................................................................................................... 10
WORKING WITH CHARTS AND GRAPHS.............................................................................. 12
Adding Sparklines ................................................................................................................................................ 12
Creating a Quick Chart ......................................................................................................................................... 14
Creating a Standard Chart .................................................................................................................................... 15
Charting Non-Adjacent Ranges ............................................................................................................................ 15
Formatting the Chart ........................................................................................................................................... 15
Formatting the Axis ............................................................................................................................................. 16
Formatting Axis Titles .......................................................................................................................................... 16
Formatting Gridlines ............................................................................................................................................ 17
Adding a Data Table ............................................................................................................................................. 17
Adding Data Labels .............................................................................................................................................. 18
Adding a Trendline............................................................................................................................................... 18
Applying Chart Themes ........................................................................................................................................ 18
Changing Colors of Individual Data Series ............................................................................................................ 18
Inserting Graphics Elements In Your Data Series .................................................................................................. 19
1
Creating A Combination Chart ............................................................................................................................. 19
Pie of Pie Chart .................................................................................................................................................... 20
Add Background Picture ...................................................................................................................................... 22
PIVOT TABLES .................................................................................................................... 23
PIVOT CHART ..................................................................................................................... 25
POWER PIVOT .................................................................................................................... 26
2
GROUPS AND SUBTOTALS
Worksheets with a lot of content can sometimes feel overwhelming and even become difficult
to read. Fortunately, Excel can organize data in groups, allowing you to easily show and hide
different sections of your worksheet. You can also summarize different groups using the
Subtotal command and create an outline for your worksheet.
TO GROUP ROWS OR COLUMNS:
1. Select the rows or columns you want to group. In this example, we'll select columns A,
B, and C.
2. Select the Data tab on the Ribbon, then click the Group command.
3. The selected rows or columns will be grouped.
To ungroup data, select the grouped rows or columns, then click the Ungroup command.
TO HIDE AND SHOW GROUPS:
1. To hide a group, click the Hide Detail button
.
2. The group will be hidden. To show a hidden group, click the Show Detail button
.
3
CREATING SUBTOTALS
The Subtotal command allows you to automatically create groups and use common functions
like SUM, COUNT, and AVERAGE to help summarize your data. For example, the Subtotal
command could help to calculate the cost of office supplies by type from a large inventory
order. It will create a hierarchy of groups, known as an outline, to help organize your
worksheet.
Your data must be correctly sorted before using the Subtotal command.
We will use the Subtotal command with a T-shirt order form to determine how many T-shirts
were ordered in each size (Small, Medium, Large, and X-Large). This will create an outline for
our worksheet with a group for each T-shirt size and then count the total number of shirts in
each group.
1. First, sort your worksheet by the data you want to subtotal. In this example, we will
create a subtotal for each T-shirt size, so our worksheet has been sorted by T-shirt size
from smallest to largest.
2. Select the Data tab, then click the Subtotal command.
3. The Subtotal dialog box will appear. Click the drop-down arrow for the At each change
in: field to select the column you want to subtotal. In our example, we'll select T-Shirt
Size.
4. Click the drop-down arrow for the Use function: field to select the function you want to
use. In our example, we'll select COUNT to count the number of shirts ordered in each
size.
5. In the Add subtotal to: field, select the column where you want the calculated subtotal
to appear. In our example, we'll select T-Shirt Size.
4
6. When you're satisfied with your selections, click OK.
7. The worksheet will be outlined into groups, and the subtotal will be listed below each
group. In our example, the data is now grouped by T-shirt size, and the number of shirts
ordered in that size appears below each group.
TO VIEW GROUPS BY LEVEL
When you create subtotals, your worksheet it is divided into different levels. You can switch
between these levels to quickly control how much information is displayed in the worksheet by
clicking the Level buttons image of button for levels 1, 2, 3 to the left of the worksheet.
1. Click the lowest level to display the least detail. In our example, we'll select level 1,
which contains only the grand count, or total number of T-shirts ordered.
2. Click the next level to expand the detail. In our example, we'll select level 2, which
contains each subtotal row but hides all other data from the worksheet.
3. Click the highest level to view and expand all of your worksheet data.
TO REMOVE SUBTOTALS
Sometimes you may not want to keep subtotals in your worksheet, especially if you want to
reorganize data in different ways. If you no longer want to use subtotaling, you'll need remove
it from your worksheet.
1. Select the Data tab, then click the Subtotal command.
2. The Subtotal dialog box will appear. Click Remove All.
5
TABLES
Just like regular formatting, tables can improve the look and feel of your workbook, and they'll
also help you organize your content and make your data easier to use. Excel includes several
tools and predefined table styles, allowing you to create tables quickly and easily.
INSERT A TABLE
1. Click any single cell inside the data set.
2. On the INSERT tab, click TABLE.
3. Excel automatically selects the data. Check 'My table has headers' and click OK.
This may still seem like a normal data range to you but many powerful features are now just a
click of a button away. The TABLE TOOLS contextual tab (with the underlying Design tab
selected) is the starting point for working with tables. If at any time you lose this tab, simply
click any cell within the table and it will activate again.
6
SORT A TABLE
To sort by Last Name first and Sales second, first sort by Sales, next sort by Last Name (the
exact opposite).
1. Click the arrow next to Sales and click Sort Smallest to Largest.
2. Click the arrow next to Last Name and click Sort A to Z.
FILTER A TABLE
1. Click the arrow next to Country and only check USA.
7
Filters are cumulative, which means you can apply multiple filters to help narrow down your
results.
2. Click the drop-down arrow for the column you want to filter.
3. The Filter menu will appear.
4. Check or uncheck the boxes depending on the data you want to filter, then click OK.
5. The new filter will be applied.
ADVANCED FILTERS
If the data you want to filter requires complex criteria (such as Type = "Produce" OR
Salesperson = "Davolio") you can use the Advanced Filter dialog box.
The Advanced command works differently from the Filter command in several important ways.
 It displays the Advanced Filter dialog box instead of the AutoFilter menu.
 You type the advanced criteria in a separate criteria range on the worksheet and above
the range of cells or table you want to filter.
o Excel uses the separate criteria range in the Advanced Filter dialog box as the
source for the advanced criteria.
8
Because the equal sign (=) is used to indicate a formula when you type text or a value in a cell,
Excel evaluates what you type; however, this may cause unexpected filter results. To indicate
an equality comparison operator for either text or a value, type the criteria as a string
expression in the appropriate cell in the criteria range:
=''= entry ''
Where entry is the text or value you want to find. For example:
What you type in the cell
What Excel evaluates and displays
="=Davolio"
=Davolio
="=3000"
=3000
WILDCARD CRITERIA
Boolean logic: Salesperson = a name with 'u' as the second letter
To find text values that share some characters but not others, do one or more of the following:
 Type one or more characters without an equal sign (=) to find rows with a text value in a
column that begin with those characters. For example, if you type the text Dav as a
criterion, Excel finds "Davolio," "David," and "Davis."
 Use a wildcard character.
Use
To find
? (question mark)
Any single character
For example, sm?th finds "smith" and "smyth"
* (asterisk)
Any number of characters
For example, *east finds "Northeast" and "Southeast"
~ (tilde) followed by ?, *, or ~
A question mark, asterisk, or tilde
For example, fy91~? finds "fy91?"
TOTAL ROW
1. On the DESIGN tab, in the TABLE STYLE OPTIONS group, check Total Row.
2. Click any cell in the last row to calculate the TOTAL of a column. For example, calculate the
sum of the Sales column.
9
Note: in the formula bar see how Excel uses the SUBTOTAL function to calculate the sum. 109 is
the argument for Sum if you use the SUBTOTAL function. Excel uses this function (and not the
standard SUM function) to correctly calculate table totals of filtered tables.
STRUCTURED REFERENCES
When working with tables in Excel, you can use structured references to make your formulas
easier to understand.
10
1. Select cell E1, type Bonus, and press ENTER. Excel automatically formats the column for you.
2. Select cell E2 and type =0.02*[
3. A list of structured references (the columns) appears. Select Sales from the list.
4. Close with a square bracket and press ENTER. Excel automatically copies the formula down
the column for you.
To refer to this table in a formula, execute the following steps.
5. First, we need to know the name of the table. On the DESIGN tab, in the PROPERTIES group,
we can see that this table is called Table1.
6. Select cell G2 and enter the formula shown below.
This formula calculates the sum of the Sales column. Enter =SUM(Table1[
and Excel will give you a list of structured references you can use. This formula updates
automatically when you add or delete records.
11
To convert this table back to a normal range of cells (and keep the formatting), execute the
following steps.
4. On the DESIGN tab, in the TOOLS group, click CONVERT TO RANGE.
Note: to remove the table style, select the range of cells, on the HOME tab, in the STYLES
group, click NORMAL.
WORKING WITH CHARTS AND GRAPHS
ADDING SPARKLINES
SPARKLINES are miniature charts that you can put into a cell if you have a large table of figures.
Rather than making a chart that covers all the figures that sits somewhere else on the
worksheet, you can put a bar chart or a trend line into the last row or column of the table. That
way you can see exactly what’s happening in the numbers, all of which you can see at the same
time.
EXERCISE: ADDING SPARKLINES
1. Open ADDSAL1.XLSX. Click on the QTR 1 tab to make it the active worksheet if it is not
currently active.
2. Select COLUMN E, click the right mouse button, and choose INSERT from the navigation
menu to add a new empty column to the right of column D.
3. Select cells B3 through D3 to use as the data for the sparkline.
4. From the SPARKLINE group on the INSERT tab, select the LINE sparkline.
12
5. Do one of the following to specify E3 as the target cell where you want the sparkline to
be placed:
 Type E3 in the LOCATION RANGE box.

Click the Collapse Dialog button,
, and select cell E3 with your mouse.
6. Click OK to insert the sparkline in cell E3.
7. To quickly add sparklines to cells E4 and E5, select cell E3 and use the Fill Handle in the
lower right corner of the cell to drag the sparkline format to cells E4 and E5.
8. To format the sparkline, click the DESIGN tab from the SPARKLINE TOOLS contextual tab
and choose from the preset options in the STYLE group.
13
CREATING A QUICK CHART
EXERCISE: CREATING A QUICK CHART
1. If using OIT Training Room files, open the file ADDSAL1.xlsx.
2. Click the QTR1 worksheet tab and select the 3 month data for the salespersons.
3. Press the [F11] key. A basic column chart will be created on a new tab.
EXERCISE: MODIFYING THE CHART TYPE
1. With the new chart open, click the CHANGE CHART TYPE button in the TYPE group on
the DESIGN tab.
2. The Change Chart Type window will open. Select BAR in the Navigation Pane, and select
the first choice (if it is not already selected). Then, click OK.
3. To change the chart back, simply reselect the COLUMN style repeating the steps above.
14
CREATING A STANDARD CHART
EXERCISE: CREATING A STANDARD CHART
1. Select the data in cells A2:D6.
2. Click the INSERT tab and click the COLUMN CHART button.
3. Select the CLUSTERED COLUMN choice under 2D CHARTS. The chart will be created in
the 1st Qtr worksheet.
4. To move the chart to a separate sheet, click the MOVE CHART LOCATION button, and
select NEW SHEET.
5. Name the chart “MY CHART”.
CHARTING NON-ADJACENT RANGES
You to chart Non-Adjacent Ranges, which are ranges of cells that are not located next to each
other.
1. Select the first range of cells that you want to chart.
2. Hold down the [CTRL] key and select the next range of cells.
3. Click on the INSERT tab, and select the appropriate chart type.
FORMATTING THE CHART
CHART STYLES
There are numerous Chart Styles available in the CHART STYLES group on the DESIGN tab. Click
the UP and DOWN arrows to view additional choices or click the MORE button to see all the
style options. Click on the style to apply it to your chart.
CHART LAYOUT
Basic Chart Layout options are available in the CHART LAYOUT group on the DESIGN tab. Note
that these layout options are visually displayed in the selection buttons.
Extensive Chart Layout options are available on the Layout tab. From this tab, you can
customize the Primary Horizontal and Vertical Axes, add a Trendline or Data Table, and add
additional text to your graph.
EXERCISE: CHANGING THE CHART LAYOUT
1. Click the first CHART LAYOUT button,
. The layout will change.
2. Click on the CHART TITLE text box.
3. Select the text “CHART TITLE” and type in FIRST QUARTER.
15
FORMATTING THE AXIS
By default, charts will have a Primary Horizontal and Vertical axis. These axes can be formatted
or deleted entirely. The axes can be selected by clicking the AXES button and then selecting
either PRIMARY HORIZONTAL or PRIMARY VERTICAL AXIS and, then selecting a display choice.
For additional formatting, select MORE PRIMARY VERTICAL (OR HORIZONTAL) AXIS OPTIONS.
You may also right-click directly on the AXIS and select FORMAT AXIS from the menu.
EXERCISE: FORMATTING THE VERTICAL AXES
1. From the MY CHART worksheet tab, click the LAYOUT tab.
2. Right-click on the VERTICAL axis and select FORMAT AXIS from the menu. The FORMAT
AXIS window will open.
3. Select NUMBER under AXIS OPTIONS. Select CURRENCY under Category, and change
the DECIMAL PLACES to 0.
4. Click CLOSE.
FORMATTING AXIS TITLES
By default, charts will not have Axis titles. You can create Axis titles by selecting the AXIS TITLES
button and selecting either PRIMARY HORIZONTAL or PRIMARY VERTICAL AXIS TITLES, and
then selecting a display choice. For additional formatting, select MORE PRIMARY VERTICAL (OR
HORIZONTAL) AXIS TITLES OPTIONS.
EXERCISE: FORMATTING THE AXES TITLES
1. Click the AXIS TITLES button and select PRIMARY HORIZONTAL AXIS TITLE.
2. Select TITLE BELOW AXIS.
3. Click in the AXIS TITLE text box and replace the text “AXIS TITLE” with SALESPERSON.
4. Next, click the AXIS TITLES button and select PRIMARY VERTICAL AXIS TITLE.
5. Click in the AXIS TITLE text box and replace the text “AXIS TITLE” with MONTHLY SALES.
16
FORMATTING GRIDLINES
By default, charts created in Excel 2016 will have Primary Horizontal gridlines for major chart
tracking units. These gridlines can be formatted or deleted entirely. Also, Vertical gridlines can
be added to the chart. Gridlines can be selected by clicking the GRIDLINES button and
selecting either PRIMARY HORIZONTAL or PRIMARY VERTICAL GRIDLINES, and then selecting a
display choice. For additional formatting, select MORE PRIMARY VERTICAL (OR HORIZONTAL)
GRIDLINES OPTIONS.
You may also right-click directly on a GRIDLINE and select FORMAT GRIDLINES from the menu.
ADDING A DATA TABLE
A Data Table is a table that displays all the ranges and labels that were used to create a chart.
Data tables are useful when you want to explain the details of a chart during a presentation, or
when exact figures need to be shown. Data tables are placed below the chart and can include a
legend key.
EXERCISE: ADDING A DATA TABLE
1. Click the DATA TABLE button.
2. Select SHOW DATA TABLE.
17
ADDING DATA LABELS
Data Labels display the exact values of the data in a chart next to the graphic objects they
represent. These values help add clarity to the chart. Data labels can be added to any chart
type, but they are usually used for pie charts, due to space limitations.
To add a Data Label to a chart, click the DATA LABELS button . Then, select a placement choice.
For additional formatting, select MORE DATA LABEL OPTIONS.
ADDING A TRENDLINE
Because of the varying height of the bars in a column chart, it is sometimes difficult to
determine the general direction of the action. Excel enables you to quickly add a Trendline to a
data series. A trendline has the effect of smoothing out the rough spots in a chart and gives you
a better picture of the data series.
To add a Trendline to a chart, click the TRENDLINE button. Then select a trendline style. The
ADD TRENDLINE window will open. Select the SERIES you wish to base the trendline on and
click OK. You can also click on the data series directly in the chart.
EXERCISE: ADDING A TRENDLINE
1. Click the TRENDLINE button. The ADD TRENDLINE window will open.
2. Select JAN and click OK.
3. To remove the trendline, click the TRENDLINE BUTTON. Then select NONE.
APPLYING CHART THEMES
In addition to the built-in Chart Styles featured on the DESIGN tab, there are a number of built
in Themes, located on the PAGE LAYOUT tab, that can be applied to instantly format your chart.
CHANGING COLORS OF INDIVIDUAL DATA SERIES
You can choose to customize the color or style of an individual Data Series to highlight the
series within a chart by selecting and formatting the series.
1. Click the March data series. Then, select Format Data Series.
o After selecting a series, click once on a single item in the series to select just
that one data series.
2. Select Fill under series options.
3. Select Solid Fill.
4. Click the color button,
,and select red from the color-picker.
18
INSERTING GRAPHICS ELEMENTS IN YOUR DATA SERIES
1.
2.
3.
4.
5.
Create a bar or column chart and select one of the data series.
Right click and select Format Data Series.
Select fill, picture or texture fill.
Select file or online and, then, select an image.
Select stack.
(snow in january, february, and
march; rain in april and may.)
CREATING A COMBINATION CHART
Change one of the axis in a bar chart to a line chart
1. Select the data series that you want to change.
2. Right click and select change series chart type.
3. Select line and choose a line chart type.
4. press ok, and the line appears over the top of the other series bar.
19
PIE OF PIE CHART
To make smaller slices more visible in a pie chart, Excel provides the PIE OF PIE and BAR OF PIE
chart sub-types.
1. Create the data that you want to use as follows:
2. Select the data range, in this example, highlight cell A2:B9. Click Insert > Pie > Pie of
Pie or Bar of Pie:
3. And you will get the following chart:
20
4. You can add the data labels for the data points of the chart; select the pie chart and
right click, choose Add Data Labels:
5. Right-click and choose Format Data Series from the context menu
6. In the Format Data Series dialog, click the drop down list beside Split Series By to
select Percentage value, then set the value you want to display in the second pie, in this
example, choose 10% .
21
7. Close the dialog box:
If you created the Bar of pie chart, you will get the following:
ADD BACKGROUND PICTURE
If you want to add a picture or your company’s logo as background to the chart:
1. Select your chart and right click, then choose Format Chart Area.
2. Check Picture or texture fill radio button under Fill option, click File or Clipboard or Clip
Art button under Insert from section to select a picture or clip art, change the
transparency.
22
PIVOT TABLES
A pivot table allows you to extract the significance from a large, detailed data set.
To insert a pivot table:
1. Click any single cell inside the data set.
2. On the Insert tab, click PivotTable.
The following dialog box appears. Excel automatically selects the data for you. The default
location for a new pivot table is New Worksheet.
3. Click OK.
23
24
PIVOT CHART
A pivot chart is the visual representation of a pivot table in Excel. Pivot charts and pivot tables
are connected with each other.
By design, a Pivot Chart never displays data from the Grand Total column of a Pivot Table. The
Select Data button on the Pivot Chart Tools/Design tab does not allow the user to reselect the
Source data to include the Grand Total column. The only option left in this case is to copy the
Pivot Table and paste it as Paste Special > Values in another range and then create a chart from
this data. But in doing so, any change in the slicer or Base data will not have any effect on the
Chart because the source of the Chart is a static range.
25
POWER PIVOT
Power Pivot is an add-in you can use to perform powerful data analysis in Excel. The add-in is
built into certain versions of Excel, but by default, it's not enabled. Here’s how you enable
Power Pivot before using it for the first time:
1. Go to File > Options > Add-Ins.
2. In the Manage box, click COM Add-ins> Go.
3. Check the Microsoft Office Power Pivot box, and then click OK. If you have other
versions of the Power Pivot add-in installed, those versions are also listed in the COM
Add-ins list. Be sure to select the Power Pivot add-in for Excel.
The ribbon now has a Power Pivot tab.
Go to the base data spreadsheet. Click to select a data cell, then click Insert, Table.
Select all the data.
On the PowerPivot tab, select Add to Data Model.
In PowerPivot, right-click to enter a new sheet name, instead of ‘Table 1’.
Add a new column with a formula to select the year from the Date field, and, then, right-click
on the column heading to rename the column.
26
Create a PivotTable from this table.
Insert a few rows above the PivotTable; add an Obj slicer.
Select the entire PivotTable, copy and, then, paste a few rows below the PivotTable.
Select any cell in the copied PivotTable, from the Analyze->OLAP Tools button, select Convert
to Formulas.
Filter the data using the Obj slicer; the values in both Tables should change.
27
Select the columns for the chart, and insert a chart.
When you filter the data using the slicer, the chart automatically updates.
28