+ Reply to Thread
Results 1 to 13 of 13

Combine IF and WORKDAY functions in Gantt

  1. #1
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Combine IF and WORKDAY functions in Gantt

    Hi

    I need help to plugin the Workday & Holiday formula to my existing formula to calculate the number of days.

    =IF(D9="","",IF(F9="",E9-D9+1,(E9-D9+1)-G9))

    In above formula:
    D9 is the start date
    E9 is the End Date
    F9 is manual column to calculate the % of work completed and
    G9 has the formula to calculate the Work Done [=IF(F9="","",(E9-D9+1)*F9%)]
    H9 is the column where Work Left is calculated


    What I am looking for is the Work Left (H9) column calculates the total days including weekends. I do not want it to calculate the weekends. Also, I would want that there are certain list of Holidays too which should not be counted too.

    Please help! Thanks in advance.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Combine IF and WORKDAY functions in Gantt

    Take a look at the NETWORKDAYS function, and/or pending your local requirements NETWORKDAYS.INTL

    If you need more specific guidance, pull together a sample file (inclusive of holiday dates) which houses numerous scenarios of completion - and attach to your next post (via GoAdvanced -> Manage Attachments)

  3. #3
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    Please find attached the sample sheet I am working on. Its showing 6 days instead it should 4 days. Thanks for your help in advance.
    Attached Files Attached Files

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Combine IF and WORKDAY functions in Gantt

    so, using NETWORKDAYS as suggested:

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


    you can use the above logic and adjust your Conditional Format rule re: GANT accordingly.

  5. #5
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    Oh, Thanks a ton! This worked. Really appreciate your help and assistance.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Combine IF and WORKDAY functions in Gantt

    Please try
    G9
    =NETWORKDAYS(D9,E9,'Holidays List 2019'!$C$4:$C$42)*F9%

    H9
    =NETWORKDAYS(D9,E9,'Holidays List 2019'!$C$4:$C$42)*(1-F9%)


    and CF formula for filled Black
    =(NETWORKDAYS($D7,I$6,'Holidays List 2019'!$C$4:$C$30)>0)*(NETWORKDAYS($D7,I$6,'Holidays List 2019'!$C$4:$C$30)<=$G7)*($D7<>"")

    CF formula for filled pattern
    =(NETWORKDAYS($D7,I$6,'Holidays List 2019'!$C$4:$C$30)>$G7)*(NETWORKDAYS($D7,I$6,'Holidays List 2019'!$C$4:$C$30)<=$G7+$H7)*($D7<>"")
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    Really appreciate your response to it, Thanks a bunch. I am also trying to Colour code the Holidays by Adding new rule, but seems to be giving me an error. Would you please update?

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Combine IF and WORKDAY functions in Gantt

    Please try CF applies to =$I$5:$FY$93

    =COUNTIF(I$6,'Holidays List 2019'!$C$4:$C$30)

  9. #9
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    While I can see the entire range is selected only 1 row gets highlighted. All the holidays in the list is not getting highlighted.
    Last edited by rajatsehgal; 01-11-2019 at 12:18 PM.

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Combine IF and WORKDAY functions in Gantt

    Please check attached and point me what wrong?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    Sure. I have changed the End Date to 8th March. and in my Holidays List 4th March is Holiday and is not getting highlighted.

  12. #12
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Combine IF and WORKDAY functions in Gantt

    I see the wrong formula.

    Should be
    =COUNTIF('Holidays List 2019'!$C$4:$C$30,I$6)
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    7

    Re: Combine IF and WORKDAY functions in Gantt

    Bingo! There you go. Thanks a ton for this. Really appreciate all your help and support.

+ 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. How to combine the WORKDAY function with an IF function to build a working Gantt chart.
    By roomaggoo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 07-07-2018, 11:54 AM
  2. Replies: 0
    Last Post: 07-07-2018, 04:13 AM
  3. Date formula that functions like WORKDAY but includes weekends
    By 1gambit in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-07-2017, 04:31 PM
  4. Start workday,Gantt chart
    By daredan in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-29-2014, 07:18 AM
  5. [SOLVED] Creating a Working Progress Sheet with Workday Functions
    By nathandavies in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-17-2014, 03:34 AM
  6. combine workday and time functions
    By jmac1947 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-26-2013, 05:59 AM
  7. Help needed - with DATE & WORKDAY functions
    By rjshree in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2012, 06:22 PM

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