Format my project to automatically change the color of the Gantt b

F

Float

How do I format my project to automatically change the color of the Gantt bar
or the cell with the finish date. This would be based on the start and
finish dates of each task in relation to the current date. In example a task
past due would be red. Yellow the task started and maybe green its complete.
Thanks for any help you can provide.
 
J

John

Float said:
How do I format my project to automatically change the color of the Gantt bar
or the cell with the finish date. This would be based on the start and
finish dates of each task in relation to the current date. In example a task
past due would be red. Yellow the task started and maybe green its complete.
Thanks for any help you can provide.

Float,
Take a look at my responses to a post in this newsgroup last Monday
(5/4/09) titled: "Bar Text Won't Display in Gantt Chart". I explain the
steps to set up a formula and custom bar style which you should be able
to adapt for your needs.

As far as automatically changing the cell background color, that would
require a VBA macro and Project 2007. You can change the font color of
the Finish field in earlier versions of Project but it will still
require VBA.

Hope this helps.

John
Project MVP
 
F

Float

John,
Thanks for your reply. I seem to be having trouble with my formula. What I
would like to have happen is the Gantt bar go to red when the current date is
past the finish date. I tried substituting "Date" and "CurrentDate" in where
you had someone else put in "Deadline". I substituted "Start" and the bars
went red so I think it is in my formula. Would also like the bar to turn
yellow when the current date is within 2 weeks of the finish date. Thanks
for your insight and time.
Float
 
J

John

Float said:
John,
Thanks for your reply. I seem to be having trouble with my formula. What I
would like to have happen is the Gantt bar go to red when the current date is
past the finish date. I tried substituting "Date" and "CurrentDate" in where
you had someone else put in "Deadline". I substituted "Start" and the bars
went red so I think it is in my formula. Would also like the bar to turn
yellow when the current date is within 2 weeks of the finish date. Thanks
for your insight and time.
Float

Float,
OK, you force my hand. Try the following:
1. Customize the Flag1 field with the formula
IIf([Finish]<=[Current Date]+14,Yes,No)
2. Customize the Flag2 field with the formula
IIf([Finish]<[Current Date],Yes,No)
3. Add a new bar style with a yellow color and "show for...",
Normal,Flag1
4. Add another new bar style with a red color and "show for...",
Normal,Flag2

Since bar styles at the bottom of the bar styles list take precedence
over bar styles at the top of the list, if there is a conflict, make
sure the new bar in item 3 above is after the default blue bar and that
the new bar in item 4 above is after the new bar in item 3.
Note: a yellow bar isn't very visible. I suggest you add a shape to the
start and end of the bar, or use a different more visible color.

Hope this helps.

John
Project MVP
 
F

Float

John,
Thanks for the advice. Tried what you suggested and it seems to be working.
You've opened my eyes some. Suggestion to put a shape on the start and end
of the yellow bar was right on as well. Thanks again.
Float

John said:
Float said:
John,
Thanks for your reply. I seem to be having trouble with my formula. What I
would like to have happen is the Gantt bar go to red when the current date is
past the finish date. I tried substituting "Date" and "CurrentDate" in where
you had someone else put in "Deadline". I substituted "Start" and the bars
went red so I think it is in my formula. Would also like the bar to turn
yellow when the current date is within 2 weeks of the finish date. Thanks
for your insight and time.
Float

Float,
OK, you force my hand. Try the following:
1. Customize the Flag1 field with the formula
IIf([Finish]<=[Current Date]+14,Yes,No)
2. Customize the Flag2 field with the formula
IIf([Finish]<[Current Date],Yes,No)
3. Add a new bar style with a yellow color and "show for...",
Normal,Flag1
4. Add another new bar style with a red color and "show for...",
Normal,Flag2

Since bar styles at the bottom of the bar styles list take precedence
over bar styles at the top of the list, if there is a conflict, make
sure the new bar in item 3 above is after the default blue bar and that
the new bar in item 4 above is after the new bar in item 3.
Note: a yellow bar isn't very visible. I suggest you add a shape to the
start and end of the bar, or use a different more visible color.

Hope this helps.

John
Project MVP
 
J

John

Float said:
John,
Thanks for the advice. Tried what you suggested and it seems to be working.
You've opened my eyes some. Suggestion to put a shape on the start and end
of the yellow bar was right on as well. Thanks again.
Float

Float,
You're welcome and thanks for the feedback.

John
Project MVP
John said:
Float said:
John,
Thanks for your reply. I seem to be having trouble with my formula.
What I
would like to have happen is the Gantt bar go to red when the current
date is
past the finish date. I tried substituting "Date" and "CurrentDate" in
where
you had someone else put in "Deadline". I substituted "Start" and the
bars
went red so I think it is in my formula. Would also like the bar to turn
yellow when the current date is within 2 weeks of the finish date.
Thanks
for your insight and time.
Float

Float,
OK, you force my hand. Try the following:
1. Customize the Flag1 field with the formula
IIf([Finish]<=[Current Date]+14,Yes,No)
2. Customize the Flag2 field with the formula
IIf([Finish]<[Current Date],Yes,No)
3. Add a new bar style with a yellow color and "show for...",
Normal,Flag1
4. Add another new bar style with a red color and "show for...",
Normal,Flag2

Since bar styles at the bottom of the bar styles list take precedence
over bar styles at the top of the list, if there is a conflict, make
sure the new bar in item 3 above is after the default blue bar and that
the new bar in item 4 above is after the new bar in item 3.
Note: a yellow bar isn't very visible. I suggest you add a shape to the
start and end of the bar, or use a different more visible color.

Hope this helps.

John
Project MVP
:

How do I format my project to automatically change the color of the
Gantt
bar
or the cell with the finish date. This would be based on the start
and
finish dates of each task in relation to the current date. In
example a
task
past due would be red. Yellow the task started and maybe green its
complete.
Thanks for any help you can provide.

Float,
Take a look at my responses to a post in this newsgroup last Monday
(5/4/09) titled: "Bar Text Won't Display in Gantt Chart". I explain the
steps to set up a formula and custom bar style which you should be able
to adapt for your needs.

As far as automatically changing the cell background color, that would
require a VBA macro and Project 2007. You can change the font color of
the Finish field in earlier versions of Project but it will still
require VBA.

Hope this helps.

John
Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top