+ Reply to Thread
Results 1 to 4 of 4

Change the data range for an existing chart

  1. #1
    Registered User
    Join Date
    08-10-2013
    Location
    Roseville, CA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Change the data range for an existing chart

    Hi,

    I was given responsibility for some existing code that takes data from a table (range T55:Y55) and generates
    a line chart....and this works fine. The chart (named: "TCEQSMBFPY") was set up with the data range entered
    manually via RMC on the chart --> Select Data --> Edit chart data series.... This was set up for a fixed range
    table for 6 months of data and I want to - via VBA - programmatically change the month range between 6 (T55:Y55)
    and 12 (T55:AE55) months.

    How do I specify that, for an existing chart named "TCEQSMBFPY", change the current data range: T55:Y55 for 6 months of data to
    T55:AE55 for 12 months of data?

    Thanks for any help provided.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Change the data range for an existing chart

    Hi,

    Assuming there is only one data series on the chart;

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    08-10-2013
    Location
    Roseville, CA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Change the data range for an existing chart

    Thanks Sweep! This does exactly what is required however, I'll need to also change my (Y) axes
    from 12months to 6months...Currently, the horizontal axis was manually set to: Axis label range: =
    'TCEQ Segments'!$T$54:$AE$54 (for 12months)
    The 6month range would be: T54:Y54.
    How do I change the horizontal axis range in VBA?

    Thanks again.

  4. #4
    Registered User
    Join Date
    08-10-2013
    Location
    Roseville, CA, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Change the data range for an existing chart

    Any suggestions/recommendations for using VBA to change a chart's horizontal axis
    range from something like T54:AE54 (for 12months) to T54:Y54 (for 6months).

    Thanks much!
    Last edited by Eebigdog; 11-09-2016 at 09:30 PM.

+ 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. Add range of data to existing Access table and delete if already existing
    By rousseauassociates in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-26-2016, 11:11 AM
  2. Modify range of chart series in existing charts to include last column
    By gregersdk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-05-2015, 08:32 AM
  3. Code for applying same change to range of existing formulas
    By MontrealMTL in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-13-2015, 03:38 PM
  4. [SOLVED] Change chart source data range
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2015, 10:51 AM
  5. [SOLVED] Change Chart Data Range to show YTD data
    By Harribone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2015, 04:12 PM
  6. Change RefersTo of an already existing range name
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2012, 05:19 PM
  7. Cannot add new data to existing chart
    By syed.faisal in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-05-2012, 11:34 AM

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