Announcement

Collapse
No announcement yet.

[Solved] Charts : Creating a chart manually - adding data po

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Solved] Charts : Creating a chart manually - adding data po

    How can one add data points manually to create a chart? I can add the sheet and create the chart but I can't figure out how to create the array of data points and get them plotted.

    My data sets overlap so many points actually have multiple shapes and labels overlapping so many are illegible and difficult to work with. I'm considering just putting a single point wherever one should be and creating a single label listing all the data sets it applies to.

    thanks

  • #2
    Hi Kotm14,

    To add points manually to your chart first select the chart and then from the Chart menu select Add Data.

    This will allow you add data as either a new series or new points.

    Cheers
    Andy

    Cheers
    Andy

    Comment


    • #3
      Thanks,

      Sorry, I should have been more specific - I meant add points manually in a VBA subroutine.

      The data I want to graph is based on but not directly the data in my spreadsheet. My plan was to analyze the data, then create the array of points and the SeriesCollection in VBA. However, I can't figure out or find how to create the points or add them.

      Thanks again.

      Comment


      • #4
        Hi,

        This routine will add datapoints and a data series to an existing chart.

        Sub AddToChart()
        Dim rngNewPoints As Range
        Set rngNewPoints = Range("A1:A4")
        With ActiveChart
        ' new points
        With .SeriesCollection
        .Extend Source:=rngNewPoints
        End With
        ' new series
        .SeriesCollection.NewSeries
        .SeriesCollection(.SeriesCollection.Count).Values = rngNewPoints
        End With
        End Sub[/code]

        Cheers
        Andy

        Cheers
        Andy

        Comment

        Working...
        X