+ Reply to Thread
Results 1 to 11 of 11

Gantt Chart showing weekends

  1. #1
    Registered User
    Join Date
    07-14-2017
    Location
    Salt Lake CIty Utah
    MS-Off Ver
    365
    Posts
    4

    Gantt Chart showing weekends

    My trouble is that I have a start date and an end date for a certain task and a number of business days it will take to get from one to the other.
    For example:
    Start Date - July 13
    Number of Business days to complete task - 4
    End Date - July 19

    Obviously July 19 is NOT 4 days away from July 13 but it's calculated that way in my data because of the weekend.

    I want my gantt chart to show the weekend days....but instead of the regular "red" bar denoting working days - I wan't those days to be greyed out as non-working days.

    Right now, my gantt would show the task starting on July 13, the red bar progressing through July 17, and then a gap between July 17 and July 19 (when the next task is scheduled to start)

    I've attached the file I'm working with. Relevant worksheets are:
    PRELIM. SCHEDULE (this tries to address the issue with a stack bar chart - I PREFER THIS OPTION)
    PRELIM. GANTT (this is an attempt at using conditional formatting)

    Thanks in advance for any help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Gantt Chart showing weekends

    Gantt charts are not my strength, so I am not sure what the best ways are to do this. A few thoughts to prompt some discussion:

    1) I see several "in cell" Gantt charts that show how to format weekends different from weekdays. Because they are built on conditional formatting of cells, they seem fairly straightforward to implement. Are you opposed to an in-cell charting technique? (http://www.criticaltosuccess.com/tim...hart-in-excel/ ).

    2) A Gantt chart is basically a stacked bar chart. Getting "gray sections" to appear as part of those stacked bars is going to involve adding additional data series (meaning additional columns in the spreadsheet). These columns will need formulas to locate weekends and position them correctly. I am not sure how to workout those formulas to get the weekends correctly located, but I am not sure that it will be easy.

    3) One example chart I saw added a gray "background" band to show where weekends are along the timeline. This seems easier than adding stacked bars into the existing Gantt chart. The background bands are also stacked bar series, but they are plotted on the secondary axis system and formatted so that the stacked bars extend from top to bottom of the chart. (tutorial here: https://peltiertech.com/Excel/Charts...ticalBand.html though it appears that some of the commands are specific to 2003 and earlier, so you may need to find the equivalent commands in the new interface.)

    How would you like to proceed?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    07-14-2017
    Location
    Salt Lake CIty Utah
    MS-Off Ver
    365
    Posts
    4

    Re: Gantt Chart showing weekends

    I suppose option #1 would be the easiest.
    One worry I have is that this gantt chart I'm working on is meant to be an automated template sort of a thing that will work for projects that last for a week or less, but also for projects lasting several months.....I would really like to have the "formatted cells" option include some sort of "auto-populate" for the dates of the duration of the project (similar to how the stacked bar chart would behave). Is this possible?

    Thanks for you help

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Gantt Chart showing weekends

    Short but useless answer -- yes it is possible. Because the in cell charting version of the Gantt chart seems to be mostly cell functions and conditional formatting based on the results of those functions, automating this for a variety of circumstances is mostly about figuring out all those different formulas. As I noted, I don't use Gantt charts much, so I am not very good with them. I suggest you work through the tutorial. Let us know where you get stuck. If you get it all set up and working and it is not as automatic as you like, post your result and let us know what more you want it to do.

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

    Re: Gantt Chart showing weekends

    I added a couple of series (wk, we) and moved them to the secondary axis
    It takes some effort to synchronize both axis, but it can be done via VBA code.
    Is this what you want.
    Attached Files Attached Files
    Kind regards,
    Piet Bom

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

    Re: Gantt Chart showing weekends

    I also checked your formulas in Prelim.Schedule and did some updating.....
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-14-2017
    Location
    Salt Lake CIty Utah
    MS-Off Ver
    365
    Posts
    4

    Re: Gantt Chart showing weekends

    Excellent!
    That is exactly what I want - Thank you!
    I'm not very good with charts and series etc...so it's hard for me to understand exactly what you did. It LOOKS simple - but did you say you added code to it?

    Also, I want to grey out all the holidays listed in F13:F26

    Could you walk me through exactly what you did, and I can try to add the greyed-out holidays myself?

    Thanks so much for your help - this is seriously awesome

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

    Re: Gantt Chart showing weekends

    I did not yet use any VBA code.
    It looks simple, but one has to take many steps.
    At this moment I don't see a way to add also holidays (but maybe later)
    See my new added worksheet ReadMe and try it yourself.
    If you manage to get the weekend bands we can continue to make your gantt chart more flexible.
    Attached Files Attached Files

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

    Re: Gantt Chart showing weekends

    @croix22,
    Did you succeed in adding the gray weekends ?

  10. #10
    Registered User
    Join Date
    07-14-2017
    Location
    Salt Lake CIty Utah
    MS-Off Ver
    365
    Posts
    4

    Re: Gantt Chart showing weekends

    Yes! - I got the weekends to work, and I understand now how to do it.
    That being said, I realize that adding the holidays to this list would be very difficult to do using this method.
    Do you have any ideas on how to do that?

    gantt_show weekends.PNG

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

    Re: Gantt Chart showing weekends

    I gave it a try.
    It was to complex for me to put it all in 1 chart.
    So I made a second chart added the holidays on that one and moved the second chart exactly on top of the first one.
    Not very user friendly, but it does the trick.
    Attached Files Attached Files

+ 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. Gantt chart not showing sub headings
    By anonymous1975 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-19-2017, 05:22 AM
  2. Gantt Chart showing 2 weeks broken into hourly segments.
    By sorensjp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2016, 05:24 AM
  3. Gantt Chart showing progress based on data entered.
    By adil.master in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-29-2014, 09:28 AM
  4. Gantt chart showing Start and Finish Date
    By scottiebell in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-21-2014, 04:46 PM
  5. Timeline (Gantt) chart showing both hour and date
    By S K ROY in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 11-30-2011, 06:33 PM
  6. Shading weekends in Gantt chart bars
    By neobavesten in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-01-2010, 07:34 AM
  7. Bars in Gantt chart showing values of certain cells?
    By darelooney in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2008, 10:10 AM

Tags for this Thread

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