Closed Thread
Results 1 to 13 of 13

Gantt conditional formatting to exclude weekends?

  1. #1
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Gantt conditional formatting to exclude weekends?

    Hello

    I've inherited the attached project template to use. It requires me to enter planned start dates for tasks and an approximate number of days I think the task will take. Conditional Formatting is then applied for those days.

    I want it to not shade the weekend days - ie. to keep the weekends visible in the gantt, but to skip them for the conditional formatting purposes.

    If I was starting the gantt anew, I'm pretty sure I could figure out the WORKDAY or NETWORKDAY but I need to use the attached template and can't work out how to amend.

    Grateful for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Gantt conditional formatting to exclude weekends?

    You need to do these things:
    1. Move the 2 CF's with the MOD-function to the top of the list
    2. Create a new CF with this this formula (make sure cell I7 is selected when entering the CF!)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    - Do not specify any format.
    - Move the CF to the 3rd position of the list
    - Mark it to Stop If True
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Re: Gantt conditional formatting to exclude weekends?

    Thank you - I think I should have clarified that the formatting I'm seeking to have not apply to weekends is the blue cross hatching.

    Like, if my Plan Start is 30/05/17 and I estimate the task would take 10 days, I'd think it should shade in blue cross hatching 30/5-2/6 inclusive, skip the 3/6 and 4/6, shade again 5/6 - 9/6, skip the 10/6 and 11/6, and finish the 10th day's shading on Monday 12/6.

    When I try what you've suggested (attached), it DOES remove the original dark grey shading of 3/6 but I apologise that I should have been clearer that I'm seeking to correct the gantt to only shade as 'plan' or any other legend key weekdays.
    Attached Files Attached Files

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Gantt conditional formatting to exclude weekends?

    Aha, in that case I think you can just change the formula of the CF you don't wont to be active for weekend days to this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You could do that for all the CF's you like.
    Don't forget to remove the CF I suggested below again.

  5. #5
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Re: Gantt conditional formatting to exclude weekends?

    Tsjallie,

    I'm so sorry, but I've now tried that and still no success. Could I impose upon you to ask that you show me in the spreadsheet how to fix it and upload?

    thanks for your patience with me!
    Last edited by jeffreybrown; 06-26-2017 at 06:45 PM. Reason: Removed full quote

  6. #6
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Gantt conditional formatting to exclude weekends?

    You're not alone in having trouble with CF. It's just pretty obscure.
    And me being sloppy doesn't help either
    Here's the workbook with the adjusted CF for Plan.

    I've take out this CF-rule:
    CF_Removed.JPG

    And I've chnaged this one:
    CF_Plan.JPG

    Changed the formula to this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Yes, that's a somewhat other formula than I posted earlier. So I may well have contributed to your confusion. Sorry 'bout that.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Re: Gantt conditional formatting to exclude weekends?

    Tsjallie,

    Well, that's fixed the weekend shading issue, thanks!

    Though now, in your example, only 8 days in total are shaded for a 10 day task..? I'd want to see 10 weekdays in blue cross hatching, ie. starting on 30/5, skipping weekend days and shading finishing on Mon 12/6.
    Last edited by jeffreybrown; 06-26-2017 at 06:45 PM. Reason: Removed full quote

  8. #8
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Re: Gantt conditional formatting to exclude weekends?

    Also, with the modifications made, the shading isn't consistent - ie in your sheet, in row 8, there are 8 days specified but 7 are shaded - while in row 13, 10 days are specified but 8 are shaded...?

    Sorry for all the questions!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,403

    Re: Gantt conditional formatting to exclude weekends?

    See if the following will help.
    1) Select cell I7 on the 'Daily' sheet,
    2) From the Formulas tab select 'Name Manager',
    3) Edit the 'PeriodInPlan' (the first one -- Scope 'Daily') so that it reads: =Daily!I$6=MEDIAN(Daily!I$6,Daily!$C7,WORKDAY(Daily!$C7,Daily!$D7)-1)
    4) Select the close button,
    5) When the pop up asks if you want to save the change select 'Yes'.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Registered User
    Join Date
    11-02-2016
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    10

    Re: Gantt conditional formatting to exclude weekends?

    Thank you both, all! I think that's done it. You're WONDERFUL.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,403

    Re: Gantt conditional formatting to exclude weekends?

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  12. #12
    Registered User
    Join Date
    02-01-2019
    Location
    ireland
    MS-Off Ver
    2013
    Posts
    1

    Re: Gantt conditional formatting to exclude weekends?

    Hi do you have the complete file for this as i've been tryng to follow this post and am just unsure what it is 'm missing but bascally i'm trying to exactly as what you set out about doing

  13. #13
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2508 Win 11
    Posts
    24,959

    Re: Gantt conditional formatting to exclude weekends?

    Unfortunately your post does not comply with Rule 4 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Gantt Chart Conditional Formatting
    By tbrozovich in forum Excel General
    Replies: 11
    Last Post: 08-12-2024, 04:33 PM
  2. [SOLVED] Conditional Formatting w/ Gantt Chart
    By ormont02 in forum Excel General
    Replies: 10
    Last Post: 02-24-2019, 11:55 PM
  3. [SOLVED] Gantt Charts & Conditional Formatting
    By highguyuk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2015, 04:27 PM
  4. Conditional formatting to measure actual vs planned Gantt chart
    By arnab0711 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-19-2015, 04:19 PM
  5. Conditional Formatting to exclude weekends
    By slantin in forum Excel General
    Replies: 6
    Last Post: 08-13-2013, 11:27 AM
  6. Gantt Chart with conditional formatting
    By douglasdale in forum Excel General
    Replies: 2
    Last Post: 06-28-2010, 11:24 AM
  7. vacation GANTT Conditional formatting
    By DUKE888 in forum Excel General
    Replies: 7
    Last Post: 12-22-2009, 03:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1