Skip to main content
Support is Online
We're back! We are here to assist you. Please be patient, we will respond to your tickets shortly.
Official support hours
Monday To Friday
From 09:00 To 17:30
  Sunday, 09 October 2022
  1 Replies
  4.7K Visits
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.
1 year ago
Hi there,

We've created a VBA code, please insert that in a module and check if that is what you need:
Sub KutoolsChart()
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.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).DataLabels.ShowValue = False
ActiveChart.FullSeriesCollection(i).HasLeaderLines = False
ActiveChart.FullSeriesCollection(i).DataLabels.ShowSeriesName = True
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.

If you have any questions, please don't hesitate to ask me.

  • Page :
  • 1
There are no replies made for this post yet.