Consulting

Results 1 to 4 of 4

Thread: Solved: Combo Chart creation

  1. #1
    VBAX Regular
    Joined
    Nov 2007
    Posts
    31
    Location

    Solved: Combo Chart creation

    I am looking to create a chart using VBA. The chart must be a combo Line/Area chart. I know how to do this with regular charts and have codes many examples, but I am running into a problem with this one.

    I have six columns of data. The first two I want to be for the first x-axis and the remaining four for the second x-axis. When I try to do this from the chart wizard, it simply splits the total of six columns into two groups - which is not what I want. How can I control in VBA the grouping I mentioned above?

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can you post a workbook with sample data and the Chart type you are after.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Regular
    Joined
    Nov 2007
    Posts
    31
    Location
    Yes, sorry about that. I have the attached with the data and a combo chart. The chart is not what I want, but the data groups 1 and 2 are how I need to control what gets placed on the chart.

    I need to have data Group1a and 1b as the area portion of the chart and data group2a-d as the lines and do so from VBA.

  4. #4
    VBAX Regular
    Joined
    Nov 2007
    Posts
    31
    Location
    Well, I kept at it and solved the problem on my own; however, I would thank all people that have helped in the past. The solution is posted here for reference only, in case someone else runs into this problem.

    Please note the formatting of the sheet and some of the variables I used are with purpose in the context of the "real" workbook this code lives in - this is just a sample. These variables were used as the range of cells will always be different.

    Anyway, bye for now.

Posting Permissions

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