+ Reply to Thread
Results 1 to 19 of 19

Excluding weekends from Gantt Chart

  1. #1
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Excluding weekends from Gantt Chart

    Hi,

    I have posted something similar about this in the past and the formula someone gave me worked wonderfully. However, only I new how to work the chart in the office so it wasn't practical. I would like to do the same with this gantt chart so they don't have to keep amending the timeline dates every time they put together a programme.

    Basically we would like to exclude Saturdays and Sundays as working days but be able to add them in when and as we need them. On the last chart I could type a w onto the Saturday or Sunday I wanted to show as a working day and it highlighted that day. I'm hoping something similar is possible with this chart but I can't figure out how to tailor the formula I was given to suit the attached excel chart.

    Can anyone help me please?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Excluding weekends from Gantt Chart

    In cell H5,
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I5 Onwards,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Thanks Shareez. However, I still want the weekends to show but not highlight as a working day. Then if we need to show that we will be working on a specific weekend we can do so.

    Is that possible?

  4. #4
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Excluding weekends from Gantt Chart

    So, you just want to highlight Sundays and Saturdays?
    If yes, please use conditional formatting.
    Select the range and use the formula =OR(TEXT(H$5,"ddd")="Sat",TEXT(H$5,"ddd")="Sun")
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    10-14-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2019
    Posts
    353

    Re: Excluding weekends from Gantt Chart

    Maybe this works for you.
    Changed Conditional Formatting.
    Added a few columns and WORKDAY-formulas.
    Attached Files Attached Files
    Kind regards,
    Piet Bom

  6. #6
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Hi, thanks for that but it's not quite what I am trying to achieve. Please see attached our older gantt chart. If you type in dates it excludes the weekends from the highlighted bar, but if you type a 'w' into one of those weekends in the main timeline area it will show that as a working day.

    Sorry if i'm not being clear here, it's quite hard to explain what it is I'm looking to achieve.
    Attached Files Attached Files
    Last edited by Yannis07; 01-04-2021 at 04:21 AM.

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Excluding weekends from Gantt Chart

    It is not clear where you type W.
    Where you are doing calculation taking weekends as holiday or working day.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by kvsrinivasamurthy View Post
    It is not clear where you type W.
    Where you are doing calculation taking weekends as holiday or working day.
    You type the w actually in the day that you want it to highlight. so for example if i put a task in that lasts 3 weeks, it will automatically exclude the weekends on the timeline. If I wanted to highlight one Saturday as a working day, I would just type a W into that day on the timeline and it automatically highlights that day to show as a working day.

    Please see attached. I have typed in the w in the highlighted cell to show that as a working day.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Excluding weekends from Gantt Chart

    I didn't find W.

  10. #10
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by kvsrinivasamurthy View Post
    I didn't find W.
    In cell N9 I have typed a W which highlights that cell and makes the W appear as a working day

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Excluding weekends from Gantt Chart

    What actually required is not clear. Pl explain clearly.

  12. #12
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by kvsrinivasamurthy View Post
    What actually required is not clear. Pl explain clearly.
    Apologies if I'm not being clear. Basically I want the gantt chart in my original comment to do something similar to the gantt chart last uploaded. When I type in a set of dates, I need it to automatically exclude weekends as a working day (So only highlight weekdays) then if I need to show a weekend as a working day, I can do so by typing a W into that day.

    Hope this makes sense

  13. #13
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Here is the formulas I used last time for the older gantt chart. Although some of the cells may have changed, the formula should still make sense to someone who knows how to read them.

    I believe the conditional format for the diagonal black stripes (because I couldn't work out how to get the green ones to show for me) is:-

    =AND(OR(G9="w",G$8<>"S"),ActualBeyond)

    And, while in cell G9, the formula for PeriodInActual is:

    ='Project Planner'!G$6=MEDIAN('Project Planner'!G$6,'Project Planner'!$D9,WORKDAY('Project Planner'!$D9,'Project Planner'!$E9-1-COUNTIF(INDIRECT(ADDRESS(ROW(),MATCH('Project Planner'!$D9,'Project Planner'!$6:$6,0))&":"&ADDRESS(ROW(),MATCH(WORKDAY('Project Planner'!$D9,'Project Planner'!$E9-1),'Project Planner'!$6:$6,0))),"w")))

    Edit: Adding Explanation
    This is essentially what I've added to the formula:
    '-COUNTIF(INDIRECT(ADDRESS(ROW(),MATCH($D9,$6:$6,0))&":"&ADDRESS(ROW(),MATCH(WORKDAY($D9,$E9-1),$6:$6,0))),"w")

    The green part finds the start date, the blue finds the end date, the pink then counts the number of w's in that range


    The above is a comment that someone made to change my original gantt chart
    Last edited by Yannis07; 01-12-2021 at 09:34 AM.

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Excluding weekends from Gantt Chart

    I am not clear.
    Select D9:AQ20.
    Formula for CF

    =AND(D$6>=$B9,D$6<=$C9,WEEKDAY(D$6,2)<7)

    Fill --> Green
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by kvsrinivasamurthy View Post
    I am not clear.
    Select D9:AQ20.
    Formula for CF

    =AND(D$6>=$B9,D$6<=$C9,WEEKDAY(D$6,2)<7)

    Fill --> Green
    Sorry I think you are referring to my older gantt chart. The chart I am trying to amend is in the original post in this thread. I attached our old chart further down to help you understand what I am trying to achieve.

    'Blank Gantt Chart Old' works how I want it to in terms of excluding weekends and only including them when I need to, but isn't practical for my colleagues to amend dates as time goes on.

    I want to exclude weekends from the gantt chart attached, and be able to include them as and when I need to. Apologies, it is quite difficult to explain what I mean in text
    Attached Files Attached Files

  16. #16
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Excluding weekends from Gantt Chart

    Hi Yannnis, a simple addition to your conditional formatting will implement that change for you. This is the formula for the Low Risk conditional:
    Please Login or Register  to view this content.
    OR(H8="W", ... allows any cell with a "W" in it to be highlighted
    H$7<>"S") simply adds to ONLY highlight a cell if it isn't on an "S" day (Saturday or Sunday).

    So only cells without an S in the day row OR a W in the cell itself will be highlighted.

    The problem is, once you enter a "W" into one of those cells, it will wipe out the formula you have in there. But that formula isn't working anyway since you can't enter the words "Goal" or "Milestone" into cells $C10.

  17. #17
    Registered User
    Join Date
    12-23-2019
    Location
    Chorley
    MS-Off Ver
    office 365
    Posts
    19

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by Beamernsw View Post
    Hi Yannnis, a simple addition to your conditional formatting will implement that change for you. This is the formula for the Low Risk conditional:
    Please Login or Register  to view this content.
    OR(H8="W", ... allows any cell with a "W" in it to be highlighted
    H$7<>"S") simply adds to ONLY highlight a cell if it isn't on an "S" day (Saturday or Sunday).

    So only cells without an S in the day row OR a W in the cell itself will be highlighted.

    The problem is, once you enter a "W" into one of those cells, it will wipe out the formula you have in there. But that formula isn't working anyway since you can't enter the words "Goal" or "Milestone" into cells $C10.
    You sir are a true gentlemen. Really appreciate that thank you so much!

  18. #18
    Registered User
    Join Date
    07-25-2023
    Location
    germany
    MS-Off Ver
    365
    Posts
    2

    Re: Excluding weekends from Gantt Chart

    Hello, does someone has a working template to share ?
    With excluded weekends

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Excluding weekends from Gantt Chart

    Quote Originally Posted by miladin View Post
    Hello, does someone has a working template to share ?
    With excluded weekends
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding working days on weekends to a gantt chart
    By Yannis07 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2020, 08:19 AM
  2. Excluding Weekends & Adding End Date Column to Gantt Chart Template
    By Yannis07 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-07-2020, 02:54 AM
  3. Exclude weekends in a Gantt chart
    By bobelmore in forum Excel General
    Replies: 2
    Last Post: 10-18-2019, 04:44 PM
  4. [SOLVED] Remove weekends from a gantt chart
    By JNEWMAN in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-07-2019, 09:19 AM
  5. Removing weekends from Gantt Chart
    By jhamm2018 in forum Excel General
    Replies: 11
    Last Post: 06-12-2019, 11:41 PM
  6. Gantt Chart showing weekends
    By croix22 in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 07-25-2017, 04:34 PM
  7. Shading weekends in Gantt chart bars
    By neobavesten in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-01-2010, 07:34 AM

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