+ Reply to Thread
Results 1 to 6 of 6

Stacked Column Chart with VBA

  1. #1
    Registered User
    Join Date
    12-29-2008
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    Stacked Column Chart with VBA

    I'm building Stacked Column chart with VBA. What I want is to stack the data in column I and G together for every compaies and separated by company. Folowing is the code which gives me a big trunk instead of the blocks separated by companies. The column A is the company name.

    Thank you very much in advance.

    Please Login or Register  to view this content.
    Last edited by dhartford; 01-02-2009 at 06:09 PM.

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

    Please Login or Register  to view this content.
    If not post example workbook.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    12-29-2008
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    Stacked Column Chart

    Quote Originally Posted by Andy Pope View Post
    Try this,

    Please Login or Register  to view this content.
    Andy,

    Wow! You are Hero. It is exactly what I want. Thank you so much. Could you explain to me with more details, such as why there is no loop needed, the syntax of formula of stacked chart...

    Very appreciate.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    You do not need to create a series for each point.

    I started by creating the chart manually and inspecting the series Formula.
    There you would see that the rows are specified as a range within a single series. Where as your code was plotting each row in each column.


    Please don't cross post without including links.
    Last edited by Andy Pope; 12-30-2008 at 12:04 PM.

  5. #5
    Registered User
    Join Date
    12-29-2008
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    Question about chart title

    Quote Originally Posted by Andy Pope View Post
    You do not need to create a series for each point.

    I started by creating the chart manually and inspecting the series Formula.
    There you would see that the rows are specified as a range within a single series. Where as your code was plotting each row in each column.
    I got it. Thanks again.

    I have another queation if you don't mind. This is about chart title.

    1. How to code a subtitle? e.g. in the following code, I want Date and Model to be on the next line of "Attach Exhaustion"

    2. What is the chart property to change the font and size?

    Your help is greatly appreciated.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    This is the sort of code needed to format all or parts of the title

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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