+ Reply to Thread
Results 1 to 3 of 3

Create Chart - 12 series offset one column from the last

  1. #1
    Registered User
    Join Date
    09-13-2005
    Location
    Northern Minnesota
    MS-Off Ver
    Office 2007
    Posts
    9

    Create Chart - 12 series offset one column from the last

    I'm interested in creating a scatter plot of 12 series as a new chart in its own sheet. The Y values are the same for each series, but the X Values may differ and are in consecutive columns in my data sheet (DataAll). The names for each series are in consecutive rows in a setup sheet (SetupAll)

    I want to do this several times for different sets of series, so I want a macro that is easily changed. I am getting an Object Required error '424' at line
    Please Login or Register  to view this content.
    Any idea why I am getting this error? I have included my code with the first 3 data series to be added.

    Also - will this chart update automatically if the X Values are updated?

    Thanks!
    V. Hagberg

    Please Login or Register  to view this content.
    Last edited by wruwtrix; 05-04-2009 at 11:31 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Create Chart - 12 series offset one column from the last

    The main problem is the XValues and Values objects of the seriescollection are not ranges but rather a variant that can accept range or array references.

    try this,
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-13-2005
    Location
    Northern Minnesota
    MS-Off Ver
    Office 2007
    Posts
    9

    Re: Create Chart - 12 series offset one column from the last

    Thanks for your help. I made a couple of changes to allow me to apply a custom chart template. The chart template had placeholders for 12 series, so I overwrote the series instead of adding new ones. I was also having problems with the chart having more than 12 series (couldn't figure out what was causing the problem, so I added code to delete any series in excess of the 12 I was interested in reprogramming.

    See final code below:
    Please Login or Register  to view this content.

+ 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