Results 1 to 17 of 17

Thread: VBA plot a Scatter graph data - X and Y axis data taken from sheet row by row

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    See attached.Click button.
    Sub blah()
    With ActiveSheet.ChartObjects.Add(260, 80, 360, 400).Chart
      .ChartType = xlXYScatterLines
      For Each rw In Sheets("x").Cells(1).CurrentRegion.Rows
        With .SeriesCollection.NewSeries
          .XValues = rw
          .Values = Sheets("Y").Cells(rw.Row, 1).Resize(, rw.Columns.Count)
        End With
      Next rw
    End With
    End Sub
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •