Conditional Formatting for a Project Timeline

Ferdo258

New Member
Joined
Jan 2, 2024
Messages
3
Office Version
  1. 2019
Hi, I'm trying to get the conditional formatting for a Project Timeline work right. As you can see cell "I14" or "I11" has 100% but doesn't say so in the displayed timeline, as not everything is orange.
Timeline uses only working dates from Monday to Friday. Unfortunately cannot upload a file here.
The current formula goes as follows =AND($I11>5%, $E11<=K$8,ROUNDDOWN(NETWORKDAYS($E11,$F11)*$I11,0)+$E11+1>=K$8)

Thanks for help.
Screenshot 2024-01-02 183321.png
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You are determining net workdays, then multiplying by the % complete. So far so good--that tells you how many workdays should have elapsed.
Rich (BB code):
=AND($I11>5%, $E11<=K$8,ROUNDDOWN(NETWORKDAYS($E11,$F11)*$I11,0)+$E11+1>=K$8)
but then you add that number of workdays to $E11 using a plain vanilla "+", which is adding calendar days. You need to do another workday calculation. Try this:

Rich (BB code):
=AND($I11>5%, $E11<=K$8,WORKDAY($E11+1,ROUNDDOWN(NETWORKDAYS($E11,$F11)*$I11,0))>=K$8)
Obviously not able to test this.

Although this forum does not support file attachments, it does provide an add-in (XL2BB, last button in the edit controls) that you can use in Excel to copy a range, and paste into a post. It will show formatting, formulas, etc. Also you can post a link to a cloud service like OneDrive, Dropbox, Google Docs, etc.
 
Upvote 0
How about you create two named ranges.
One named "TaskInProgress" with this formula when cell K10 is selected (the selection of the cell is important as these are relative formulas):

Excel Formula:
=(Sheet1!K$8 >= Sheet1!$E10) * (Sheet1!K$8 <= Sheet1!$F10)

And the other named "TaskCompleted" with this formula when cell K10 is selected:

Excel Formula:
=(Sheet1!K$8>=Sheet1!$E10)*(Sheet1!K$8<=WORKDAY(Sheet1!$E10,(Sheet1!$G10-1)*Sheet1!$I10))*(Sheet1!$I10>0)

Then you add two conditional formatting rules like this:

1704287357016.png


You will get this:

ProjectTimeline.xlsx
EFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMAN
7jun-8jun-15jun-22jun-29jul-6jul-13
8StartFinishDuration% Completed040506070811121314151819202122252627282902030405060910111213
9LMMJVLMMJVLMMJVLMMJVLMMJVLMMJV
104/6/20186/6/201830%
114/6/20186/6/2018310%
124/6/20186/6/2018390%
134/6/20186/6/20183100%
1412/6/201825/6/2018100%
1512/6/201825/6/20181010%
1612/6/201825/6/20181050%
1712/6/201825/6/20181090%
1812/6/201825/6/201810100%
1911/6/20184/7/2018180%
2011/6/20184/7/2018181%
2111/6/20184/7/201818100%
Sheet1
Cell Formulas
RangeFormula
K7,P7,U7,Z7,AE7,AJ7K7=O8
L8:AN8L8=WORKDAY(K8,1)
K9:AN9K9=LEFT(UPPER(TEXT(K8,"ddd")),1)
G10:G21G10=NETWORKDAYS(E10,F10)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K10:AN21Expression=TaskCompletedtextNO
K9:AN21Expression=TaskInProgresstextNO


Here is a working book:

ProjectTimeline.zip
 
Last edited:
Upvote 0
Sorry the range for the conditional formatting for TaskInProgress should be $K$10:$AN$21 (It doesn't really matter because there are no dates in columns start and finish in row 9, but it should be from row 10 onwards).
 
Upvote 0
You are determining net workdays, then multiplying by the % complete. So far so good--that tells you how many workdays should have elapsed.
Rich (BB code):
=AND($I11>5%, $E11<=K$8,ROUNDDOWN(NETWORKDAYS($E11,$F11)*$I11,0)+$E11+1>=K$8)
but then you add that number of workdays to $E11 using a plain vanilla "+", which is adding calendar days. You need to do another workday calculation. Try this:

Rich (BB code):
=AND($I11>5%, $E11<=K$8,WORKDAY($E11+1,ROUNDDOWN(NETWORKDAYS($E11,$F11)*$I11,0))>=K$8)
Obviously not able to test this.

Although this forum does not support file attachments, it does provide an add-in (XL2BB, last button in the edit controls) that you can use in Excel to copy a range, and paste into a post. It will show formatting, formulas, etc. Also you can post a link to a cloud service like OneDrive, Dropbox, Google Docs, etc.
Thanks, this looks the closest to what I was looking for. Maybe I did something wrong, but this time it has the opposite problem, task completed goes beyond task in progress. I have saved files on OneDrive, if you have time would appreciate your help. OneDrive
 
Upvote 0
Sorry the range for the conditional formatting for TaskInProgress should be $K$10:$AN$21 (It doesn't really matter because there are no dates in columns start and finish in row 9, but it should be from row 10 onwards).
thanks for you help, very much appreciated. I think this solves the problem with the static timeline, but not so much with the dynamic I'm trying to get.
 
Upvote 0
Sorry for the long delay. You have not used the word "dynamic" until now. What exactly is dynamic about what you want to do?
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top