Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a chart with varying data value ranges | Excel Discussion (Misc queries) | |||
One Chart, Same Data ranges, different source sheets | Charts and Charting in Excel | |||
max number of data ranges (bars) in a bar chart | Charts and Charting in Excel | |||
chart based on data ranges | Charts and Charting in Excel | |||
Combination chart with three data ranges | Charts and Charting in Excel |