PC Review


Reply
Thread Tools Rate Thread

Chart data ranges

 
 
Alan
Guest
Posts: n/a
 
      20th Mar 2007
I am trying to allow users to plot data for different products on a
single chart. The macro calculates the data ranges and then assigns
the XValues and Values to the appropriate series of the chart by
overwriting the previously assigned series values. Sometimes the macro
works perfectly and the chart is updated; sometimes I get run-time
error 1004: "Unable to set the XValues property of the series class".

I've checked; the selected data range is correct for each product and
the format of the series value that I am trying to assign is
consistent and is in RC format.

Could anyone give me a hint as to what is happening and how to fix
this?

Regards, Alan

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      20th Mar 2007
What about the data being replaced? If it contains only non-plottable values
(i.e., blanks or errors) then VBA cannot access the Values and XValues in
order to replace them. This is a problem for XY and Line charts, so you
could temporarily change the series type to Area or Column, change the data
range, and change the chart type back.

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


"Alan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am trying to allow users to plot data for different products on a
> single chart. The macro calculates the data ranges and then assigns
> the XValues and Values to the appropriate series of the chart by
> overwriting the previously assigned series values. Sometimes the macro
> works perfectly and the chart is updated; sometimes I get run-time
> error 1004: "Unable to set the XValues property of the series class".
>
> I've checked; the selected data range is correct for each product and
> the format of the series value that I am trying to assign is
> consistent and is in RC format.
>
> Could anyone give me a hint as to what is happening and how to fix
> this?
>
> Regards, Alan
>



 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      20th Mar 2007
Thanks Jon. There doesn't seem to be any blanks of errors in the data
but converting from XY to columns and then back again after the ranges
have been changed seems to work a treat. All I can't figure out is
why!?

Alan

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      20th Mar 2007
Because Excel is like that sometimes.

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


"Alan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Jon. There doesn't seem to be any blanks of errors in the data
> but converting from XY to columns and then back again after the ranges
> have been changed seems to work a treat. All I can't figure out is
> why!?
>
> Alan
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
chart based on data ranges =?Utf-8?B?dG9tIG9zc2lldXI=?= Microsoft Excel Charting 1 30th Sep 2006 12:36 PM
Combination chart with three data ranges =?Utf-8?B?Sm9lIE1hYw==?= Microsoft Excel Charting 2 11th Jul 2005 11:00 PM
Showing two data ranges on one chart =?Utf-8?B?RGVuaXNlIEZyZWlidXJnZXI=?= Microsoft Excel Charting 1 12th Oct 2004 04:41 PM
Chart Data Ranges Joyce Microsoft Excel Charting 2 8th Oct 2004 09:54 PM
3 different data ranges to chart on one graph Donna Microsoft Excel Charting 1 10th Sep 2004 04:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:59 PM.