+ Reply to Thread
Results 1 to 6 of 6

Excel column chart series conditional formatting

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    Romania
    MS-Off Ver
    Office 365
    Posts
    17

    Question Excel column chart series conditional formatting

    Hello,

    I have this project which I'm working on where I would like to conditionally format the 2nd series of a column chart based on the first series' values.
    For example if 2nd series is lower than 1st series, it should be colored in red. If it's greater than the first series, it should be colored in green, all this automatically based on data displayed on the chart. I could also use some VBA tricks, no problem with that.
    Here's the current chart:
    3642829038.png
    So here I would like to color the "Real" series based on "Budget" series values which will have a fixed color.

    I'd appreciate it if anyone could give me some pointers. Thanks!

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Excel column chart series conditional formatting

    I cant see the image you pasted, but, if I understand correctly, you want to change a cell color in a column? If so, conditional formatting should do it. Of course, it may not be that simple, but, I can not see the image.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    03-30-2012
    Location
    Romania
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Excel column chart series conditional formatting

    No, I want to change a column color in a chart based on the adjacent series' value.
    Here's the direct link to the image: http://easycaptures.com/fs/uploaded/762/6951584291.png

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Excel column chart series conditional formatting

    Ok, now I get it, sorry, I have no idea if that can be done or not.

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

    Re: Excel column chart series conditional formatting

    post example file rather than image
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    03-30-2012
    Location
    Romania
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Excel column chart series conditional formatting

    It's part of a really large file. Anyway, I've gone with the VBA way and so far I have indeed found a working version, though not that elegant but it does the job:
    Private Sub bigc()
    HTML Code: 
        ActiveSheet.ChartObjects("Chart 1").Activate
        Dim chr As Variant
        Dim chb As Variant
        chr = ActiveChart.SeriesCollection(2).Values
        chb = ActiveChart.SeriesCollection(1).Values
        If chr(1) > chb(1) Then
            ActiveChart.SeriesCollection(2).Points(1).Select
            With Selection.Format.Fill
                .Visible = msoTrue
                .ForeColor.RGB = RGB(0, 176, 80)
                .Transparency = 0
                .Solid
            End With
            Else
            ActiveChart.SeriesCollection(2).Points(1).Select
            With Selection.Format.Fill
                .Visible = msoTrue
                .ForeColor.RGB = RGB(255, 0, 0)
                .Transparency = 0
                .Solid
            End With
        End If
    And so on through all 12 points (months).
    It works, congrats to me!
    Last edited by neobux; 03-03-2015 at 01:00 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Conditional Formatting for Chart Series Based on Cell Colour
    By benjthom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 05:32 AM
  2. Conditional Formatting of a 3D Column Chart in Excel 2010
    By clobato in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2012, 06:27 PM
  3. Applying conditional formatting to a multiple series chart
    By sikey in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-02-2010, 09:55 AM
  4. Conditional Formatting of Data Series in a chart
    By joe90 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-27-2008, 06:17 AM
  5. Replies: 1
    Last Post: 07-29-2005, 09:05 AM

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