• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Change Column Chart Color Based on Cell Value or Cell Color

HanSam

Member
Hi,

Is it at all possible to change the column chart color (1 series only) based purely on cell value or cell color?

Say I have a value on A1 that is being generated from another cell. I applied a conditional formatting on it that changes the cell color to green (if the value is negative) and red (if the value is positive). Assuming that cell (A1) is part of a table that is being charted (stacked column chart), I now want the column chart series that hold A1's data to change color as A1 change color. Does that make sense? And I only need to change 1 value of the whole chart.

Thanks,
Renz
 

Attachments

  • Sample.xlsx
    15.4 KB · Views: 3
Yes

B1: =IF(H1,0,G1)
C1: =IF(H1,G1,0)
Copy both Down

Now add a new series to the chart
Series 2: C1:C10

Now put False in H1:H10

Now make H1 True
upload_2016-9-19_12-22-33.png

You can also have multiple Columns Highlighted
upload_2016-9-19_12-21-50.png

see attached file:
 

Attachments

  • Sample Chart.xlsx
    15.8 KB · Views: 7
Hi HanSam,

This is possible thru VBA.

See if this is OK.

Hi,

Is it at all possible to change the column chart color (1 series only) based purely on cell value or cell color?

Say I have a value on A1 that is being generated from another cell. I applied a conditional formatting on it that changes the cell color to green (if the value is negative) and red (if the value is positive). Assuming that cell (A1) is part of a table that is being charted (stacked column chart), I now want the column chart series that hold A1's data to change color as A1 change color. Does that make sense? And I only need to change 1 value of the whole chart.

Thanks,
Renz
 

Attachments

  • Chart Color Chagne.xlsm
    21.6 KB · Views: 13
Back
Top