Вы находитесь на странице: 1из 26

MICROSOFT OFFICE EXCEL 2007

Creating and Modifying Charts

LearnIT Instruction
Classroom
C
ass oo Personal
e so a Coaching
Coac g Se
Self-Study
Study

INTEGRATED TECHNOLOGY SERVICES

LearnIT INSTRUCTION

Microsoft Oce Excel 2007 - Creating and Modifying Charts


2009 Information Technology Services
This instruction booklet has been developed by IT Instruction Services to teach enterprise desktop applications to the Fredericton
and Saint John UNB Communities.
Written for classroom instruction it is also distributed and available for on-line self-study purposes via the LearnIT Instruction
Blackboard where youll find additional and relevant resources for further study and practice; including valuable links.

To register for currently scheduled courses:


Classroom: www.unb.ca/CTD
On-line:
Instructional Services Blackboard
Self-enroll @ https://eservices.unb.ca/
datatel/blackboard/autoenroll/
________________________________________
Welcome

IT Instruction Services may be contacted directly:


Email:
LearnIT@unb.ca
Phone:
453-4608

Microsoft Oce Excel 2007 provides users with an easy way to turn raw data into meaningful information through the use of
charts. Charts are an eective way to communicate information because they present data in a form that is easy to understand,
and visually appealing.
Course Description & Objective:
In the Microsoft Oce Excel 2007 Creating and Modifying Charts course you will learn how to create an Excel chart and how to
modify that chart to best suit its needs.
This course is designed for users who will be using the charts application of Microsoft Oce Excel for the first time, and those who
have limited experience with the program. This course covers the commonly used chart features for a typical user.

Class Length: 2 hours w/break


_______________________________________
Attend this course if you want to:
Use charts to communicate information.
Create charts quickly and easily.
Modify charts and their objects.
Present your data in an appealing way.
Print your charts.
________________________________________
Delivery Options:
Virtual classroom - Sta, Faculty, Students
Virtual classroom - One-on-one Departmental Group
Self-Study - Blackboard LearnIT INSTRUCTION
Self-enroll @ https://eservices.unb.ca/datatel/blackboard/autoenroll/
________________________________________

Microsoft Oce Excel 2007

TABLE OF CONTENTS
INTRODUCTION ------------------------------------------------------------------------------------------------------------------------------------1
1. CHART OBJECTS ---------------------------------------------------------------------------------------------------------------------------------2
2. CHOOSING THE RIGHT CHART TYPE -------------------------------------------------------------------------------------------------------3
3. CREATE A CHART --------------------------------------------------------------------------------------------------------------------------------4
4. CHART TOOLS RIBBON ------------------------------------------------------------------------------------------------------------------------5
5. CHART DESIGN ----------------------------------------------------------------------------------------------------------------------------------5
6. CHART LAYOUT ----------------------------------------------------------------------------------------------------------------------------------6
7. CHART FORMATTING --------------------------------------------------------------------------------------------------------------------------7
8. EDITING CHART DATA ------------------------------------------------------------------------------------------------------------------------8
9. ENHANCING CHARTS ------------------------------------------------------------------------------------------------------------------------ 10
9.1 Chart-making Tips .............................................................................................................................................................11
9.2 Handling Missing Data .......................................................................................................................................................11

10. CHART EXAMPLES --------------------------------------------------------------------------------------------------------------------------- 13


10.1 Charting Progress toward a Goal......................................................................................................................................13
10.2 Creating a Gauge Chart ....................................................................................................................................................14
10.3 Creating a Comparative Histogram ..................................................................................................................................15
10.4 Creating a Creating a Gantt Chart ....................................................................................................................................16
10.5 Working with Trendlines ..................................................................................................................................................17
Linear Trendlines
Calculating the Slope and Y-Intercept
Calculating Predicted Values
Linear Forecasting
Calculating R-Squared

LearnIT INSTRUCTION |

Creating & Modifying Excel Charts

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

INTRODUCTION
Before embarking on a journey through Excel charting, it is important to do some thinking and planning first. Know
what you want to show and why. Keep it simple and clear. Target your audience. Here are a few suggestions.

Keep in mind the message you want to get across, dont be distracted by all the data at your disposal or all the
fancy chart types Excel provides.

Try to avoid 3-D style charts, because these styles can truly distort the data... unless thats your intention.

Stick to black & white and readily reproducible shades of gray, if the chart is going to be photocopied, and
especially if it is going to be faxed. If you decide to use colors, keep it simple: pick a few colors that go well
together, maybe the basic primary colors. Stay away from gradient fills and vibrating color combinations.

KISS - Keep It Simple Sam. Dont make a chart too cluttered. Limit the number of series and categories. Make
labels clear and concise. Maybe two simpler charts will be more clear than one complex chart. If you have lots of
things to put in a pie chart, try the pie-in-pie or bar-in-pie options.

Know your audience. A roomful of engineers will understand a log scale axis without any problem and could
probably handle greater complexity in a chart. If the chart is in a prospectus for potential investors, it should have
only a few series and categories, and labels should be short and free of jargon and acronyms.

Two simple charts might be more informative than one. Two charts can get across paired ideas with less
clutter than one complex combination chart. On the other hand, combining data onto a single chart may have
advantages: rather than placing four pie charts on a page, a stacked bar chart allows easier comparison among
several categories.

WHEN SHOULD YOU USE A CHART?


Use a chart whenever you want to visualize your data,
making it clear and simple to comprehend.
Sometimes one glimpse at a chart can save a lot of
eort of figuring out the meaning of your data.
LearnIT INSTRUCTION |

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

1. CHART OBJECTS
Chart Title

Gridline

Primary Vertical
Axis Title

Data Series

Primary Vertical
Axis

Legend

Pr
Primary
Horizontal
Axis

orizontal
Primary Horizontal
Axis Title

Charts are composed of a variety of objects that can be individually edited based on your preferences.
The data you have selected from the Excel worksheet. As a group, the selected data
Data Series:
forms the data series
Title: A descriptive name identifying the purpose of the chart
Vertical & horizontal lines behind the chart that allow you to easily view and
Gridlines:
evaluate the data.
Legend: A key that identifies the patterns or colors assigned to the data series.
Primary Horizontal Axis: Column or row headings from the selected data.
Primary Horizontal Axis Title: A descriptive name identifying the primary horizontal axis.
Primary Vertical Axis: Scale representing the lowest and highest numbers in the selected data.
Primary Vertical Axis Title: A descriptive name identifying the primary vertical axis.

Good
to
Know!

If you are unsure of the name of an object in your chart, place your cursor on the object, and the
name of it will appear in a temporary text box next to your cursor.

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

2. CHOOSING THE RIGHT CHART TYPE


Excel oers 11 dierent types of charts, each with a variety of styles to help you develop a chart that best suits your
data.
Column Charts: Illustrates changes in data over periods of time and comparisons among data series.
Bar Charts: Illustrates comparisons among individual items in a horizontal chart.
Illustrates trends in data at equal intervals in a line and dot format. Ideal for showing
Line Charts:
changes over time.
Illustrates the size of the items that make up a single data series. Ideal for showing
Pie Charts:
percentages of a whole.
Illustrates relationships among numerical values in several data series or plots 2 groups of
XY(Scatter) Charts:
values as a series of xy-coordinates. Ideal for scientific data.
Area Charts: Illustrates changes over time with emphasis on the magnitude of the change.
Doughnut Charts:. Illustrates the relationship of parts to a whole and can be used for multiple data sets
Radar Charts: Illustrates separate axes for each data set radiating out from a center.
Illustrates how 3 sets of data interact. Ideal for finding optimum combinations between 2
Surface Charts:
data sets.
A type of scatter plot that compares 3 sets of data where the bubble size indicates the size
Bubble Charts:
of the third variable.
Stock Charts: Ideal for tracking stock market activity or entering scientific data.

Charts are used to present complex data and information in a simple & compact form. Each
dierent type of chart is best-suited for communicating certain data types, thus it is a good idea
to familiarize yourself with the dierent types of charts before creating one.
TIP
LearnIT INSTRUCTION |

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

3. CREATE A CHART
Lets insert and create a chart:
1. Open the ChartCreate_start
workbook, Cost Data
worksheet and select the data
you want to plot in the chart.
2. Click the Insert tab.

3. Click on the type of chart that


you want to create from the
Charts Group, and then select
the chart subtype.
4. A chart will appear on your
worksheet as an embedded
chart.
5. Click on the Change Chart
Type icon to try a few
dierent types to see the how
and what chart information is
displayed.

Good
to
Know!

When selecting your data, include any


heading and labels, but do not include
any totals or subtotals.

Charts Group

Good
to
Know!

You can move the chart to a new


worksheet if you do not want it
embedded in the one you are currently
in. Chart Tools > Design > Move Chart

To make a selection from all Excel chart types, click the


Charts Dialog Box Launcher.

Good
to
Know!

The data you select for your chart


does not have to be adjacent. Select
non-contiguous cells by selecting
the first range and then pressing and
holding the Ctrl key while selecting
additional ranges to include.

To create a default chart type that will apply every time you inse
insert a chart in Excel, select the chart
type and subtype that you want to set as a default, and click
li k Set
S t as Default Chart in the Chart Dialog
TIP Box.

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

4. CHART TOOLS RIBBON


When you insert a chart, the chart tool options will appear in the ribbon. The chart tool options consist of 3 tabs:
Design, Layout and Format.

Design: The design tab allows you to change your chart


h t type,
t
layout
l
t and
d style,
t l as wellll as providing
idi you with the
option to move your chart.
Layout: The layout tab allows you to modify the chart objects, such as labels, axes and background, as well as insert
pictures, shapes and text.
Format: The Format tab allows you to modify the shape styles, text styles, arrangement and size of your chart
objects.

5. CHART DESIGN

On the Design tab you will find tools to customize and manipulate your chart design:
1. Change Chart Type: as discussed above
2. Save as Template: To reuse a favorite chart that you have created, you can save that chart as a template rather
than continually recreating it by simply selecting your chart and clicking the Save As Template button.
3. Switch Row/Column: does exactly that in the click of a button. Try it
out to see the dierent chart displays.
4. Select Data: Lets you choose a dierent source range that is the
basis for the existing chart. You also can use this dialog box to switch
the row and column values, change the order of the data series used
in the chart, and indicate how to deal with hidden and empty cells in
the data range being charted.
5. Chart Layouts: From here you
may select quick and easy
clickable chart layout options.
6. Chart Styles: To make your
charts more appealing and
visually informative choose
a chart style that best suits
your presentation needs.

TIP

When resizing a chart, if you want the


size to remain proportional, use a corner
handle.

7. Move Chart: Click on Move


Chart to move your chart
to another worksheet
in your workbook.
LearnIT INSTRUCTION |

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

6. CHART LAYOUT
The Chart Layout tab displays various chart element options that you can select then change, enhance, add or delete.
In addition to inserting pictures and shapes, adding and/or changing labels, axes, gridlines and the background there
are also options so perform analysis on your displayed chart. We will discuss these dierent elements here.

1. Current Selection: This grouping of commands enables you to select a chart element, format it and/or reset its
changed style to match the Microsoft Oce style in use.
2. Insert: You may insert pictures, shapes and text boxes into your charts.
3. Labels: The labels in this grouping include the chart title, axis title, legend, data labels and data table elements.

For all labels simply select whether on not you want to show the label/table, select the location you want
to place the label and in some cases select its rotated, vertical, horizontal, inside/outside, below/above
formatting options. Note that each option oers more customizable options to tweak.

4. Axes: In this grouping you can choose how to display your vertical and horizontal axis and what visual gridline
display (line style and color) you would like for your chart. Both oer more customizable options.
5. Background: Here change the Chart Wall and Chart Floor coloring options and if you are modifying a 3-D chart
you can edit the charts pre-set 3-D rotation configurations.
6. Analysis: Use these tools if you would like to add some analysis visual display layout options.
7. Properties: In the properties grouping you may select the current chart name and change it to a name you prefer.

Using what you now know from above, and using the Cost Data worksheet, produce the chart shown below.

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

7. CHART FORMATTING

You can change the format of any individual chart element using the options shown on the Format tab of the Chart
Tools. Depending on what it is you would like to do you can change the shape style, add WordArt, arrange your
objects and size using the size properties options.
In the Cost Data worksheet, lets make the following few changes.

1. Click on the Chart Tools > Format tab.


2. Select the Salaries for the first year and using the Shape Styles drop down options change the style of
this element to Intense Eect - Accent 6.
3. Select the title and apply WordArt Style Gradient Fill Accent 1, Outline - White, Glow - Accent 1.
4. Change the font of the Primary Vertical Axis Title to Red.
5. Show the major vertical gridlines.
6. Change the background to the pink tissue paper.
7. Quickly change your chart to a pie chart. Click and drag on the largest pie piece to explode a single slice.
Drag and drop the slice back to the center to bring the pie together again.
8. Change the chart type back to a clustered cylinder.
9. Select the First Year Cost chart series by selecting any of one of its elements. Change the Chart shape to
a full cone. Format Selection > Shape.
10. Change the chart to a line chart and add a trendline from the analysis grouping.
11. Change the chart type back to a clustered cylinder.
12. From Insert Shapes, add a yellow start to your chart.
13. Change the Parts and materials First Year Cost to say 325,000.00
As you can see there are many customizations you can make by using the Format and Layout tabs. When
you need to place emphasis on any chart element use these two tabs to do so.

LearnIT INSTRUCTION |

Microsoft Oce Excel 2007

Good
to
Know!

Creating & Modifying Excel Charts

You can convert a chart to a picture.


Select the chart. Click on the Home tab. Click the Paste down-arrow button.
Point to As Picture and select Copy as Picture.
Go to your new Excel location and click Paste as Picture OR Paste into another application.
This is great for a presentations.
The file size is small and no one cannot change the chart contents.

8. EDITING CHART DATA


A chart consists of one or more data series, and each data series appears as a line, column, bar and so on. When you
select a data series in a chart, Excel highlights the data with an outline and its Series formula appears in the formula
bar. A data series identifies the information charted. For example, a data series may contain the First and the Second
Year Costs as shown in our example. Another data series may contain the Third Year Forecasted Costs.
A data range is a range of cells that contain data in a data series. If your chart is already completely customized and
you find you have to add more data, try this:

1. Create a clustered cylinder chart by selecting B2 to C11 in the Cost Data worksheet.
2. From the Data group under the Design tab, click on the Select Data button to open the Select Data
Source dialog box. Note that the Series and Categories have not been assigned names.

1.
2.
3.
4.
5.
6.
7.

Select Series1 > Edit. Click the collapse dialog box button and select First Year Cost. OK
K
Repeat to name Series2
To label the Horizontal Axis Labels click Edit > and Select the Cost Center titles.
Click Add to add a Legend Entries series and add Third Year Cost
Click the Horizontal Category Axis Labels Edit button to add the Cost Center titles
Click OK to return to the chart.
Remove the Third Year Cost Series

LearnIT INSTRUCTION

Creating & Modifying Excel Charts


Microsoft Oce Excel 2007
You can edit chart data in your worksheet cell by cell, or you can edit a range of data from the chart itself. You may
also change the following data properties:

Switch Row/Column to switch the data series plotted on the chart from rows or columns.

Edit: Click the appropriate edit button to make changes to a data series, or to the axis titles.

Remove: Select a data series and click this button to remove it from the chart.

Move Up/Move Down: Click the appropriate arrow button to switch the order of the data series as they appear
on your chart.

Hidden & Empty Cells: Click this button to change the way Excel displays hidden data and empty cells in your
chart.

Good
to
Know!

The data you select for your chart does not have to be adjacent. Select noncontiguous cells by selecting the first range and then pressing and holding
the Ctrl key while selecting additional ranges to include.

LearnIT INSTRUCTION |

Microsoft Oce Excel 2007

9. ENHANCING CHARTS

1. Select A1 to B4 and create a pie in 3-D chart.


2. From the Design > Chart Styles select Style 26
3. Click on Layout > 3-D Rotation and change the X
Rotation to 70 degrees and the Y to 40 degrees
4. Explode the Parts and materials slice (Doubleclick and drag)
5. Format the Parts and materials shape with a
picture (Shape Fill)

Right-click any chart component to display this pop-up menu.


Click on Format Data Labels and Format Data Series options to
view the various chart options. The formatting controls in the
Format dialog box enable you to perform actions that arent
available in the Ribbon.

10

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

9.1 Chart-making Tips

To create a chart with a single keystroke, select the data you want to chart and press Alt+F1. The result is an
embedded chart of the default chart type.

Right-click any chart element and choose Format xxxx, where xxxx represents the elements name (or press
Ctrl+1). Excel displays its Format dialog box, which remains open until you close it. The formatting controls in the
Format dialog box enable you to perform actions that arent available in the Ribbon.

If you have many charts of the same type to create, create and format the first chart and make a template from
that chart by choosing Chart Tools > Design > Type > Save as Template. When you create your additional charts,
use Insert > Charts > Other Charts > All Chart Types, and then choose your template from the list.

To print an embedded chart on a separate sheet of paper, select the chart and choose Oce button > Print. Excel
prints the chart on a page by itself and does not print the worksheet.

If you dont want a particular embedded chart to appear on your printout, select the chart and click the dialog
box launcher in the Chart Tools > Format > Size group to display the Size And Properties dialog box. Click the
Properties tab and remove the check mark from the Print Object check box.

Sometimes, using a mouse to select a particular chart element is tricky. You may find it easier to use the keyboard
to select a chart element. When a chart is activated, press the up arrow or down arrow to cycle through all parts
in the chart. When a data series is selected, press the right arrow or left arrow to select individual points in the
series.

Or, select the chart element by using the Chart Tools > Format Chart Elements drop-down control in the
Current Selection Group. This control is useful for selecting chart elements, and it also displays the name of
the selected element. Better yet, put this control in your Quick Access toolbar so its always visible.

For more control over positioning your chart, press Ctrl while you click the chart. Then use the arrow keys to move
the chart 1 pixel at a time.

9.2 Handling Missing Data


Sometimes, data that youre charting may be missing one or more data points. As shown in the accompanying figure.

LearnIT INSTRUCTION |

11

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

Excel oers three ways to handle the missing data:


1. Gaps: Missing data is simply ignored, and the data series will have a gap. This is the default.
2. Zero: Missing data is treated as zero.
3. Connect with Line: Missing data is interpolated-calculated by using data on either side of the missing point(s).
This option is available only for line charts, area charts, and XY charts.
To specify how to deal with missing data for a chart, choose Chart Tools > Design > Data > Select Data. In the Select
Data Source, click the Hidden and Empty Cells button. Excel displays its Hidden and Empty Cell Settings dialog box.
Make your choice in the dialog box. The option that you choose applies to the entire chart, and you cant set a
dierent option for dierent series in the same chart.
Normally, a chart doesnt display data thats in a hidden row or columns. You can use the Hidden and Empty Cell
Settings dialog box to force a chart to use hidden data.

12

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

10. CHART EXAMPLES


10.1 Charting Progress toward a Goal
Youre probably familiar with a thermometer-type display that shows the percentage of a task thats completed.
Creating such a display in Excel is very easy. The trick involves creating a chart that uses a single cell (which holds a
percentage value) as a data series.
The Thermometer Chart shows a worksheet set up to track daily progress toward a goal: 1,000 new customers in a
15-day period. Cell B18 contains the goal value, and cell B19 sums the values in column B. Cell B21 contains a simple
formula that calculates the percent of goal: =B19/B18
As you enter new data in column B, the formulas display the current results.
To make the thermometer chart:
1. Select cell B21 and create a column chart from that single cell. Notice the blank cell above cell B21.
Without this blank cell, Excel uses the entire data block for the chart, not just the single cell. Because
B21 is isolated from the other data, the data series consists of a single cell.
2. Select the horizontal category axis and press Delete to remove the category axis from the chart.

3. Add a chart title. (In the example it is formatted to display at an angle and moved it to the bottom of
the chart.)
4. Remove the legend.
5. Add data labels to the chart to display the percent accomplished.
6. Right-click the Chart. In the Format Data Series dialog box (Series Options tab), set the Gap width to 0,
which makes the column occupy the entire plot area.

7. Right-click the Value Axis and display the


Format Value Axis dialog box. In the Axis
Options tab, set the Minimum to 0 and the
Maximum to 1.

8. Right-click the chart area and click on


Format Plot Area to give the background a
color. In the example it is a gradient silver.
9. You can make other cosmetic changes
as you like. For example, you may want to
change the charts width to make it look
more like a thermometer, as well as adjust
fonts, colors, and so on.
This chart example, named Thermometer,
is available in the ChartCreate workbook.

LearnIT INSTRUCTION |

13

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

10.2 Creating a Gauge Chart


A Gauge Chart is another chart based on a single cell. Its a pie chart set up to resemble a speedometer gauge and
displays a value between 0 and 100 percent. Although this chart displays only one value (entered in cell B1), it actually
uses three data points (in A4:A6).
One slice of the pie -the slice at the bottom-always consists of 50 percent, and that slice is hidden (by using the No Fill
and No Outline settings). The Format Data Series Rotation is set at 270.
The other two slices are apportioned based on the value in cell B1. The formula in cell A4 is
=MIN(B1,100%)/2
This formula uses the MIN function to display the smaller of two values: either the value in cell B1 or 100 percent. It
then divides this value by 2 because only the top half of the pie is relevant. Using the MIN function prevents the chart
from displaying more than 100 percent.
The formula in cell A5 simply calculates the remaining part of the pie-the part to the right of the gauges needle:
=50%-A4
The charts title was moved below the half-pie. The chart also includes data labels. Two of the data labels have been
deleted and a link was added to the remaining one so that it displays the percent completed value in cell B1. By
editing the individual data label specify a link to a cell by typing an equal sign and clicking a cell to create a reference
formula (such as =Sheet1!$A$1). In our example: =Gauge!$B$1
This chart example, named Gauge, is available in the ChartCreate workbook.

14

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

10.3 Creating a Comparative Histogram


With a bit of creativity, you can create charts that you may have considered impossible. For example, the chart below
shows a chart sometimes referred to as a comparative histogram chart. Such charts often display population data.
Heres how to create the chart:
1. Enter the data in A1:C8, as shown. Notice that the values for females are entered as negative values,
which is very important.
2. Select A1:C8 and create a bar chart. Use the subtype labeled Clustered Bar.
3. Select the horizontal axis and display the Format Axis dialog box.
4. Click the Number tab and specify the following custom number format:

0%;0%;0%

This custom format eliminates the negative signs in the percentages.

5. Select the vertical axis and display the Format Axis dialog box.
6. In the Axis Options tab, set all tick marks to None and set the Axis Labels option to Low. This setting
keeps the vertical axis in the center of the chart but displays the axis labels at the left side.
7. Select either of the data series and display the Format Data Series dialog box.
8. In the Series Options tab, set the Series Overlap to 100% and the Gap Width to 0%.
9. Delete the legend and add two text boxes to the chart (Females and Males) to substitute for the legend.
10. Apply other formatting and labels as desired.
This chart example, named Histogram, is available in the ChartCreate workbook.

LearnIT INSTRUCTION |

15

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

10.4 Creating a Creating a Gantt Chart


A Gantt chart is a horizontal bar chart often used in project management applications. Although Excel doesnt support
Gantt charts per se, creating a simple Gantt chart is fairly easy. The key is getting your data set up properly.
Below is a Gantt chart that depicts the schedule for a project, which is in the range A2:C13. The horizontal axis
represents the total time span of the project, and each bar represents a project task. The viewer can quickly see the
duration for each task and identify overlapping tasks.
Column A contains the task name, column B contains the corresponding start date, and column C contains the
duration of the task, in days.
Follow these steps to create this chart:
1.
2.
3.
4.
5.
6.

7.
8.
9.

10.

Select the range A1:C13 and create a Stacked Bar Chart.


Delete the legend.
Select the category (vertical) axis, and display the Format Axis dialog box.
In the Format Axis dialog box, specify Categories in Reverse Order to display the tasks in order, starting
at the top. Choose Horizontal Axis Crosses at Maximum Category to display the dates at the bottom.
Select the Start Date data series, and display the Format Data Series dialog box.
In the Format Data Series dialog box, click the Series Options tab and set the Series Overlap to 100%.
Click the Fill tab, and specify No Fill. Click the Border Color tab and specify No Line. These steps
eectively hide the data series.
Select the value (horizontal) axis and display the Format Axis dialog box.
In the Format Axis dialog box, adjust the Minimum and Maximum settings to accommodate the dates
that you want to display on the axis.
Unfortunately, you must enter these values as date serial numbers, not actual dates. In this example,
the Minimum is 39181 (April 9, 2007) and the Maximum is 39261 (June 28, 2007). Specify 7 for the
Major Unit, to display one week intervals. Use the number tab to specify a date format for the axis
labels.
Apply other formatting as desired.

This chart example, named Gantt, is available in the ChartCreate workbook.

16

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

10.5 Working with Trendlines


With some charts, you may want to plot a trendline that describes the data. A trendline points out general trends
in your data. In some cases, you can forecast future data with trendlines. A single series can have more than one
trendline.
To add a trendline, select the chart series and then choose Chart Tools > Layout > Analysis > Trendline. This dropdown control displays options for four types of trendlines. For additional options (and more control over the trendline)
choose More Trendline Options, which displays the Trendline Options tab of the Format Trendline dialog box.

The Format Trendline dialog box oers several


types of automatic trendlines.
The type of trendline that you choose depends
on your data. Linear trends are the most
common type, but you can describe some
data more eectively with another type.
Besides linear trendlines, an Excel chart can
display trendlines of the following types:
Logarithmic: Used when the rate of change in
the data increases or decreases quickly, and
then flattens out.
Power: Used when the data consists of
measurements that increase at a specific rate.
The data cannot contain zero or negative values.
Exponential: Used when data values rise or fall at increasingly higher rates. The data cannot contain zero or negative
values.
Polynomial: Used when data fluctuates. You can specify the order of the polynomial (from 2 to 6) depending on the
number of fluctuations in the data.
The Trendline Options tab enables you to specify a name to appear in the legend and the number of periods that you
want to forecast (if any). Additional options enable you to set the intercept value, specify that the equation used for
the trendline should appear on the chart, and choose whether the R-squared value appears on the chart.
When Excel inserts a trendline, it may look like a new data series, but its not. Its a new chart element with a name,
LearnIT INSTRUCTION |

17

Microsoft Oce Excel 2007


Creating & Modifying Excel Charts
such as Series 1 Trendline 1. And, of course, a trendline does not have a corresponding SERIES formula.

Linear Trendlines
Below there are two charts. The chart on the left depicts a data series without a trendline. As you can see, the data
seems to be linear over time. The chart on the right is the same chart but with a linear trendline that shows the
trend in the data.
The second chart also uses the options to display the equation and the R-squared value. In this example, the equation
is as follows:
y = 53.19x + 514.9

The R-squared value is 0.674

What do these numbers mean? You can describe a straight line with an equation of the form: y = mx +b
For each value of x (the horizontal axis), you can calculate the predicted value of y (the value on the trendline) by using
this equation. The variable m represents the slope of the line and b represents the y-intercept. For example, when x is
3 (for March) the predicted value of y is 674.47, calculated with this formula: =(53.19*3)+514.9

18

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

Microsoft Oce Excel 2007

The R-squared value, sometimes referred to as the coecient of determination, ranges in value from 0 to 1. This value
indicates how closely the estimated values for the trendline correspond to the actual data. A trendline is most reliable
when its R-squared value is at or near 1.

Calculating the Slope and Y-Intercept


As you know, Excel can display the equation for the trendline in a chart. This equation shows the slope (m) and
y-intercept (b) of the best-fit trendline. You can calculate the value of the slope and y-intercept yourself, using the
LINEST function in a formula.
The figure above shows 10 data points (x values in column B, y values in column C).
The formula that follows is a multicell array formula that displays its result (the slope and y-intercept) in two cells:
{=LINEST(C2:C11,B2:B11)}

1. To enter this formula, start by selecting two cells (in this example, G2:H2).
2. Then type the formula (without the curly brackets), and press Ctrl+Shift+Enter.
3. Cell G2 displays the slope; cell H2 displays the y-intercept.

Calculating Predicted Values


After you know the values for the slope and y-intercept, you can calculate the predicted y value for each x. Cell E2
contains the following formula, which is copied down the column:
=(B2*$G$2)+$H$2
The calculated values in column E represent the values used to plot the linear trendline.
You can also calculate predicted values of y without first computing the slope and y-intercept. You do so with an array
formula that uses the TREND function.
1. Select D2:D11, type the following formula (without the curly brackets), and press Ctrl+Shift+Enter:

{=TREND(C2:C11,B2:B11)}

Linear Forecasting
When your chart contains a trendline, you can instruct Excel to forecast and plot additional values. You do this on the
Trendline Options tab in the Format Trendline dialog box. Just specify the number of periods to forecast. The chart
forecasts results for two subsequent periods.
If you know the values of the slope and y-intercept you can calculate forecasts for other values of x. For example, to
calculate the value of y when x = 11 (November), use the following formula:
=(53.194*11)+514.93
You can also forecast values by using the FORECAST function. The following formula, for example, forecasts the value
for November (that is, x = 11) using known x and known y values:
=FORECAST(11,C2:C11,B2:B11)

LearnIT INSTRUCTION |

19

Microsoft Oce Excel 2007

Creating & Modifying Excel Charts

Calculating R-Squared
The accuracy of forecasted values depends on how well the linear trendline fits your actual data. The value
of R-squared represents the degree of fit. R-squared values closer to 1 indicate a better fit-and more accurate
predictions. In other words, you can interpret R-squared as the proportion of the variance in y attributable to the
variance in x.
As described previously, you can instruct Excel to display the R-squared value in the chart. Or you can calculate it
directly in your worksheet using the RSQ function. The following formula calculates R-squared for x values in B2:B11
and y values for C2:C11.
=RSQ(B2:B11,C2:C11)
Caution The value of R-squared calculated by the RSQ function is valid only for a linear trendline.
This chart example, named Trendline, is available in the ChartCreate workbook.

20

LearnIT INSTRUCTION

Creating & Modifying Excel Charts

LearnIT Instruction
Integrated Technology Services
University of New Brunswick

D12 Head Hall


15 Dineen Drive
www.unb.ca/ITS

PO Box 4400
Fredericton, NB
Canada E3B 5A3

Contact:
Tel:
Fax:
Email:

Sherry Rose
(506) 453-4608
(506) 453-3590
LearnIT@unb.ca

Services - Solutions - Strategy


You may log directly into the LearnIT Instruction via Blackboard @ URL: https://learning.unb.ca to access
this or other course resource folders.
If you do not currently have access to LearnIT Instruction via Blackboard you may self-enroll @

https://eservices.unb.ca/datatel/blackboard/autoenroll/
Requests for additional topics; to highlight corrections or to forward recommendations for improvements to
be made to this document; and/or, to oer any comments in general, please email LearnIT@unb.ca.
Your suggestions and comments are welcome.
Thank you.
Note:

Users must be registered to participate in online LearnIT self-paced / self-study Instruction via Blackboard.
Self-enrollment may be performed at: https://eservices.unb.ca/datatel/blackboard/autoenroll/

FOR INTERNAL PURPOSES

Вам также может понравиться