Chapter 7
Chapter 7
Worksheets with a lot of content can sometimes feel overwhelming and even become
difficult to read. Fortunately, Excel can organize data into 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:
Select the rows or columns you want to group. In this example, we'll select columns B, C,
and D.
Select the Data tab on the Ribbon, then click the Group command.
The selected rows or columns will be grouped. In our example, columns B, C, and D are
grouped.
To ungroup data, select the grouped rows or columns, then click the Ungroup command.
To hide and show groups:
To hide a group, click the minus sign, also known as the Hide Detail button.
The group will be hidden. To show a hidden group, click the plus sign, also known as
the Show Detail button.
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.
To create a subtotal:
In our example, we'll 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.
First, sort your worksheet by the data you want to subtotal. In this example, we'll create a
subtotal for each T-shirt size, so our worksheet has been sorted by T-shirt size from smallest
to largest.
Select the Data tab, then click the Subtotal command.
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.
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.
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. When you're satisfied with your selections,
click OK.
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.
Click the highest level to view and expand all of your worksheet data. In our example, we'll
select level 3.
You can also use the Show and Hide Detail buttons to show and hide the groups within the
outline.
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.
Select the Data tab, then click the Subtotal command.
All worksheet data will be ungrouped, and the subtotals will be removed.
To remove all groups without deleting the subtotals, click the Ungroup command drop-down
arrow, then choose Clear Outline.
Tables
Once you've entered information into your worksheet, you may want to format your data as
a table. 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.
To format data as a table: Select the cells you want to format as a table. In our example,
we'll select the cell range A2:D9.
From the Home tab, click the Format as Table command in the Styles group.
Click and drag the bottom-right corner of the table to create additional rows or columns.
To change the table style:
Select any cell in your table, then click the Design tab.
Locate the Table Styles group, then click the More drop-down arrow to see all available table
styles.
Select the desired table style.
The table style will be modified. In our example, a new row has been added to the table with
a formula that automatically calculates the total value of the cells in column D.
Depending on the type of content you have—and the table style you've chosen—these
options can affect your table's appearance in various ways. You may need to experiment with
a few different options to find the exact style you want.
To remove a table:
It's possible to remove a table from your workbook without losing any of your data.
However, this can cause issues with certain types of formatting, including colors, fonts, and
banded rows. Before you use this option, make sure you're prepared to reformat your cells if
necessary.
Select any cell in your table, then click the Design tab. Click the Convert to Range command
in the Tools group.
A dialog box will appear. Click Yes.
The range will no longer be a table, but the cells will retain their data and formatting.
To restart your formatting from scratch, click the Clear command on the Home tab. Next,
choose Clear Formats from the menu.
Charts
It can be difficult to interpret Excel workbooks that contain a lot of data. Charts allow you to
illustrate your workbook data graphically, which makes it easy to visualize comparisons and
trends.
Understanding charts: Excel has several different types of charts, allowing you to choose
the one that best fits your data. In order to use charts effectively, you'll need to understand
how different charts are used. For Different chart types refer Types of charts in excel.pptx
In addition to chart types, you'll need to understand how to read a chart. Charts contain
several different elements, or parts, that can help you interpret the data.
Click the buttons in the interactive below to learn about the different parts of a chart.
To insert a chart:
Select the cells you want to chart, including the column titles and row labels. These cells will
be the source data for the chart. In our example, we'll select cells A1:F6.
From the Insert tab, click the desired Chart command. In our example, we'll select Column.
Choose the desired chart type from the drop-down menu.
If you're not sure which type of chart to use, the Recommended Charts command will
suggest several different charts based on the source data.
Chart and layout style
After inserting a chart, there are several things you may want to change about the way your
data is displayed. It's easy to edit a chart's layout and style from the Design tab.
Excel allows you to add chart elements—such as chart titles, legends, and data labels—to
make your chart easier to read. To add a chart element, click the Add Chart
Element command on the Design tab, then choose the desired element from the drop-down
menu.
To edit a chart element, like a chart title, simply double-click the placeholder and begin
typing.
If you don't want to add chart elements individually, you can use one of Excel's predefined
layouts. Simply click the Quick Layout command, then choose the desired layout from the
drop-down menu.
Excel also includes several chart styles, which allow you to quickly modify the look and feel
of your chart. To change the chart style, select the desired style from the Chart styles group.
You can also click the drop-down arrow on the right to see more styles.
You can also use the chart formatting shortcut buttons to quickly add chart elements, change
the chart style, and filter the chart data.
Other chart options
There are many other ways to customize and organize your charts. For example, Excel
allows you to rearrange a chart's data, change the chart type, and even move the chart to a
different location in a workbook.
To switch row and column data:
Sometimes you may want to change the way charts group your data. For example, in the
chart below Book Sales data is grouped by genre, with columns for each month. However,
we could switch the rows and columns so the chart will group the data by month, with
columns for each genre. In both cases, the chart contains the same data—it's just organized
differently.
The rows and columns will be switched. In our example, the data is now grouped by month,
with columns for each genre.
To change the chart type:
If you find that your data isn't well suited to a certain chart, it's easy to switch to a new chart
type. In our example, we'll change our chart from a column chart to a line chart.
From the Design tab, click the Change Chart Type command.
The Change Chart Type dialog box will appear. Select a new chart type and layout, then
click OK. In our example, we'll choose a Line chart.
The selected chart type will appear. In our example, the line chart makes it easier to see
trends in sales data over time.
To move a chart:
Whenever you insert a new chart, it will appear as an object on the same worksheet that
contains its source data. Alternatively, you can move the chart to a new worksheet to help
keep your data organized.
Select the chart you want to move.
Click the Design tab, then select the Move Chart command.
The Move Chart dialog box will appear. Select the desired location for the chart. In our
example, we'll choose to move it to a New sheet, which will create a new worksheet.
Click OK.
The chart will appear in the selected location. In our example, the chart now appears on a
new worksheet.
If you frequently add more data to your spreadsheet, it may become tedious to update the
data range. Luckily, there is an easier way. Simply format your source data as a table, then
create a chart based on that table. When you add more data below the table, it will
automatically be included in both the table and the chart, keeping everything consistent and
up to date.
Conditional Formatting
Let's say you have a worksheet with thousands of rows of data. It would be extremely
difficult to see patterns and trends just from examining the raw information. Similar to charts
and sparklines, conditional formatting provides another way to visualize data and make
worksheets easier to understand.
Understanding conditional formatting
Conditional formatting allows you to automatically apply formatting—such as colors, icons,
and data bars—to one or more cells based on the cell value. To do this, you'll need to create
a conditional formatting rule. For example, a conditional formatting rule might be: If the
value is less than $2000, color the cell red. By applying this rule, you'd be able to quickly see
which cells contain values less than $2000.
A dialog box will appear. Enter the desired value(s) into the blank field. In our example,
we'll enter 4000 as our value.
Select a formatting style from the drop-down menu. In our example, we'll choose Green Fill
with Dark Green Text, then click OK.
The conditional formatting will be applied to the selected cells. In our example, it's easy to
see which salespeople reached the $4000 sales goal for each month.
You can apply multiple conditional formatting rules to a cell range or worksheet, allowing
you to visualize different trends and patterns in your data.
Conditional formatting presets
Excel has several predefined styles—or presets—you can use to quickly apply conditional
formatting to your data. They are grouped into three categories:
Data Bars are horizontal bars added to each cell, much like a bar graph.
Color Scales change the color of each cell based on its value. Each color scale uses a two- or
three-color gradient. For example, in the Green-Yellow-Red color scale, the highest values
are green, the average values are yellow, and the lowest values are red.
Icon Sets add a specific icon to each cell based on its value.