Grafik sayfasında 3 seri veri gösterme var.
buna makro - vba kodlaması ile 4.seri veriyi kod yazarak nasıl ekleye bilirim ve bu 4.seri dik sutunlu değil yatay çizgi olacak şekilde nasıl yapa bilirim.
kodlama örneğim şu şekilde grafik değişken verileri farklı satırlardan alıyor , verileri kodla sectiriyorum.( 4.seriyi kodla giremiyorum )
'Grafik oluştur
If isl = "TOPLAM ISKARTA" Then
Sheets("FABRİKAISKDAĞ.").Activate
Columns("A:D").Select
Selection.Sort Key1:=Range("C2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Sheets("Grafik").Activate
If Mid(bant, 1, 6) = "TOPLAM" Then
ActiveChart.ChartTitle.Text = "2015 YILI " & grp & " EN BÜYÜK İLK 10 ISKARTA "
Else
ActiveChart.ChartTitle.Text = "2015 YILI " & bant & " EN BÜYÜK İLK 10 ISKARTA "
End If
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(2).Values = "="
ActiveChart.SeriesCollection(2).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(2).ApplyDataLabels Type:=xlDataLabelsShowNone, _
AutoText:=True, LegendKey:=False
ActiveChart.SeriesCollection(3).Values = "="
ActiveChart.SeriesCollection(3).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(3).ApplyDataLabels Type:=xlDataLabelsShowNone, _
AutoText:=True, LegendKey:=False
' ActiveChart.SeriesCollection(4).XValues = "="
' ActiveChart.SeriesCollection(4).Values = "=FABRİKAISKDAĞ.!R2C4:R11C4"
' ActiveChart.SeriesCollection(4).ApplyDataLabels Type:=xlDataLabelsShowValue, _
' AutoText:=True, LegendKey:=False
ActiveChart.SeriesCollection(1).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(1).Values = "=FABRİKAISKDAĞ.!R2C3:R11C3"
ActiveChart.SeriesCollection(1).Name = "=FABRİKAISKDAĞ.!R1C2"
ActiveChart.SeriesCollection(1).ApplyDataLabels Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
buna makro - vba kodlaması ile 4.seri veriyi kod yazarak nasıl ekleye bilirim ve bu 4.seri dik sutunlu değil yatay çizgi olacak şekilde nasıl yapa bilirim.
kodlama örneğim şu şekilde grafik değişken verileri farklı satırlardan alıyor , verileri kodla sectiriyorum.( 4.seriyi kodla giremiyorum )
'Grafik oluştur
If isl = "TOPLAM ISKARTA" Then
Sheets("FABRİKAISKDAĞ.").Activate
Columns("A:D").Select
Selection.Sort Key1:=Range("C2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Sheets("Grafik").Activate
If Mid(bant, 1, 6) = "TOPLAM" Then
ActiveChart.ChartTitle.Text = "2015 YILI " & grp & " EN BÜYÜK İLK 10 ISKARTA "
Else
ActiveChart.ChartTitle.Text = "2015 YILI " & bant & " EN BÜYÜK İLK 10 ISKARTA "
End If
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(2).Values = "="
ActiveChart.SeriesCollection(2).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(2).ApplyDataLabels Type:=xlDataLabelsShowNone, _
AutoText:=True, LegendKey:=False
ActiveChart.SeriesCollection(3).Values = "="
ActiveChart.SeriesCollection(3).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(3).ApplyDataLabels Type:=xlDataLabelsShowNone, _
AutoText:=True, LegendKey:=False
' ActiveChart.SeriesCollection(4).XValues = "="
' ActiveChart.SeriesCollection(4).Values = "=FABRİKAISKDAĞ.!R2C4:R11C4"
' ActiveChart.SeriesCollection(4).ApplyDataLabels Type:=xlDataLabelsShowValue, _
' AutoText:=True, LegendKey:=False
ActiveChart.SeriesCollection(1).XValues = "=FABRİKAISKDAĞ.!R2C2:R11C2"
ActiveChart.SeriesCollection(1).Values = "=FABRİKAISKDAĞ.!R2C3:R11C3"
ActiveChart.SeriesCollection(1).Name = "=FABRİKAISKDAĞ.!R1C2"
ActiveChart.SeriesCollection(1).ApplyDataLabels Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False