+ Reply to Thread
Results 1 to 3 of 3

SetSourceData Chart

Hybrid View

  1. #1
    Registered User
    Join Date
    09-11-2009
    Location
    ludvika
    MS-Off Ver
    Excel 2003
    Posts
    28

    SetSourceData Chart

    I'm using the following code

    ActiveChart.SetSourceData Source:=Sheets("test").Range("A" & RowEnd(i - 1) & ":A" & RowEnd(i), "F" & RowEnd(i - 1) & ":F" & RowEnd(i)), _
                PlotBy:=xlColumns
    I only want column A and F to be in my chart, but im getting row A to F, what should the code be ?

    Thanks
    Last edited by vismbr; 09-22-2009 at 07:58 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,274

    Re: SetSourceData Chart

    Try this:
    ActiveChart.SetSourceData Source:=Sheets("test").Range("A" & RowEnd(i - 1) & ":A" & RowEnd(i) & ",F" & RowEnd(i - 1) & ":F" & RowEnd(i)), _
                PlotBy:=xlColumns
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    09-11-2009
    Location
    ludvika
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: SetSourceData Chart

    Thx, works!
    Last edited by vismbr; 09-22-2009 at 07:58 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1