Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 92
Default VBA - Setting up a Chart series

Probably very elementary, but I need some more help.



I have set up a chart to show data just the way I like it and the only thing
I want to do is change the series data.

Fundamentally, I have a table with dates from Jan '05 to July '07 with
client's data for that entire period. What I would like to do is show
snapshots of that data using varying Start and Stop dates. I have calculated
the index for both the start and stop dates and would like to pop them into
the Series for the chart.



When I do this manually, I get something like below:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R642C27:R925C27"



I tried using:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R" & StrtDate
"C27:R925C27"



Where StrtDate is the row number, but it doesn't work.



What is a very simple way of doing this?



Thanks,

Craig




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default VBA - Setting up a Chart series

The syntax is fine. What type of chart is it? Is the series already visible,
or does it not yet have plottable data? Does StrtDate actually equal
something?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"C Brandt" wrote in message
...
Probably very elementary, but I need some more help.



I have set up a chart to show data just the way I like it and the only
thing
I want to do is change the series data.

Fundamentally, I have a table with dates from Jan '05 to July '07 with
client's data for that entire period. What I would like to do is show
snapshots of that data using varying Start and Stop dates. I have
calculated
the index for both the start and stop dates and would like to pop them
into
the Series for the chart.



When I do this manually, I get something like below:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R642C27:R925C27"



I tried using:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R" & StrtDate
"C27:R925C27"



Where StrtDate is the row number, but it doesn't work.



What is a very simple way of doing this?



Thanks,

Craig






  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 92
Default VBA - Setting up a Chart series

Jon:

This line gives me a Compile Error - Syntax Error.

ActiveChart.SeriesCollection(1).XValues = "='Chart Setup'!R" &
StrtDatePtr "C27:R9525C27"

Craig


"Jon Peltier" wrote in message
...
The syntax is fine. What type of chart is it? Is the series already

visible,
or does it not yet have plottable data? Does StrtDate actually equal
something?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"C Brandt" wrote in message
...
Probably very elementary, but I need some more help.



I have set up a chart to show data just the way I like it and the only
thing
I want to do is change the series data.

Fundamentally, I have a table with dates from Jan '05 to July '07 with
client's data for that entire period. What I would like to do is show
snapshots of that data using varying Start and Stop dates. I have
calculated
the index for both the start and stop dates and would like to pop them
into
the Series for the chart.



When I do this manually, I get something like below:



ActiveChart.SeriesCollection(2).XValues = "='Chart

Setup'!R642C27:R925C27"



I tried using:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R" & StrtDate
"C27:R925C27"



Where StrtDate is the row number, but it doesn't work.



What is a very simple way of doing this?



Thanks,

Craig








  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 92
Default VBA - Setting up a Chart series

Jon:
When I remove all the spaces, it gives me Compile error - Expected; End of
Statement with the last group inside quotes highlighted.
Craig


"Jon Peltier" wrote in message
...
The syntax is fine. What type of chart is it? Is the series already

visible,
or does it not yet have plottable data? Does StrtDate actually equal
something?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"C Brandt" wrote in message
...
Probably very elementary, but I need some more help.



I have set up a chart to show data just the way I like it and the only
thing
I want to do is change the series data.

Fundamentally, I have a table with dates from Jan '05 to July '07 with
client's data for that entire period. What I would like to do is show
snapshots of that data using varying Start and Stop dates. I have
calculated
the index for both the start and stop dates and would like to pop them
into
the Series for the chart.



When I do this manually, I get something like below:



ActiveChart.SeriesCollection(2).XValues = "='Chart

Setup'!R642C27:R925C27"



I tried using:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R" & StrtDate
"C27:R925C27"



Where StrtDate is the row number, but it doesn't work.



What is a very simple way of doing this?



Thanks,

Craig








  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default VBA - Setting up a Chart series

You left out an ampersand between StrtDatePtr and "C27:R9525C27".

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"C Brandt" wrote in message
...
Jon:

This line gives me a Compile Error - Syntax Error.

ActiveChart.SeriesCollection(1).XValues = "='Chart Setup'!R" &
StrtDatePtr "C27:R9525C27"

Craig


"Jon Peltier" wrote in message
...
The syntax is fine. What type of chart is it? Is the series already

visible,
or does it not yet have plottable data? Does StrtDate actually equal
something?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"C Brandt" wrote in message
...
Probably very elementary, but I need some more help.



I have set up a chart to show data just the way I like it and the only
thing
I want to do is change the series data.

Fundamentally, I have a table with dates from Jan '05 to July '07 with
client's data for that entire period. What I would like to do is show
snapshots of that data using varying Start and Stop dates. I have
calculated
the index for both the start and stop dates and would like to pop them
into
the Series for the chart.



When I do this manually, I get something like below:



ActiveChart.SeriesCollection(2).XValues = "='Chart

Setup'!R642C27:R925C27"



I tried using:



ActiveChart.SeriesCollection(2).XValues = "='Chart Setup'!R" & StrtDate
"C27:R925C27"



Where StrtDate is the row number, but it doesn't work.



What is a very simple way of doing this?



Thanks,

Craig










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
excel chart maximum series should more than 255 series kameking Charts and Charting in Excel 5 August 22nd 10 10:52 AM
Setting Excel chart series from vb6 Jim Charts and Charting in Excel 7 January 27th 06 09:41 AM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM
off-setting points of different series b/c error bars overlap dothareggae Charts and Charting in Excel 1 July 19th 05 11:59 PM
Setting Series data in VBA [email protected] Charts and Charting in Excel 4 March 11th 05 01:44 PM


All times are GMT +1. The time now is 07:28 AM.

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

About Us

"It's about Microsoft Excel"