Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 461
Default Macro code to put series name next to individual line in line

The original code created a static label populated by the text that was
the series name when the label was created. Change the series name, the
label does not change.

Modify the ApplyDataLabels command to this:

mySrs.Points(iPts).ApplyDataLabels _
ShowSeriesName:=True, ShowCategoryName:=False, _
ShowValue:=False, AutoText:=False, LegendKey:=False

The label now explicitly shows the series name. Change the series name,
and the label itself changes.

I updated the tutorial when Excel 2007 misbehaved. The new version works
in all versions, and includes the above enhancement:

Label Last Point for Excel 2007 » Peltier Tech Blog
http://peltiertech.com/WordPress/lab...or-excel-2007/

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
774-275-0064
http://peltiertech.com/


On 2/23/2010 6:50 AM, Otani wrote:
I have used the VBA code from the John Peltier link at the bottom. The macro
works but for some reason everytime I change the series name in the table,
the legend in the graph would automatically change as well but the label next
to the graph doesn't. I have to run the macro again to see the change takes
effect. My macro setting is already set to enable all so I don't if I have
missed something.

"Misange" wrote:

Look at this page
http://www.andypope.info/charts/Labellast.htm
Misange

Otani a écrit :
I want to put the series names next to their corresponding line in the line
graph. I remember seeing on the internet that there is a macro code for this
but I cannot find this anymore. Does anyone know what the macro code is?

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing an arrow on the series line in a line chart Rajendra Charts and Charting in Excel 5 February 23rd 10 09:43 AM
Show average line by series on a line chart Judy Rose Charts and Charting in Excel 1 August 28th 08 04:42 PM
Cutting a line in a line chart when data series stops DannyS Charts and Charting in Excel 2 August 28th 07 10:38 AM
Too many markers on line chart makes it a thick line and individual markers cannot be seen denzel Excel Discussion (Misc queries) 2 August 2nd 06 04:06 PM
Change individual series from bar to line CLK-user1 Charts and Charting in Excel 1 July 21st 06 12:56 PM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"