Points 19 Trophies 1 Posts 5. What am I doing wrong? Merci d'avance Est-ce que ça peut venir de ma version de Excel (2000)? In the second row you have XValues, and. When you select more than two columns (or rows) of data and choose a Scatter chart, Excel's standard treatment is to assume all series share the X values in the first column or row, and that each successive column or row holds the Y data for a separate series. ActiveSheet.ChartObjects(1).Activate ActiveChart.SeriesCollection(1).Values = .Range("BA1:BB" & cnt) (This does not work) All the series have the same range for X axis but different range for Y axis. Excel XY Scatter Chart Variations. ActiveChart.SeriesCollection(index) index as a function. I need to read the XVALUES range on a pre-existing series, so I can match the correct row range for the new series' VALUES range. Hi everybody, I met a problem when creating multiple series in one chart using a macro.
let's use your image... and transpose the data... Then you have 1 to 10 series named 1 to 10 in the first row. Referencing Charts and Chart Objects in VBA Code: 35. If I were to put in "ActiveChart.SeriesCollection(1).... ActiveChart.SeriesCollection(2).... ActiveChart.SeriesCollection(3)....etc, the x values are correctly entered. And in case you can't see the access code I modified it to: Dim cht As Graph.Chart Dim ser As Graph.Series Set cht = Me.Graph.Object Set ser = cht.SeriesCollection(1) Tests = ser.XValues … I have a VBA script that uses for loops to add series's of data to a chart through the script. Is there anyone out there who've used SeriesCollection.Values before?
An XY Scatter chart with a single charted series has one set of X data and one set of Y data. I've got xval = activechart.seriescollection(1).Xvalues The only pair that works is where I define the range explicitly using Range("A2:a50"), for example. Currently there're 12 series to be plotted. Re: VBA - Charts() .SeriesCollection.NewSeries. .SeriesCollection(1).Values = arYValues .SeriesCollection(1).XValues = arXValues End With End Sub Sub y() Const N = 18 ' geht noch, N=19 nicht mehr Dim ch As Chart, arXValues, arYValues, i As Long ReDim arXValues(1 To N) ReDim arYValues(1 To N) For i = 1 To N arXValues(i) = i arYValues(i) = Sqr(i) Next
Quick Excel Chart VBA Examples . But I can't seem to get the XVALUES property to do anything useful. Set ser = cht.SeriesCollection("Profit") Tests = ser.XValues MsgBox Tests(3) End Sub. The examples here are straightforward illustrations of easy techniques to create charts, add and remove series, and move and resize charts using VBA. But I can't seem to get the XVALUES property to do anything useful.
Joined May 2, 2017 Messages 13. I need to read the XVALUES range on a pre-existing series, so I can match the correct row range for the new series' VALUES range.
Notice that I have three pairs of lines defining the .Values and .XValues. The use of VBA in Microsoft Excel charting is a topic that would fill a large volume. Any attempt at displaying or manipulating the property fails. As I know, there's no way to do double indexing for the values of the point referencing to. Specify Exact Location Returning SeriesCollection XValues individually (VBA) Thread starter thesnowplow; Start date Feb 4, 2018; Tags chart pivotchart seriescollection vba xvalues; T. thesnowplow New Member.
Jun 22nd 2006 #3; Re: VBA SeriesCollection.Values…
Beginner. I'm writing a procedure to add an additional trend to an existing x-y plot. According to the online help, XVALUES is a read/write variant. XValues = ... 4種類のデータがある場合は(4)を追加してください。 橙：系列、軸. The following code does not work. [vba] With ActiveChart ReDim cc_array(1 To .SeriesCollection.Count, 1 To 13) As Integer For i = 1 To .SeriesCollection.Count For j = 1 To 13 cc_array(i, j) = WorksheetFunction.Index(.SeriesCollection(i).Values, j) Next j Next i End With[/vba] [h4] Cheers Andy [/h4] Report Content; novice24.
Although it helps in other situations, it does not help me now. c'est limité à un certain nombre de valeurs!!
So something like the following would not be possible. Outline: Quick Chart VBA Examples. ActiveChart.SeriesCollection (1).