Automatically Updating Charts for Additional Data

by Allen Wyatt
(last updated February 24, 2016)

6

Excel shines at turning your data into charts—graphical representations of your data. You can easily create a chart based on a range of data in a worksheet. Normally, if you add additional data to your range, you will need to once again create the chart or at best change the range of cells on which the chart is based.

If you get tired of modifying charts to refer to new data ranges, there are a couple of shortcuts you can try out. The first shortcut works fine if you simply need to "fine tune" the range used in a chart. (This approach only works if the chart is on object on the same worksheet that contains the data on which the chart is based.) Follow these steps:

  1. Enter any new data to the table on which the chart is based.
  2. Select all the cells that you just entered.
  3. Click anywhere on the selection border around the cells. (Don't click on the fill handle.)
  4. Drag the selection toward the chart and drop it on the chart.

That's it—Excel incorporates the new data right into the existing chart, slick as a whistle.

Another approach is to add new data to the range not at the end, but somewhere within the range. For instance, you may have some data that represents a time period, such as 11/1 through 11/13, and you create a chart based on those dates. If you add new data to the end of the range (after 11/13), then Excel doesn't know you want those items added to the chart.

Instead, insert some blank rows somewhere within the data range; it doesn't matter where, as long as the record for 11/13 is below the added rows. You can then add the new data in the new rows, and the chart is automatically updated to include the data.

One drawback to this approach, of course, is that the inserted data will be out of order when compared to the overall structure of the data table. It is interesting to note that for some types of data—such as those based on dates—Excel will automatically sort the data by date as it presents it in the chart, but not in the data table itself. You can always use Excel's sort feature to reorder the data in the table, all without affecting what is presented in the chart.

Still another approach is to create a "dynamic range." This approach works well if the data range you are charting is the only data on the worksheet. Follow these steps:

  1. Create your data table as you normally would. (To keep things simple, we'll assume that you are creating a two-column data table, in columns A and B, that you then want to chart.)
  2. Create your chart, as desired.
  3. With the worksheet visible, click on Insert | Name | Define to display the Define Name dialog box. (See Figure 1.)
  4. Figure 1. The Define Name dialog box.

  5. In the Names in Workbook or Name field (depending on your version of Excel) enter a name that will refer to the data in column A.
  6. In the Refers To field, enter the following formula. You should change the sheet name and beginning cell (in this case $A$2), as necessary. If you change the beginning cell, you should also change the final part of the formula (-1) to be one less than the row number of the beginning cell. Thus, if you change the beginning cell to $A$5, you should change the final part of the formula to -4.
  7.      =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1! $A:$A)-1)
    
  8. Click Add. Excel creates the name and associates it with the formula you entered. The Define Name dialog box should still be visible, with the newly defined name listed.
  9. In the Names in Workbook or Name field (depending on your version of Excel) enter a name that will refer to the data in column B.
  10. In the Refers To field, enter the following formula. (You should make the same type of changes to the sheet name, beginning cell, and final part of the formula as described in step 5.)
  11.      =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B)-1)
    
  12. Click Add. Excel creates the name.
  13. Click OK to close the Define Name dialog box.
  14. Display the chart and select the data series. (There should only be one data series, since this is a simple two-column data table.) The formula bar will display a formula similar to the following:
  15.      =SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$32, Sheet1!$B$2:$B$32,1)
    
  16. Replace the ranges in the formula with the names you defined earlier in these steps. Assuming you defined the names Dates and Readings in steps 4 and 7, the formula should look like this:
     =SERIES(,Sheet1!Dates,Sheet1!Readings,1)

Now the chart updates automatically regardless of where you add information in your data table. This works because the names you defined in steps 6 and 10 refer to a formula that calculates the extent of data in columns A and B of your worksheet.

There are many other ways that you can create dynamic ranges, depending on the characteristics of the data you are using. For additional information, see these Web resources:

http://spreadsheetpage.com/index.php/tip/update_charts_automatically_when_you_enter_new_data/
http://www.ozgrid.com/Excel/DynamicRanges.htm

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2933) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Automatically Saving Changes to Defaults

Have you ever started a new document only to find that the settings in Word seem to be different than what you expected? This ...

Discover More

Deleting Worksheet Code in a Macro

When creating an application in VBA for others to use, you might want a way for your VBA code to modify or delete other ...

Discover More

Getting Rid of Section Breaks, but Not Section Formatting

Word allows you to change the character of how your pages are designed by using multiple sections in a document. If you want ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

MORE EXCELTIPS (MENU)

Changing Chart Size

Place a chart on a worksheet and you may not be satisfied with its size. Changing the size of a chart is a simple process ...

Discover More

Changing Chart Type

Excel allows you to add two distinct types of charts to your workbooks: embedded or chart sheets. You can switch between the ...

Discover More

Noting a False Zero On a Chart

When creating charts that will be used by other people, you may need to take some liberties with the presentation of your ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight more than 7?

2017-01-24 14:35:01

Allan Poe

You need the added steps 5, 6, 7, at least in Word 97.

1. Enter any new data to the table on which the chart is based.
2. Select all the cells that you just entered.
3. Click anywhere on the selection border around the cells. (Don't click on the fill handle.)
4. Drag the selection toward the chart and drop it on the chart.
5. In option, Add Cells, Click New Points
6. In option, Values (Y), Click Columns
7. OK


2016-12-08 09:28:58

Don

Thanks, works great.
Windows 10, Excel 2010


2016-12-07 16:30:20

Jim Smart

Dynamic range method doesnt work, not at all, I have spent over two hours trying to make it work in the simplest form. Simply doesnt work.


2016-01-03 06:45:03

ExchartUser

Nice explanation.
For added speed, simplicity and flexibility to achieve the same goal, you can check out www.excharts.com.


2015-10-20 22:44:21

Cap

P.S. I tried to simply select the cells, Ctrl+C, Ctrl+V in the chart - that worked.


2015-10-20 22:31:37

Cap

Thank you for the tips, but when I try method one a message appears - "There's already data here. Do you want to replace it?" I click OK, the data is MOVED from its row of cells on the spreadsheet, and the chart doesn't update. It's as if the data is simply being moved from the original cells to new cells "behind" the chart. Using Excel 2016.


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share