alanthayn
Oct 10 2003, 09:45 AM
I am creating a scatter chart with x,y values for weeks of the year.
i.e.
W1 W2 W3 W4
X 2 4 2.5 3.1
Y .5 .4 .8 .7
I can get the chart created, but I am having trouble lableing the points on the chart for each week.
Has anyone done this? So far the only way I can figure out to do it is to go in and identify each point and then type in a label. There has got to be an easier way.....
whitej92
Oct 10 2003, 10:05 AM
As far as I know, you have to set up the labels showing values and then overtype them with your chosen name. We have to do this weekly for a graph with over 100 data points - I find the easiest way is to write a little macro - for example :
Range("A1").Select
Selection.End(xlDown).Select
whatrow = ActiveCell.Row
For counter = 1 To whatrow
Range("A1").Select
whatname = ActiveCell.Offset(counter, 0).Value
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SeriesCollection(1).DataLabels.Select
ActiveChart.SeriesCollection(1).Points(counter).DataLabel.Select
Selection.Characters.Text = whatname
Selection.AutoScaleFont = False
ActiveChart.PlotArea.Select
ActiveWindow.Visible = False
next counter
NateO
Oct 13 2003, 12:14 PM
Hello Alan, never played with this, but you might want to have a look at MS MVP Rob Bovey's Chart Labeler add-in:
http://www.appspro.com/utilities/Labeler.asp
alanthayn
Oct 13 2003, 12:41 PM
Thanks for the info and advice