LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
Liughi
 
Posts: n/a
Default Error 1004 using not contiguous data

Preface: sorry for my english. :)

I faced with an annoying problem while chosing as "SeriesCollection" a not
contiguous range in the same row. I don't know if i'm using the right word,
the result of the recording of the desidered behaviour is:

ActiveChart.SeriesCollection(1).Values = "=(temp!R1C4,temp!R1C6,temp!R1C8)"

This is wonderful and works fine. Actually my macro works with dynamic data,
that's why i cannot use this fixed formula.

So, my Sub creates the desidered range using a series of such a cycle:

Dim rZona(5) As String
Dim rZ(5) As Range

If (here is mycondition) Then
If (rZona(i) = "") Then
rZona(i) = "(temp!" & ActiveCell.Offset(0, 1).Address
'this is the first one followed by some other cycle with
Offset(0,INSERT_OFFSET_HERE)
Else
rZona(i) = rZona(i) & ",temp!" & ActiveCell.Offset(0, 1).Address
End If
i = i + 1
End If

Followed, at end, by

If (here is mycondition) Then
For i = 1 To iMax
rZona(i) = rZona(i) & ")"
Set rZ(i) = Range(rZona(i))
Next i
End If

It seems to work fine, in fact if i add in this very last cycle the line:
rZ(i).Select
in my sheet the correct cells are highlighted!

But... when i try to write:

ActiveChart.SeriesCollection(i).Values = rZ(i)

Such as error is returned: error - unable to set the XValues property of the
series class.

That's quite awful.

Chart info:
ActiveChart.SetSourceData Source:=Sheets("temp").Range(E1:AG1),
PlotBy:=xlRows
ActiveChart.ChartType = xlColumnStacked

I hope sincerely that someone is able to help me, i spent the last two days
trying in anyway to solve this problem... but success -0

Thank you in advance,
Luca.


 
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
Importing Data Jillian Excel Worksheet Functions 9 December 23rd 05 12:45 PM
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
Excel 2003, Convert EXISTING Worksheet Data to XML? [email protected] Excel Discussion (Misc queries) 4 November 16th 05 04:45 AM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


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

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

About Us

"It's about Microsoft Excel"