Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Chart: Change data label using VBA?

Status
Not open for further replies.

rlee16

Technical User
Jan 19, 2003
44
0
0
HK
Is there a way to use VBA to automate the process of updating data labels (for a series not a data point) on an excel chart?

I have a line chart graphing a time series. I also have horizontal lines for max, standard deviation, average, and min. These are labeled as such: max1.88x, 1sd1.36x, avg0.83x, -1sd0.62, and min0.41x.

However, these labels must change every day to reflect new data. Thanks for the help.

Richard
 
Richard,

Select you chart -- right click, selecting data source - series tab.

In the series tab, list box lists each series.

Each series has

Name -- Series label
Values -- y-axis data range
Categories - x-axis data range

So on your SHEET you can change the series label and it will be reflected in your chart -- if you have a Legend, for instance.

BTW, your data ranges can be defined to be DYNAMIC using the OFFSET function as described in faq68-1331 How can I rename a table as it changes size

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top