Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Chart data ranges

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart data ranges

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" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Chart data ranges

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart data ranges

Because Excel is like that sometimes.

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


"Alan" wrote in message
ups.com...
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
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
Creating a chart with varying data value ranges Anthony Blackburn Excel Discussion (Misc queries) 1 May 17th 10 05:41 PM
One Chart, Same Data ranges, different source sheets Greg in CO[_2_] Charts and Charting in Excel 4 March 12th 10 02:57 PM
max number of data ranges (bars) in a bar chart awaterworld Charts and Charting in Excel 5 January 23rd 09 04:12 PM
chart based on data ranges tom ossieur Charts and Charting in Excel 1 September 30th 06 12:36 PM
Combination chart with three data ranges Joe Mac Charts and Charting in Excel 2 July 11th 05 11:00 PM


All times are GMT +1. The time now is 02:45 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"