0% found this document useful (0 votes)
130 views

Chapter 7

Uploaded by

B 73 Akshat Vora
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

Chapter 7

Uploaded by

B 73 Akshat Vora
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Groups and Subtotals

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.

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 to the left of the worksheet. In our example, we'll switch
between all three levels in our outline. While this example contains only three levels, Excel
can accommodate up to eight.
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.
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.

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.

The Subtotal dialog box will appear. Click Remove All.

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.

Select a table style from the drop-down menu.


A dialog box will appear, confirming the selected cell range for the table.
If your table has headers, check the box next to My table has headers, then click OK.

The cell range will be formatted in the selected table style.


Tables include filtering by default. You can filter your data at any time using the drop-down
arrows in the header cells. To learn more, review our lesson on Filtering Data.
Modifying tables
It's easy to modify the look and feel of any table after adding it to a worksheet. Excel
includes many different options for customizing a table, including adding rows or
columns and changing the table style.
To add rows or columns to a table:
If you need to fit more content into your table, Excel allows you to modify the table size by
including additional rows and columns. There are two simple ways to change the table size:
Enter new content into any adjacent row or column. The row or column will be roped into
the table automatically.

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 applied.

To modify table style options:


You can turn various options on or off to change the appearance of any table. There are
several options: Header Row, Total Row, Banded Rows, First Column, Last
Column, Banded Columns, and Filter Button. Select any cell in your table, then click
the Design tab.
Check or uncheck the desired options in the Table Style Options group. In our example, we'll
check Total Row to automatically include a total for our table.

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.

The Selected chart will be inserted into the worksheet.

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.

Select the chart you want to modify.


From the Design tab, select the Switch Row/Column command.

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.

Keeping charts up to date


By default, when you add more data to your spreadsheet, the chart may not include the new
data. To fix this, you can adjust the data range. Simply click the chart, and it will highlight
the data range in your spreadsheet. You can then click and drag the handle in the lower-right
corner to change the data range.

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.

To create a conditional formatting rule:


In our example, we have a worksheet containing sales data, and we'd like to see which
salespeople are meeting their monthly sales goals. The sales goal is $4000 per month, so
we'll create a conditional formatting rule for any cells containing a value higher than 4000.
Select the desired cells for the conditional formatting rule.
From the Home tab, click the Conditional Formatting command. A drop-down menu will
appear.
Hover the mouse over the desired conditional formatting type, then select the desired
rule from the menu that appears. In our example, we want to highlight cells that are greater
than $4000.

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.

To use preset conditional formatting:


Select the desired cells for the conditional formatting rule.
Click the Conditional Formatting command. A drop-down menu will appear.
Hover the mouse over the desired preset, then choose a preset style from the menu that
appears.

The conditional formatting will be applied to the selected cells.


To remove conditional formatting:
Click the Conditional Formatting command. A drop-down menu will appear.
Hover the mouse over Clear Rules, and choose which rules you want to clear. In our
example, we'll select Clear Rules from Entire Sheet to remove all conditional formatting
from the worksheet.

The conditional formatting will be removed.


Click Manage Rules to edit or delete individual rules. This is especially useful if you've
applied multiple rules to a worksheet.

You might also like