+ Reply to Thread
Results 1 to 3 of 3

Defining graph series using VBA

  1. #1
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Defining graph series using VBA

    I have code that creates a graph from dynamic data. To do this I’m using a pre-created graph in a workbook that uses series in another worksheet in the same workbook. To change the graph – I just put new data in the worksheet cells that house the series data. The code works fine.

    This is a data sample
    junk1.png

    The challenge is I don’t know how to change the series through VBA so I’ve manually plugged in an end row value of $30.
    Junk2.jpg

    This creates a bunch of blanks in the graph when the data is less than 30 rows long.
    How can I set the correct series length with VBA code in the code below?


    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Defining graph series using VBA

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Re: Defining graph series using VBA

    I solved this with the following:

    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)

Similar Threads

  1. [SOLVED] Color Formatting of Graph Series (via Graph Series Label)
    By James McEwan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2015, 06:51 AM
  2. [SOLVED] Move from one series to the next series in a graph shortcut
    By nredman in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-17-2014, 02:45 AM
  3. Defining series values range from a single cell
    By stegngas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-29-2014, 12:36 PM
  4. [SOLVED] Second Axis for a Graph but with the same kind of graph for the two series?
    By Marceltcm in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-18-2013, 05:37 AM
  5. Replies: 0
    Last Post: 03-22-2012, 09:46 AM
  6. varied series for graph which adjusts series
    By sput_sput in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-06-2010, 02:54 PM
  7. series graph -- one series being added to another series
    By rich zielinski via OfficeKB.com in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-30-2005, 02:06 PM

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