Consulting

Results 1 to 4 of 4

Thread: Sleeper: Multiple Charts with dynamic ranges

  1. #1

    Sleeper: Multiple Charts with dynamic ranges

    Hello,

    I frequently analyze data with charts and have to copy the same chart over and over again...select the new range...yada yada yada.

    The problem is that the ranges are not the same height (# rows).

    For example:

    Category Segment # of Items Dollars
    Gum Fun 30 1000
    Gum Fun 40 2500
    Gum Fun 45 3000
    Gum Mild 20 1200
    Gum Mild 18 1700

    Assuming that the list continues and the values for Category change...How can I create the same chart (let's say a column (dollars) and line (items) chart) for each "range"??

    I have limited programming knowledge (but a good imagination). I was thinking that one way could be to loop through the list and identify and then name each range. The second part would be to loop through the ranges and create the charts.

    Any help would be greatly appreciated.

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You can certainly loop through the range and create charts specific to each range. Can you post your workbook so we can have a closer look at your data and what you want to accomplish?

  3. #3
    VBAX Contributor Aaron Blood's Avatar
    Joined
    Sep 2004
    Location
    Palm Beach, Florida, USA
    Posts
    130
    Location
    Quote Originally Posted by jmenche
    Hello,

    I frequently analyze data with charts and have to copy the same chart over and over again...select the new range...yada yada yada.

    The problem is that the ranges are not the same height (# rows).

    For example:

    Category Segment # of Items Dollars
    Gum Fun 30 1000
    Gum Fun 40 2500
    Gum Fun 45 3000
    Gum Mild 20 1200
    Gum Mild 18 1700

    Assuming that the list continues and the values for Category change...How can I create the same chart (let's say a column (dollars) and line (items) chart) for each "range"??

    I have limited programming knowledge (but a good imagination). I was thinking that one way could be to loop through the list and identify and then name each range. The second part would be to loop through the ranges and create the charts.

    Any help would be greatly appreciated.
    ...or perhaps you only need one chart.

    Maybe think about a macro that would either:
    A) Cycle thru the ranges and produce an image of the chart referencing the range.
    B) Create one chart that includes all ranges as seperate series, then use a simple autofilter to toggle hide/show just the series you want.

    Sometimes better to not have 100's of chart objects stored in your app if you can help it.

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi jmenche,
    Welcome to VBAX.
    If you want to post data, click on the Go Advanced button below the message box, and click on the Manage Attachments button. You will need to zip your excel file in order to send it. Please remove any "sensitive" data, email addresses and the like.
    Regards
    MD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •