View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Changing color of single bar based on x-axis date value

You don't need VBA; you can make a conditional chart using one or more extra
series:

http://peltiertech.com/Excel/Charts/...nalChart1.html

If you want to use VBA for some other reason, you could adjust the last
couple macros in this article (it's about pie charts, but the macros
shouldn't care):

http://pubs.logicalexpressions.com/P...cle.asp?ID=390

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


wrote in message
ups.com...
I have a bar chart with numeric values for the y-axis, and Month-Year
values for the x-axis values. I would like to be able to use VBA to
change the color of just one of the bars whose x-axis value corresponds
to a specific month-year, like Jun-05 (The month-year could be text, if
that makes the example easier). Does anyone have a snippet of code that
would allow me to automate the coloring of just one bar based on the
x-axis value?

Thanks,

Carroll Rinehart
Bel Air, MD