+ Reply to Thread
Results 1 to 3 of 3

Creating multiple Charts with Multiple Ranges of Data

  1. #1
    Registered User
    Join Date
    10-05-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Creating multiple Charts with Multiple Ranges of Data

    Hi all! Newbie to your forum.

    I have recently begun studying Visual Basic from library books and find it most intriguing. I am currently working on a problem of creating multiple charts from multiple ranges of data. For instance:

    cells B2 thru E5 have data for chart1
    cells G2 thru J5 have data for chart2
    cells L2 thru O5 have data for chart3
    cells B8 thru E11 have data for chart4
    cells G8 thru J11 have data for chart5
    cells L8 thru O11 have data for chart6

    As you can see - the data will alway be located in array of cells 4wide by 4high.

    This goes on for another 6 charts.

    One problem I am having besides creating the charts is when no data exists in one of the arrays, no chart should be created.

    All charts will be placed on a worksheet named Charts.

    Once all charts have been created, I use another sub to automatically size and line up the charts. Then I will use an additional sub to create a gif file for a virtual snapshot of the charts created.

    Any help you can offer will certainly be appreciated.

    Thanks you
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating multiple Charts with Multiple Ranges of Data

    You did not include any of the code you have tried or even an example of the chart you are trying to create.

    As you are learning I will outline the approach I would take rather than simply give you code.

    Start by recording a macro of you creating a chart.

    Modify this code so it will take parameters such as range of cells.

    The create a loop to get the various range of cells and pass this information to the chart creation routine.

    You can use worksheet functions like COUNTA to determine empty ranges.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-05-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Creating multiple Charts with Multiple Ranges of Data

    Thanks Andy,

    I was able to crack it today. I will modify the code to change pertinent detail information, and then I will post it. I would love some pointers on how to make it less lengthy. After all, that is how I have been learning from your participants on this forum.

    Thanks again.

+ 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.6.0 RC 1