+ Reply to Thread
Results 1 to 8 of 8

Modify range of chart series in existing charts to include last column

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Post Modify range of chart series in existing charts to include last column

    Hello there! I have a smalle problem I thought was typical, but I can find no info on it on Google, in this forum or anywhere.

    I have a series of charts, see underneath, that I am pretty happy about. However, from time to time I have to expand the charts data range with new columns. I'd like to be able to use VBA to update all the series to include the new columns.

    As an example, I'd propose using this series: =SERIES('BIA Results'!$B$12;'BIA Results'!$D$1:$M$1;'BIA Results'!$D$12:$M$12;2)
    The bold part where it needs changing with the VBA code.

    Is that possible? Seems to me that it should "just" find the column using xlToRight, find the series the series and interchange it with and edited series with new values. I just cannot figure that out though.

    I hope you can help,


    GregersDK

    (The picture upload refuses to work, so here are the links)
    http://s21.postimg.org/3qb72qn93/Charts.png
    http://s13.postimg.org/5y0uf5nrb/Matrix.png
    Attached Images Attached Images
    Last edited by gregersdk; 10-04-2015 at 12:25 PM.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Modify range of chart series in existing charts to include last column

    I can't test code on an image.
    Please post your workbook.

    ViewPic.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Modify range of chart series in existing charts to include last column

    Perhaps it is better to use dynamic range for graphs
    it's automatic, no code needed,
    check here:

    http://chandoo.org/wp/2009/10/15/dyn...t-data-series/

    Vicho

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Modify range of chart series in existing charts to include last column

    Quote Originally Posted by vichopalacios View Post
    Perhaps it is better to use dynamic range for graphs
    it's automatic, no code needed,
    Vicho

    He wants columns and I'm not sure if there's a way to write a dynamic named range formula that automatically incorporates new columns?

    There's people on here that are awesome formula artists.

    Maybe when you add a column to an actual table, if the table is the data source?

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Re: Modify range of chart series in existing charts to include last column

    Here is the Excel file. There is already a button-push macro (nothing to do with this problem). I hope that's okay.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Modify range of chart series in existing charts to include last column

    Hi Skywriter
    I must agree with you about those artists moving around the forum
    but this one is not so complicated following Chandoo instructions .

    Hi gregersdk
    In the attached file I copied the first graph down a then
    I've made the variable ranges, increasing columns
    there are some notes in each sheet

    Using the same approach, you can make the same procedure for all the graphs.
    I hope it is usefull for you

    Please comment us how it goes

    Vicho
    Attached Files Attached Files
    Last edited by vichopalacios; 10-04-2015 at 08:22 PM.

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Modify range of chart series in existing charts to include last column

    Okay that seems like a good way to encompass all the columns, but why point to a formula in another cell?
    Maybe this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Could be this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Modify range of chart series in existing charts to include last column

    Hi Skywriter

    I was trying to show gregersdk the way of assembling the formula, just that
    after this obviously it is possible to be sharp the lines.

    regards
    Vicho

+ 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. Help modify existing code to include next page down in a sheet.
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2015, 01:04 PM
  2. Replies: 2
    Last Post: 11-03-2014, 12:06 PM
  3. Chart series to only include data that match criteria
    By carl.jones in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-28-2014, 10:14 AM
  4. Modify an existing Named Range
    By SueJB in forum Excel General
    Replies: 3
    Last Post: 07-12-2012, 06:16 PM
  5. Modify Sumproduct to include helper column
    By JDarling in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-17-2007, 06:03 PM
  6. Need help to modify code to include more than 1 Column
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2007, 02:08 AM
  7. [SOLVED] How do I not include empty cell value chart labels in pie charts?
    By JMarble in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-13-2005, 04:06 PM

Tags for this Thread

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