Home

Gantt chart date formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1137079%22%20slang%3D%22en-US%22%3EGantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137079%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20row%20listing%20the%20dates%20of%20weeks%20commencing%20for%20each%20month.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20the%20Gantt%20chart%20to%20fill%20each%20block%20if%20the%20date%20occurs%20in%20that%20week.%20At%20the%20moment%2C%20it%20won't%20fill%20if%20the%20start%20date%20isn't%20the%20same%20as%20the%20week%20commencing%20date%20e.g.%20start%20date%3D%2031%2F1%2F20%20which%20occurs%20in%20w%2Fc%2027%2F1%2F20%20but%20that%20block%20isn't%20filled.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20conditional%20formatting%20formula%3A%26nbsp%3B%3DAND(J%246%26gt%3B%3D%24F7%2C%20J%246%26lt%3B%3D%24G7)%3C%2FP%3E%3CP%3EJ6%3D%20date%20row%20F%3Dstart%20date%20column%20%26nbsp%3BG%3D%20end%20date%20column%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167883i657A4AA6E6120F1D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Screenshot%202020-01-29%20at%2012.41.15.png%22%20title%3D%22Screenshot%202020-01-29%20at%2012.41.15.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20was%20to%20add%20in%20risk%20formatting%20too%20eg.%20if%20low%20risk%20bar%20will%20turn%20yellow%2C%20if%20high%20risk%20bar%20will%20turn%20red%2C%20how%20would%20I%20do%20this%20also%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1137079%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1137153%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137153%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F537112%22%20target%3D%22_blank%22%3E%40Hawwa1900%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUse%20this%20one%20in%20stead.%20Then%20it%20works%20as%20you%20want%20it%20to%2C%20I%20believe.%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DAND(ISOWEEKNUM(J%246)%26gt%3B%3DISOWEEKNUM(%24F7)%2C%20ISOWEEKNUM(J%246)%26lt%3B%3DISOWEEKNUM(%24G7))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EShould%20a%20project%20carry%20over%20a%20year-end%20you%20probably%20need%20to%20work%20in%20the%20year%20also.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1137160%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137160%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%20What%20if%20I%20then%20want%20to%20change%20the%20colour%20depending%20on%20another%20cell%20value%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%3DISNUMBER(SEARCH(%22Low%20risk%22%2C%24C8))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20I%20just%20add%20this%20into%20the%20formula%20you%20gave%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1137225%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137225%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F537112%22%20target%3D%22_blank%22%3E%40Hawwa1900%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%2C%20forgot%20to%20address%20the%20risk%20element.%20This%20one%20should%20work%20for%20%22Low%20risk%22.%20You%20need%20separate%20rules%20for%20each%20risk%20category.%20Just%20replace%20the%20%22Low%20risk%22%20part%20and%20select%20you%20colour.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EAND(ISOWEEKNUM(J%246)%26gt%3B%3DISOWEEKNUM(%24F8)%2C%20ISOWEEKNUM(J%246)%26lt%3B%3DISOWEEKNUM(%24G8)%2C%24C8%3D%22Low%20risk%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1137337%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137337%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20doesn't%20seem%20to%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1137372%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137372%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F537112%22%20target%3D%22_blank%22%3E%40Hawwa1900%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20see%20attached.%20Works%20for%20me.%20Didn't%20do%20all%20and%20the%20colours%20are%20probably%20not%20what%20you%20want.%20But%20hope%20you%20can%20get%20it%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1213592%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1213592%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3BHi%20I%20want%20to%20use%20this%20for%2057%20weeks%20so%20how%20I%20can%20manage%20Year%20carry%20over.%3C%2FP%3E%3CP%3Ee.g%20start%20week%20of%20one%20task%20is%20502019%20and%20ends%20in%20062020%2C%20for%20another%20task%20start%20is%20062019%20ends%20052020.%3C%2FP%3E%3CP%3Ealso%20any%20suggestion%20of%20working%20out%20to%20have%20both%20dates%2Fdays%20and%20weeks%20on%20same%20sheet%20where%20I%20can%20choose%20visibility%20option%20days%20or%20weeks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1213657%22%20slang%3D%22en-US%22%3ERe%3A%20Gantt%20chart%20date%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1213657%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F426283%22%20target%3D%22_blank%22%3E%40Kashibaba%3C%2FA%3E%26nbsp%3BCan%20you%20upload%20the%20file%20with%20the%20example%20of%20a%20task%20carrying%20over%20a%20year-end%20and%20with%20the%20conditional%20formatting%20based%20on%20my%20latest%20response%3F%20Then%20I%20don't%20have%20to%20do%20it%20all%20over%20again%2C%20as%20I%20did%20not%20retain%20the%20file%20I%20worked%20on%20previously.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I have a row listing the dates of weeks commencing for each month.

 

I want the Gantt chart to fill each block if the date occurs in that week. At the moment, it won't fill if the start date isn't the same as the week commencing date e.g. start date= 31/1/20 which occurs in w/c 27/1/20 but that block isn't filled. 

 

My conditional formatting formula: =AND(J$6>=$F7, J$6<=$G7)

J6= date row F=start date column  G= end date column

Screenshot 2020-01-29 at 12.41.15.png

 

If I was to add in risk formatting too eg. if low risk bar will turn yellow, if high risk bar will turn red, how would I do this also?

7 Replies
Highlighted

@Hawwa1900 

Use this one in stead. Then it works as you want it to, I believe. 

=AND(ISOWEEKNUM(J$6)>=ISOWEEKNUM($F7), ISOWEEKNUM(J$6)<=ISOWEEKNUM($G7))

Should a project carry over a year-end you probably need to work in the year also.

 

Highlighted

@Riny_van_Eekelen 

Thanks! What if I then want to change the colour depending on another cell value? 

=ISNUMBER(SEARCH("Low risk",$C8))

 

Do I just add this into the formula you gave?

Highlighted

@Hawwa1900 

Sorry, forgot to address the risk element. This one should work for "Low risk". You need separate rules for each risk category. Just replace the "Low risk" part and select you colour.

AND(ISOWEEKNUM(J$6)>=ISOWEEKNUM($F8), ISOWEEKNUM(J$6)<=ISOWEEKNUM($G8),$C8="Low risk")

 

 

Highlighted

@Riny_van_Eekelen 

 

It doesn't seem to work

Highlighted

@Hawwa1900 

Please see attached. Works for me. Didn't do all and the colours are probably not what you want. But hope you can get it work.

Highlighted

@Riny_van_Eekelen Hi I want to use this for 57 weeks so how I can manage Year carry over.

e.g start week of one task is 502019 and ends in 062020, for another task start is 062019 ends 052020.

also any suggestion of working out to have both dates/days and weeks on same sheet where I can choose visibility option days or weeks.

 

Thanks.

Highlighted

@Kashibaba Can you upload the file with the example of a task carrying over a year-end and with the conditional formatting based on my latest response? Then I don't have to do it all over again, as I did not retain the file I worked on previously.