• 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.

Axis colors that match values (red text = negative value)

mswenoflb

New Member
Hi all, I am trying to figure out how a chart can display a text color based on the data value. for instance, on a bar graph, I want the positive values to show black text and the negative values to display red text.


I can make the text color match the value (conditional formatting) but the chart axis does not pick up the color, just the text.


Any ideas are appreciated.


Thanks,


Mark
 
Mark... here is a post right on the mark http://chandoo.org/wp/2009/01/29/colors-in-excel-chart-labels-trick/
 
Chandoo, this worked very well for the column data labels. What I want to do if it is possible is to change the text of the axes descriptions to match the colors I have created in the source data. For example, the X axes labels below in my spreadsheet are colored


Test 1 (Black text) Test 2 (Red text) Test 3 (red text) Test 4 (Black text)


When the axis labels are selected, they appear as black text in the chart. I suspect this is a VBA solution. Any other ideas?


Mark
 
The suggestion works great. One should know that the example shown on the Andy Pope website are for 2003. I did find it much easier to do the line graph work by initailing seting the values higher to make it easier to select the individual lines. After all formating was complete, I changed the values to zero and the chart worked perfectly.


Mark
 
Back
Top