By insyzygy ar an Domhnach, 09 Deireadh Fómhair 2022
Freagraí 1
Is maith 0
tuairimí 5K
Vótaí 0
I have data with 3 column. column 1 is series name, column 2 is x-value, column 3 is y-value. Data is XY scatter data. Should I merge column 1 to a single cell?

Can I plot this data on same chart so that I have multiple xy data series using Kutools?
Thanks! I have just purchased the software so am looking for assistance.
Dia duit ann,

We've created a VBA code, please insert that in a module and check if that is what you need:
Sub KutoolsChart()
'
' CSH
'
Dim xRg As Range
Dim i As Integer
On Error Resume Next
Set xRg = Application.InputBox(prompt:="Please select Range", Title:="Kutools for Excel", Type:=8)
If TypeName(xRg) = "Nothing" Then Exit Sub
If xRg.Columns.Count <> 3 Then
MsgBox ("Reference is not Valid")
Exit Sub
End If
ActiveSheet.Shapes.AddChart2(240, xlXYScatter).Select

For i = 1 To xRg.Rows.Count
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(i).Name = xRg.Cells(i, 1).Value
ActiveChart.FullSeriesCollection(i).XValues = xRg.Cells(i, 2)
ActiveChart.FullSeriesCollection(i).Values = xRg.Cells(i, 3)
ActiveChart.FullSeriesCollection(i).ApplyDataLabels
ActiveChart.FullSeriesCollection(i).DataLabels.Select
ActiveChart.FullSeriesCollection(i).DataLabels.ShowValue = False
ActiveChart.FullSeriesCollection(i).HasLeaderLines = False
ActiveChart.FullSeriesCollection(i).DataLabels.ShowSeriesName = True
Next
End Sub

After you copy and paste the code above, press F5 to run the code. And a dialog box will pop up asking you to select the three columns.

Má tá aon cheist agat, ná bíodh drogall ort ceist a chur orm.

Amanda
·
1 bliain ó shin
·
0 Is maith
·
0 Vóta
·
0 Comments
·
Féach ar an bPost Iomlán