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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can Series name be a reference to a cell value...

Status
Not open for further replies.

Premalm

Programmer
Mar 20, 2002
164
US
Hi Guys,

I need to Set the Legend names as a reference to a cell value.
i.e. I have a line graph with 2 series. The Series name is usually a string value (column name).
What I want is it should be a reference to the column heading so that if the heading changes the graphs legend names are automatically updated. i.e. the series name to be a reference.
How can this be done programatically.

Thanks
Premal
 


Hi,

Turn on your macro recorder.

Select the chart

Right click - Select source data

Series tab - select a series - select the name box - select the sheet/cell containing series name.

observe your code and incorporate


Skip,

[glasses] [red]Be Advised![/red]
A wee deranged psychic may be runnin' around out there!
SMALL MEDUIM @ LARGE[tongue]
 
Thanks. Great that helped very much. Another question.

Suppose if I have a Chart which has some source data.
How do I get the source data of a graph ? I actually want the cell references ?

Any Ideas?


 


Yes.

However, programatically determining the range reference is a bit complex.


Skip,

[glasses] [red]Be Advised![/red]
A wee deranged psychic may be runnin' around out there!
SMALL MEDUIM @ LARGE[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top