Macro in excel to change color in bar chart to reflect status

I have a bar chart in excel 2007, saved it to 2003. It is charting due dates of open issues. What I want to do is change the color of the bar when an item is past due(red), within 30 days of being due(yellow), and on target(green). I am attaching my spreadsheet. Can someone please show me how to do this. I attempted this over the weekend but couldn't get it to work in my spreadsheet. So I am opening a new question so I can reward the points.. thanks
gantt-chart-example-5-.xls
armymom13Asked:
Who is Participating?
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello armymom,

you can do that without any macros, if you just lay out your data accordingly.

I've added a few columns that will populate with the days for completeness, depending on the difference between todays date and the due date. Each of these columns has been added as a data series with its own color. Only one of these three series will ever have a value > 0, so only that value will be visible in the chart.

The order of the data series is important. Make sure that Due Date is the last series in the list.

The percentage labels got screwed up a bit, so I added a label series, set the values to 0 and stacked them onto the "on target" series. Then I used the Chart Labeller to assign the percentage labels to that series.

You can of course hide the unwanted columns, but then you need to make sure that you chart hidden cells! See attached.

cheers, teylyn

gantt-chart-example-6-.xls
0
 
gtglonerCommented:
0
 
armymom13Author Commented:
Thank you very much, I am still learning excel 2007, and this is a great help...
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Thanks for the grade, armymom!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.