title: Labeling last data points across multiple graphs and series
body: <p>I'm currently trying to add a data label to only the last point of each series in each graph on a worksheet. I'm currently adapting one of the solutions proposed here: "<a href="https://superuser.com/questions/1285179/adding-data-label-only-to-the-last-value">https://superuser.com/questions/1285179/adding-data-label-only-to-the-last-value</a>". </p>
  
  <p>However, my code keeps on popping up with the error: "Runtime error '13', type mismatch". When I go in debug mode, it higlights the line "Set chrt = ws.ChartObjects(Chart_Name)". </p>
  
  <pre><code>Sub LastDataLabel()
  
  
  Dim Chart_Name As String
  Dim i, Total_Charts, Total_Series As Integer
  
  Dim ws As Worksheet
  Dim chrt As Chart
  Dim srs As Series
  Dim pnt As Point
  Dim p As Integer
  
  Application.ScreenUpdating = False
  
  Set ws = ActiveSheet
  
  Total_Charts = Range("C12").Value
  
  For i = 1 To Total_Charts
      Chart_Name = ActiveSheet.Cells(14 + i, 2).Value 'A list of all chart names exists along this range
      Set chrt = ws.ChartObjects(Chart_Name)
      Total_Series = chrt.SeriesCollection.Count
  
      For j = 1 To Total_Series
          Set srs = chrt.SeriesCollection(j)
  
          srs.ApplyDataLabels
  
          For p = 1 To srs.Points.Count - 1
              Set pnt = srs.Points(p)
  
              pnt.DataLabel.Text = ""
          Next
  
          srs.Points(srs.Points.Count).DataLabel.Format.TextFrame2.TextRange.Font.Size = 10
          srs.Points(srs.Points.Count).DataLabel.Format.TextFrame2.TextRange.Font.Name = "Arial"
      Next j
  Next i
  
  
  
  End Sub
  </code></pre>
  
  <p>Any and all help is greatly appreciated. Thank you!</p>