Chart automatically updates when Excel enters new data

Source: Internet
Author: User
Tags define range reference

I have a friend who is a salesman. He uses Excel charts to record his daily sales performance. That day, he called to ask the question: Excel to record daily sales is very convenient, can visually express the daily sales results, but because there are new data every day, so I have to manually change the chart every day to include new data. Is there a way to let me enter new data when the chart can be automatically updated. The following method will solve the problem for him.

In Excel 97 and later, when a chart data series is selected, a border appears around the data range that corresponds to the data series in the worksheet, and you can extend the data region by simply dragging the corner points of the area border. The approach used in this article is to define a dynamic data range by using a formula to create a chart that automatically updates the chart when you enter data without having to manually change the range of data regions.

The specific steps are as follows:

1. Enter the data and create the chart as shown in Figure 1 (Download the exercise Excel workbook: Http://www.yesky.com/imagesnew/software/still/update.xls).

Figure 1

2. Select the menu command "Insert > Name > Definition" To open the Define Name dialog box. Enter a date in the Enter box under name in current workbook, enter the formula in the input box under reference position =offset (sheet1! $A $2,0,0,counta (sheet1! $A: $A)-1), and click the Add button to add the date. As shown in Figure 2.

Figure 2

Note: The offset function refers to the first data point (cell A2) and uses the CountA function to get the number of data points in column A. Because column A contains a non-numeric data "date", subtract 1 from the formula.

3. Continue to define the name in the Define Name dialog box. Enter sales in the Enter box under name in current workbook, enter the formula in the input box under reference position =offset (sheet1! $B $2,0,0,counta (sheet1! $B: $B)-1), and click the Add button, as shown in Figure 3. Then click the OK button to close the dialog box.

Figure 3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.