Macro to Add Data Point Labels to a Chart in ExcelLast reviewed: September 2, 1997Article ID: Q77086 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, you can place text labels on individual data points in a chart. You can replace existing labels or create new labels with text values from a worksheet either by manually editing the label in the formula bar in the chart, or you can write a macro. This article shows how to do this from a macro, which is the desired method if the chart contains many data points or if you update charts in this fashion often.
MORE INFORMATIONMicrosoft provides macro examples for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This macro is provided 'as is' and Microsoft does not guarantee that the following code can be used in all situations. Microsoft does not support modifications of the code to suit customer requirements for a particular purpose.
ExampleThe following example creates new, or replaces existing, data labels on a chart for a single data series. Before following the steps below, you should have an existing chart, and you should have a range of cells on your worksheet containing the labels that you wish to have placed in your chart. The number of labels on your worksheet should be equal to the number of points per data series in your chart.
NOTE: This works differently under 3-D charts.
REFERENCES"User's Guide 1," version 4.0, pages 455-456 "Function Reference," version 4.0, pages 29-30, 155-156 "Microsoft Excel User's Guide" for Windows, version 3.0, pages 475-476 "Microsoft Excel Function Reference" for Windows, version 3.0, pages 18-19, 80
|
Additional query words: 7.00 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |