Changing Chart Name

kpark91

Well-known Member
Joined
Jul 15, 2010
Messages
1,582
Hello,

I've recorded a macro that deals with scatter plot graph.

Code:
    Sheet1.ChartObjects("Chart 1").Activate
    With ActiveChart.SeriesCollection(1)
        .Name = "=""Data"""
        .XValues = "=a.xlsm'!scatterX"
        .Values = "=a.xlsm'!scatterY"
    End With

This macro simply changes the name of the series and data range to plot.

However, my question is:
How do I view the chart property which states its name (like "Chart 1")?
Moreover, is it possible for me to change the names?

Thank you very much in advance,
kpark
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try like this

Code:
ActiveSheet.ChartObjects("Chart 1").Name = "VoG"


you can also use the Name property to read the name.
 
Upvote 0
Hello, VoG and njimack.

I haven't tried njimack's code yet but I know VoG's code works great.
Thanks alot.

But one of my questions was not answered or probably misunderstood.
So, here is my situation.

I have many different types of charts and I am in the process of automating them so that the graphs can be updated from time to time.
However, in order to update them I need to know the graphs' names.
Right now, I am recording macro to find out the charts' names one by one to get the name of "Chart 1" as the code shown above.

Are there any ways I can get the names of the charts without recording the macro?
For example, right-clicking on the chart and then clicking the property?? (something as easy as this?)

Thank you alot again :)
kpark
 
Upvote 0
In Excel 2010 (and I think XL 2007) the chart's name shows up in the Name box if you click on the chart.

In earlier versions display the drawing toolbar (View, Toolbars if in Excel 97-2003). Then select the select objects tool by clicking on the button that looks like an arrow head. When you click on an embedded chart with this tool, you can then click in the name box and change the name of the chart.
 
Upvote 0
Hi, VoG.

I have found the name box and verified the name.

I really appreciate your help! Thank you alot.

For other viewers,
in XL2007, name can be found in Chart Tools > LayOut > Properties section (in the ribbon). The name should be there all the way at the right :)

Thanks alot!
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top