View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Matt Matt is offline
external usenet poster
 
Posts: 516
Default Extend values of a chart series

Yea I needed ... 'Aug ''08'!myName ... just before the 08 its two
single quotes I was doin one double quote.
And when you can, can you look at the next question in this post about the
formula

"Barb Reinhardt" wrote:

If you are adding a named range specific to a worksheet named "My Sheet",
enter this for the name
'My Sheet'!myName.

You need the single quotes if the sheet name has a space in it. If the
sheetname is mySheet use
mySheet!myName
--
HTH,
Barb Reinhardt



"matt" wrote:

It is sheet5 but in the tab in excel that says the sheet name at the bottom
of the window is Aug 08' or Jul 08' or Dec 08'...

"Barb Reinhardt" wrote:

I think what you'll need is a dynamic range in your chart. You can see how
the technique is used here

http://www.peltiertech.com/Excel/Cha...umnChart1.html
--
HTH,
Barb Reinhardt



"matt" wrote:

Hello,
Ok, so I have some code that opens a seperate Excel file and takes some
information from that and puts it into another Excel file that I have call
"Sales.xls". In "Sales.xls" there is a chart, i think it is just called
"Chart 1". Well the info that is pulled from the one file is put into a
column that is used for the data for the chart.

How can I programatically extend that series to the most recent data,
without having to manually click the series in the chart and then having to
extend the box to encompass the new data?

I tried recording a macro doing that just to see what the out-put would be,
and try to mimic that to what I need. But no such luck.
Here is the CODE from the "Recorded Macro":
__________________________________________________ _________
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Values = "='Jul ''08'!R4C3:R33C3"
ActiveChart.SeriesCollection(3).Select
ActiveChart.SeriesCollection(3).Values = "='Jul ''08'!R3C5:R33C5"
__________________________________________________ _________
---This is for two different series' in the same chart.

The sheet is called " Jul '08 ", but that will change with the month.
I have one sheet for each month so I guess ActiveSheet would be preferred...

Thanks,
Matt