+ Reply to Thread
Results 1 to 3 of 3

Column chart - Change color/value based on original y value

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    3

    Column chart - Change color/value based on original y value

    Hello, I need some help with column graphs.

    I have 2 columns of data which I use to make a column graph ( see attached file).

    What I want to do is change the color ("solid fill") of each column, based on a condition, if let's say the y-value is less than 85, make the column red, else leave it as it is. Also, there's cases where there's no y-value at all, in such case I'd like the column to get a value of 100 and fill it with gray color.

    I'm guessing I need to use a VBA script for this that would iterate over each column and format it based on the conditions I mentioned above. Not really familiar with VBA though, could you point me to the right direction ?

    Thank you for your time,
    Leo
    Attached Files Attached Files

  2. #2
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    129

    Re: Column chart - Change color/value based on original y value

    You could separate data into 3 column: Less than 85, More than or equal to 85, and blank. Then make a stacked column chart.
    See attached file.MulticolorColumn.xlsx
    Oldman Chatting: [email protected] Mailing: [email protected]

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    3

    Re: Column chart - Change color/value based on original y value

    Yes, that would work . However, I'll need to do about 30 graphs like this, and each column will have couple thousands of rows, so I was hoping to achieve this through VBA, If I can't figure it out that way though I'll probably do it your way. Thanks ptm

+ 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