+ Reply to Thread
Results 1 to 5 of 5

Multiple 100% Stacked Column Chart, How to change Colors on Series Name

  1. #1
    Registered User
    Join Date
    04-12-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Multiple 100% Stacked Column Chart, How to change Colors on Series Name

    Hi All,
    Apologies but I am a VBA novice so really have no idea what I am doing and have been cutting and pasting snippets from around the web to try and get the functionality I need.

    I am using excel 2007 but saving as .xls to enable 2003 users to view the file so I don't know if that is causeing issues here either.

    Basically I've 4 worksheets with one 100% stacked column chart in each that I need to reassign colours to as everytime the sheet updates it seems to change the them of the charts. I've the same Series names for 3 out of 4 of the sheets and a different series for the 4th.

    The graphs may only be 1 series if all jobs are within or outside of SLA or if delivery is on time or not.

    The code I've applied is below sans 1 sheet:
    Please Login or Register  to view this content.
    So from what I can tell is happening with the code it selects the sheet, chart, series then applies the change. The issue is that it only seems to apply the change to the first series in the first chart, amongst my muddling around with it I've changed the colors in the code to see when it breaks and in this instance and it seems to work on all sheets required but only colours the first series it finds and leaves the second alone.

    Any help would be greatly appreciated (I know I need a course or a very long read to work this VBA out properly / at all, hopefully in the near future!)

    Thanks in advance!
    Andrew
    Last edited by AndrewG; 04-13-2011 at 11:53 AM. Reason: Solved

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

    Re: Multiple 100% Stacked Column Chart, How to change Colors on Series Name

    Not tested but something like this to check all series in the specified chart.

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

  3. #3
    Registered User
    Join Date
    04-12-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Multiple 100% Stacked Column Chart, How to change Colors on Series Name

    Hi Andy

    Thank you very much for your time, Very much appreciated!

    Unfortunately that didn't work, I modified the code to include the 3rd sheet to make sure that all is covered but that was it. I assume that I just needed to copy and paste your code into a new module? (unfortunately yes, this is the level of VBA understanding that I'm at...)

    Module 2 was the one that I was using to change the colours and put yours into Module 4 on the attached. The only sheets that are normally visible are the first 4 the rest are hidden normally.



    Thanks again!
    Last edited by Andy Pope; 04-13-2011 at 11:52 AM. Reason: Attachment removed as it contained confidential data.

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

    Re: Multiple 100% Stacked Column Chart, How to change Colors on Series Name

    I had mistyped a variable name. Works now.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-12-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Multiple 100% Stacked Column Chart, How to change Colors on Series Name

    Thanks Andy!!

    That got it sorted!

+ 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