Merhaba,
Bir VBA kodu oluşturduk, lütfen bunu bir modüle ekleyin ve ihtiyacınız olanın bu olup olmadığını kontrol edin:
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
Yukarıdaki kodu kopyalayıp yapıştırdıktan sonra F5 tuşuna basarak kodu çalıştırın. Ve sizden üç sütunu seçmenizi isteyen bir iletişim kutusu açılacaktır.
Herhangi bir sorunuz varsa, lütfen bana sormaktan çekinmeyin.
Amanda