Peltier Tech Blog

Excel Chart Add-Ins | Training | Charts and Tutorials | Peltier Tech Blog

 

Main menu:

Peltier Tech Chart Utilities for Excel Peltier Tech Panel Chart Utility Peltier Tech Waterfall Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

 
Excel Dashboards
 

 
Amazon Books
 

Subscribe

Site search

Subscribe

Site search


Recent Posts

Popular Posts

Privacy and License

Privacy Policy

Creative Commons License
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Adding Excel Chart Data

 
by Jon Peltier
Friday, June 5th, 2009
Peltier Technical Services, Inc., Copyright © 2012.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

There are many reasons to add data to an Excel chart. Your data may not be ideally arranged to plot it all in one selection. You may decide after the fact to include more information. You may have received another month’s data to plot. You may be adding dummy data to generate some of the effects described in this blog, such as custom labels or a special axis.

Excel offers many ways to add data to a chart, and almost as many ways to adjust the data which is already in the chart.  I describe them in this blog whenever the need arises, but I thought it would be good to list them all in one place.

Drag and Drop

One of the easiest ways to add data to a chart is to select the range of data, click on the edge, then drag it over and drop it onto the chart.

We see from the highlights in the worksheet that the active chart is populated with the upper block of data (alpha and beta). We want to add the lower block (gamma) to the chart.

Drag and Drop - Before

The first step is to select the data. When you mouse over the edge of the selection, the cursor shows a four-way arrow, indicating that the selection can be dragged elsewhere.

Drag and Drop - Select

When the range is dragged over the chart, the chart outline is highlighted, and a plus sign appears next to the cursor, indicating that the selection can be added to the chart.

Drag and Drop - Drag

When the mouse is released to drop the data, the Paste Special dialog pops up, so you can make sure Excel is going to add the data the way you want it to.

Drag and Drop - Paste Special

Here is the chart with the data added. When the series is selected, we see that the selected range is highlighted to show the series name and Y values. Notice the existing category labels (X values) from the upper range are also highlighted.

Drag and Drop - After

This is a handy technique, even if it is limited to data on the same worksheet that the chart is embedded in. For some reason, though, it has been removed from Excel 2007. There are still many ways to accomplish this task.

Copy Paste Special

Instead of dragging the range and depositing it onto the chart, you can get the same result if you copy the selected range, then select the chart, and use Paste Special. The Paste Special box appears, allowing you to adjust the settings, if necessary. Data copied from another worksheet, even another workbook, can be pasted into a chart.

I never got into the habit of dragging and dropping data onto my charts, so I very frequently use Copy and Paste Special.

Copy Paste

You can also copy the selected range, then select the chart and use Paste. This bypasses the Paste Special dialog, instead applying the default settings without disturbing the user.

Neat Trick with Axis Labels

I learned a new trick this week in Excel Chart Tip – Insert Chart Series in an Excel Chart, by Ajay of the DataBison blog. You can use either the Copy Paste or the Drag and Drop technique to replace the category labels in a chart.

The chart’s source data has to be lined up, as in the chart shown below: the category (X) labels and Y values are all parallel and begin in the same row. It’s not necessary that the Y values be in consecutive order, nor that the category (X) labels be located to the left of the Y values. The Y value and category (X) label ranges can span different numbers of columns as long as they start in the same row.

An alternate set of labels can be used to replace the existing category labels. The new labels must be located in the same alignment as the category (X) labels and Y value, and the new labels have to be text labels, not numerical values.

Drag and Drop - Category Labels

Drag and drop the new label range onto the chart, or copy and paste the labels onto the chart. The new labels replace the existing category labels in the chart.

Drag and Drop - Category Labels

Drag Highlights in Worksheet

As described in Chart Source Data Highlighting and shown above, the source data range of a chart is highlighted in the worksheet. You can click on the corner of this highlighted range (the cursor turns into a multiple arrowhead)

Resize Highlighted Range - Before

and drag it to enclose a different range

Resize Highlighted Range - Before

and the new chart source data will be plotted in the chart.

Resize Highlighted Range - Before

Obviously this technique is limited to data on the worksheet the chart is embedded in.

Add Series Formula

When you add a series to the chart, you add a series formula. Conversely, if you add a series formula, you also add a series. You can just start from scratch and type the whole formula, but it’s easier start with a copy of an existing formula. I think I used series formulas to edit chart data for a couple years before I realized that there was a source data dialog I could use.

Select an existing series in the chart, and note the series formula in the formula bar. Copy the formula.

Add Series Formula - Copy

Press Esc to exit editing mode in the formula bar. Select the chart area or plot area, click in the formula bar, and paste. Then edit the formula like you would any other formula. Here, references to column C are changed to D, and the plot order is changed from 2 to 3.

Add Series Formula - Paste

If an existing series is selected when you paste the formula in the formula bar, you will be replacing an existing formula, so the selected series will change based on the edited formula.

If the plot order is not changed, the new series will be inserted into the slot defined by the plot order index, and series with that index or higher will be moved higher in the list.

Press Enter to accept the formula, and the chart displays the added data.

Add Series Formula - Added

You can copy the series formula from anywhere. It can be in the same chart or another chart, or you could save some frequently used formulas in a text file.

The formula can reference data in any worksheet or workbook. Tt can also refer to named ranges, and even data that’s not in a range: the series name can be a string embedded in quotes, while the X or Y values can be entered as an array. For more details, see my article on The Chart Series Formula.

Source Data – Data Range Dialog (2003)

You can add data to the chart using the Source Data dialog, Data Range tab, to stretch the range plotted in the chart. This works best if the data is in a contiguous range. You can’t add an arbitrary series in this manner, because any selection made in this dialog overwrites the existing source data.

Source Data - Data Range - 2003

Source Data – Series Dialog (2003)

You can use the Series tab of the Source Data dialog to add any arbitrary series to the chart. The series name, X values, and Y values can be defined independently, even taken from different worksheets.

Source Data - Series Data - 2003

Select Data Source Dialog (2007)

In Excel 2007, the Data Range and Series tabs of the Source data dialog have been combined into the single view on the Select Data Source dialog. The dialog has lost the preview of the chart, and the individual series data has to be selected on small child dialogs that pop up when the user clicks on various buttons (Add or Edit).

Select Source Data - 2007

Despite the different appearance, this dialog works much the same as its classic equivalents.

Related Posts:

Learn how to create Excel dashboards.

Comments


Comment from Andrew
Time: Friday, June 5, 2009, 2:47 pm

I am unable to drag and drop to insert a new series. Is it because I am using 2007? I am also unable to work out the “Neat Trick”.


Comment from Jon Peltier
Time: Friday, June 5, 2009, 5:50 pm

Andrew -

Right at the end of the Drag and Drop section, I mention that this capability has been removed from Excel 2007. Perhaps in the next version they’ll be able to reinstate it.


Comment from anne
Time: Wednesday, June 10, 2009, 9:27 am

thank you for your guide in building chart using excel,
sorry, this is out of topic…
actually im looking for how to add tertiary axis using excel. i found your good suggestion using panel chart from http://peltiertech.com/Excel/ChartsHowTo/PanelUnevenScales.html
i tried to follow your instructions and applied to my data, unfortunately i cant get as the example. I checked again which step was wrong, finally i found that one of your equation for A-plot was not similar with what had been returned in the cells E2:G7.
Can you explain to me what is the correct one?

thank u very much


Comment from Jon Peltier
Time: Wednesday, June 10, 2009, 10:01 am

Anne -

Given the same layout as in the worksheet described in the Panel with Uneven Scales article, the formula in cell E2 should be

=((B2-E$9)/(E$10-E$9)*E$12+SUM($D$12:D$12))/SUM($E$12:$G$12)

as stated in the article. This cell should then be copied and pasted into the entire region E2:G7.

I don’t know what you mean about my equation for A-plot.


Comment from anne
Time: Thursday, June 11, 2009, 2:21 am

thank you very much,
actually the “equation for A-plot” is the formula for A-plot, i’m sorry for that.
yesterday i tried to follow the formula, but i could not get the graph in separate panel. i noticed that in the formula it has dollar sign ($) either like this:$E$, or E$ ;what’s the different between these two?


Comment from Jon Peltier
Time: Thursday, June 11, 2009, 5:34 am

The dollar signs are very important, because they differentiate between absolute and relative referencing. A dollar sign before the column letter makes the column reference absolute, a dollar sign before the row number makes the row reference absolute, and without the dollar sign, each is relative.

If I have a reference to A1 in a cell, and I copy it to the cell down one row and right one column, the following changes to the formula occur:

original: =A1
copied: = B2

original: = $A$1
copied: =$A$1

original: =$A1
copied: =$A2

original: =A$1
copied: =B$1


Comment from Praveen
Time: Thursday, June 25, 2009, 11:49 am

Hi. My name is Praveen and I heard about your site while searching for answers to create a break in the y-axis of excel charts. I am still not sure how to go about doing this in regards to my data – since I need to make around 60 charts and adding marker data to each chart will be extremely time consuming, but I have another question. I was wondering how to switch the x and y axis of a chart. I have a .jpg picture of what my chart looks like and how I want the x and y axis switched at this address:

http://www.bananacity.org/media/excelhelp.jpg

your help would be greatly appreciated. Thanks.


Comment from Jon Peltier
Time: Thursday, June 25, 2009, 1:28 pm

Praveen – Use the Dot Plot technique.


Comment from kashi
Time: Thursday, July 14, 2011, 2:31 am

Dear Sir,
My Name is Kashi, I am trying to make a panel chart and just could not follow the formula, =((B2-E$9)/(E$10-E$9)*E$12+SUM($D$12:D$12))/SUM($E$12:$G$12). I have been trying this for a week now, Can you please help, I am doing this chart for the below sales data’s.

Products A B C D E Total
Apr-10 62.75 48.46 17.6 60.64 5.58 195.03
Apr-11 108.35 77.27 23.71 118.8 4.1 332.23
May-10 105.54 106.14 24.26 90.44 3.53 329.91
May-11 139.91 105.39 32.41 214.01 16.91 508.63
Jun-10 123.21 74.64 32.38 136.13 7.89 374.25
Jun-11 141.26 102.13 60.83 180.51 41.4 526.13
1st qtr-2010 291.5 229.24 74.24 287.21 17 899.19
1st qtr 2011 389.52 284.79 116.95 513.32 62.14 1366.99


Comment from Laurie
Time: Wednesday, February 29, 2012, 12:33 pm

I have to create a bar chart with current test scores for a course I am taking. Next week, I need to add scores to the chart but the prof wants the second scores added to the top of the original bars in a different color so he can see improvement. How do I add that second color (data) to the top of the original bars?


Comment from Jon Peltier
Time: Saturday, March 3, 2012, 3:28 pm

Laurie -

Don’t try adding the data to the top of the old data. First, you’d have to add only the difference. Second, you’d have to do something else if a score declines.

Just add the new scores as a new series. Keep the clustered column chart type. The new scores will appear adjacent to the old scores.

Write a comment

I welcome comments from my readers. If you have an opinion on this post, if you have a question or if there is anything to add, I want to hear from you. Whether you agree or disagree, please join the discussion.

If you want to include an image in your comment, post it on your own site or on one of the many free image sharing sites, and include a link in your comment. I'll download your image and insert the necessary html to display the image inline.

Read the PTS Blog Comment Policy.





Subscribe without commenting

Peltier Tech Chart Utilities for Excel Peltier Tech Waterfall Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Panel Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

Create Excel dashboards quickly with Plug-N-Play reports.