+ Reply to Thread
Results 1 to 4 of 4

Thread: Creating a Macro to edit charts

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Thumbs up Creating a Macro to edit charts

    I would like to create a Macro to speed up a tedious process.

    My charts are updated weekly as new data is entered. I would always like the chart (generally combined bar and line) to show 13 weeks of data. Currently, I right click on the chart, chose the "select data" option and then manually adjust the legend entries and horizontal axis labels to reflect 13 weeks of data. This is repeated for each data series on every chart.

    Is there an easier way to do this?

    I hope I was clear. Please ask if you don't understand the process.

  2. #2
    Registered User
    Join Date
    10-22-2007
    Location
    Mumbai, India
    MS-Off Ver
    MS Excel 2007
    Posts
    56

    Re: Creating a Macro to edit charts

    i could suggest you an alternate way to solve the process but dont know whether you will like it or not.

    Let your charts pickup the data from the same range and instead of changing the ranges change the data every week. There are again many ways to change the data every week.

    You can write some macros or even simple vlookup types formulas which will change the data in the range in such a manner that your oldest data will be moved out of the range and the latest data will be populated in the range and hence your chart could be updated easily. Try it if it works for you.

  3. #3
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,150

    Re: Creating a Macro to edit charts

    Hello newatmacros,

    no need for macros to do this. You just need to set up a dynamic range and use that range name to define the chart series.

    For more details about dynamic charts, check out, http://peltiertech.com/Excel/Charts/Dynamics.html especially http://peltiertech.com/Excel/Charts/DynamicLast12.html

    cheers

  4. #4
    Registered User
    Join Date
    05-13-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Creating a Macro to edit charts

    Wow, thanks Teylyn!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0