Fill Column cells based on Start and End date with Date in cell

andyka

Board Regular
Joined
Sep 20, 2021
Messages
52
Office Version
  1. 2019
Platform
  1. Windows
Hi

I need help creating something similar to a Gantt.
I have Start date and End dates with activity status.
I want columns to be filled with color based on the key between the start and end date under correct column. Is it possible also to add start and end date on the colored cell.
Also let you know that some task only have either Start or End Date.
Please Help!
Thank you in advance

Book1
ABCDEFGHIJKLMNOPQR
1KEYNot Started
2InProgress
3Completed
4Activity NameStartFinishActivity StatusOct-21Nov-21Dec-21Jan-22Feb-22Mar-22Apr-22May-22Jun-22Jul-22Aug-22Sep-22Oct-22Nov-22
5 29-Oct-21
6 10670.5.11 OST - P1
7 SG 0 - TRA (10%)02/10/2129/11/21Not Started02/10/2129/11/21
8 Stage Gate 0 Complete29/11/21Not Started
9 Start Definition Phase12/10/21Completed
10 10670.5.12 OST - P2
11 SG 0 - TRA (10%)14/10/2129/12/21InProgress
12 Stage Gate 0 Complete29/11/21Not Started
13 Stage Gate 1 Approved29/12/21Not Started
14 Summary - Concept (Planning Package)22/12/2120/02/22Not Started
15 SG0 to SG1 LOE18/11/2115/04/22Not Started
16 10670.5.15 OST - 07
17 Receive Expression of Interest from AWE Sponsor29/10/21Completed29/10/21
18 Start18/12/21Completed
19 02-Nov-21
20 10670.5.12 OST - P2
21 Update Risk Register14/11/2102/09/22Not Started14/11/2102/09/22
22 Update MDAL28/03/2102/05/21Not Started
23 04-Nov-21
24 10670.5.12 OST - P2
25 Risk Register Review23/10/2104/06/22Not Started
26
Sheet1
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
try this
----------------------
Fill Column cells based on Start and End date with Date in cell.xlsx
ABCDEFGHIJKLMNOPQR
1KEYNot Started
2InProgress
3Completed
4Activity NameStartFinishActivity Status10/1/202111/1/202112/1/20211/1/20222/1/20223/1/20224/1/20225/1/20226/1/20227/1/20228/1/20229/1/202210/1/202211/1/2022
5 29-Oct-21
6 10670.5.11 OST - P1
7 SG 0 - TRA (10%)10/2/202111/29/2021Not Started10/2/202111/29/2021            
8 Stage Gate 0 Complete11/29/2021Not Started 11/29/2021            
9 Start Definition Phase10/12/2021Completed10/12/2021             
10 10670.5.12 OST - P2              
11 SG 0 - TRA (10%)10/14/202112/29/2021InProgress10/14/2021 12/29/2021           
12 Stage Gate 0 Complete11/29/2021Not Started 11/29/2021            
13 Stage Gate 1 Approved12/29/2021Not Started  12/29/2021           
14 Summary - Concept (Planning Package)12/22/20212/20/2022Not Started  12/22/2021 2/20/2022         
15 SG0 to SG1 LOE11/18/20214/15/2022Not Started 11/18/2021    4/15/2022       
16 10670.5.15 OST - 07              
17 Receive Expression of Interest from AWE Sponsor10/29/2021Completed10/29/2021             
18 Start12/18/2021Completed  12/18/2021           
19 02-Nov-21              
20 10670.5.12 OST - P2              
21 Update Risk Register11/14/20219/2/2022Not Started 11/14/2021         9/2/2022  
22 Update MDAL3/28/20215/2/2021Not Started              
23 04-Nov-21              
24 10670.5.12 OST - P2              
25 Risk Register Review10/23/20216/4/2022Not Started10/23/2021       6/4/2022     
working
Cell Formulas
RangeFormula
E7:R25E7=IFERROR(IFS(DATE(YEAR($B7),MONTH($B7),1)=E$4,$B7,DATE(YEAR($C7),MONTH($C7),1)=E$4,$C7),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E7:R25Expression=AND($D7=$B$1,IFS(AND($B7<>"",$C7<>""),AND(E$4>=DATE(YEAR($B7),MONTH($B7),1),E$4<=DATE(YEAR($C7),MONTH($C7),1)),AND($B7="",$C7=""),"",OR($B7="",$C7=""),IF(DATE(YEAR(MAX($B7,$C7)),MONTH(MAX($B7,$C7)),DAY(1))=E$4,TRUE)))textNO
E7:R25Expression=AND($D7=$B$2,IFS(AND($B7<>"",$C7<>""),AND(E$4>=DATE(YEAR($B7),MONTH($B7),1),E$4<=DATE(YEAR($C7),MONTH($C7),1)),AND($B7="",$C7=""),"",OR($B7="",$C7=""),IF(DATE(YEAR(MAX($B7,$C7)),MONTH(MAX($B7,$C7)),DAY(1))=E$4,TRUE)))textNO
E7:R25Expression=AND($D7=$B$3,IFS(AND($B7<>"",$C7<>""),AND(E$4>=DATE(YEAR($B7),MONTH($B7),1),E$4<=DATE(YEAR($C7),MONTH($C7),1)),AND($B7="",$C7=""),"",OR($B7="",$C7=""),IF(DATE(YEAR(MAX($B7,$C7)),MONTH(MAX($B7,$C7)),DAY(1))=E$4,TRUE)))textNO
Cells with Data Validation
CellAllowCriteria
D7:D9List=$B$1:$B$3
D11:D15List=$B$1:$B$3
D21:D22List=$B$1:$B$3
D25List=$B$1:$B$3
D17:D18List=$B$1:$B$3
 
Upvote 0
Good Morning ExceLoki
Not solved yet I am missing format and dates on row number 22. I amended the formula to start formula and format from Cell E5 as I may have data in Cell E5. Please help. Thank you in Advance

Gantt with dates.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1KEYNot Started
2InProgress
3Completed
4Activity NameStartFinishActivity StatusOct-21Nov-21Dec-21Jan-22Feb-22Mar-22Apr-22May-22Jun-22Jul-22Aug-22Sep-22Oct-22Nov-22
5 29-Oct-21              
6 10670.5.11 OST - P1              
7 SG 0 - TRA (10%)02/10/2129/11/21Not Started02/10/2129/11/21            
8 Stage Gate 0 Complete29/11/21InProgress 29/11/21            
9 Start Definition Phase12/10/21Completed12/10/21             
10 10670.5.12 OST - P2              
11 SG 0 - TRA (10%)14/10/2129/12/21InProgress14/10/21 29/12/21           
12 Stage Gate 0 Complete29/11/21Not Started 29/11/21            
13 Stage Gate 1 Approved29/12/21Not Started  29/12/21           
14 Summary - Concept (Planning Package)22/12/2120/02/22Not Started  22/12/21 20/02/22         
15 SG0 to SG1 LOE18/11/2115/04/22Not Started 18/11/21    15/04/22       
16 10670.5.15 OST - 07              
17 Receive Expression of Interest from AWE Sponsor29/10/21Completed29/10/21             
18 Start18/12/21Completed  18/12/21           
19 02-Nov-21              
20 10670.5.12 OST - P2              
21 Update Risk Register14/11/2102/09/22Not Started 14/11/21         02/09/22  
22 Update MDAL28/03/2102/05/21Not Started              
23 04-Nov-21              
24 10670.5.12 OST - P2              
25 Risk Register Review23/10/2104/06/22Not Started23/10/21       04/06/22     
26
27
28
29 Blue - E5:R25 '=AND($D5=$B$1,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE))) Amber - E5:R25 =AND($D5=$B$2,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE))) Green - E5:R25 =AND($D5=$B$3,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE)))
30
31
32
Sheet1 (2)
Cell Formulas
RangeFormula
E5:R25E5=IFERROR(IFS(DATE(YEAR($B5),MONTH($B5),1)=E$4,$B5,DATE(YEAR($C5),MONTH($C5),1)=E$4,$C5),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E5:R25Expression=AND($D5=$B$2,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE)))textNO
E5:R25Expression=AND($D5=$B$3,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE)))textNO
E5:R25Expression=AND($D5=$B$1,IFS(AND($B5<>"",$C5<>""),AND(E$4>=DATE(YEAR($B5),MONTH($B5),1),E$4<=DATE(YEAR($C5),MONTH($C5),1)),AND($B5="",$C5=""),"",OR($B5="",$C5=""),IF(DATE(YEAR(MAX($B5,$C5)),MONTH(MAX($B5,$C5)),DAY(1))=E$4,TRUE)))textNO
 
Upvote 0
Hi ExceLoki
My Bad. It working. I spotted the obvious reason which is the date in ROW 22 is earlier then the date starting in Column E4. I have now changed the date year and now it works
thank you a million You're a Star.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
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