Automate bars based on task name?

Copper Contributor

Hey all, hoping someone can help me with this, or confirm or not whether it's possible!

 

So in MS Project, I'm looking to automate some custom progress bars that I have created, and I would like to have it automated based on the task title, for example:

Task Title - "Development" - Green bar

Task Title - "Commissioning" - Blue bar with gradient

Task Title - "Go Live" - Green triangle icon

 

Right now what I have set up is about 7 or 8 different custom bars that are linked to "flags", which allow the progress bars to be added by selecting "yes/no" in the appropriate column. This is fine for the moment, but surely there's a smarter way to go about this? I guess I'm looking for conditional formatting in a way? :thinking_face:

6 Replies
Chris --

The way you are approaching this situation is how I would handle the custom formatting of the Gantt Chart pane. The best way is to use custom Flag fields to identify what type of Gantt bar to display for specific tasks in your project schedule. Just a thought. Hope this helps.

@chrisbloggs1300 

You're halfway there. All you need to do is to customize each flag field with a formula such as shown below. But be careful, testing for text strings can be tricky (i.e. misspelling, capitalization, etc.)

2022-01-12_09-22-18.png

John

@John-project thank you for the informative response John, really appreciate it!

So what I've done is with the help of the lookup table function under the "text" field type is create these values based on the tasks:

chrisbloggs1300_1-1642009761135.png

It then becomes a dropdown, which based on the formula - [Text2]="*Text2 Name I created*", will autofill based on these flags which I have set up with the existing progress bars:

chrisbloggs1300_2-1642009883945.png

This works infinitely better than scrolling through 7/8 columns and lining up "yes/no" for each, but I'm still wondering if I can automate it just that little bit more...could I create an "if" statement for the "TaskName" column which looks at the actual task name field and auto-populates the "TaskName" column based on what it reads? E.g. =IF(A1=”Development”,Dev,"")...something along those lines! But then at the same time, I suppose I'm also looking at combining lookup with the formula field, which I imagine isn't possible?

 

Sorry for the essay! Throwing my thoughts in there wherever I can, aha!

 

 

@chrisbloggs1300 

Ouch! Stop! You're throwing your thoughts at me too fast!

 

Yes you can create a custom field formula to query the text string in the Name field and dump it in abbreviated version into your Text2 field and then use that to drive your Flag fields, but why? I must be missing something.

 

What you cannot do is to have a single custom field that has both a lookup and a custom field formula.

 

If I had a clearer understanding of exactly what you are trying to do I could help more, either with custom fields or VBA, but right now, it's kinda a fog.

John

Let me try to give you a quick breakdown of what I'm trying to do:
Create a "Project Roadmap Schedule" is my primary task, containing all our "focus" projects for our customers (software development), which is easy enough on its own.

But, I've added another level of complexity with the addition of these custom progress bars (different colors and icons) based on each task under each project, which all follow the same task arrangement:
Development
Rack & Stack
Commissioning
UAT
Shadowing
Go Live

I'm also trying to figure out how to customize the gantt timeline itself with the program increment the project is going through / has gone through. I thought it would be as easy as right clicking the quarter or the month and hitting edit, or something along those lines, but it appears to be hiding - possibly in plain sight!

@chrisbloggs1300 

Well you're still talking "past me". Remember, I'm not in your head and I can't see what you are doing so you'll have to explain what you want as if explaining to a third party (e.g. me).

 

What exactly is missing from the original custom field formula I gave you?

 

When talking about Timeline, you can separately color Timeline bars via Timeline Format > Font > fill icon but as far as I know you can't tie those colors to a custom field representing something in the Gantt Chart display.

 

John