+ Reply to Thread
Results 1 to 17 of 17

fill between two date according to working day and non working day , holidays

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    fill between two date according to working day and non working day , holidays

    Hello
    i would like to fill in column C date between two date A2, B2 with consideration to Working day is only
    Sunday
    Monday
    Tuesday
    Wednesday
    and non working day which not need in this interval
    Saturday
    Thursday
    Friday

    and holiday In column G

    by formula or VBA code
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: fill between two date according to working day and non working day , holidays

    In C2:
    =IF(WEEKDAY(WORKDAY.INTL(A2,1,7,$G$2:$G$14))=5,WORKDAY.INTL(A2,2,7,$G$2:$G$14),WORKDAY.INTL(A2,1,7,$G$2:$G$14))

    C3 on ward.
    =IF(C2<$B$2,IF(WEEKDAY(WORKDAY.INTL($C2,1,7,$G$2:$G$14))=5,WORKDAY.INTL($C2,2,7,$G$2:$G$14),WORKDAY.INTL($C2,1,7,$G$2:$G$14)),"")

    See attached.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: fill between two date according to working day and non working day , holidays

    Try

    =IF(C2<$B$2,WORKDAY.INTL($C2,1,"0001110",$G$2:$G$14),"")

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: fill between two date according to working day and non working day , holidays

    @JohnTopley
    Ah! Forgot that you can use string to flag weekend in WORKDAY.INTL() function.

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    what mean by 0001110
    and 1 also after $C2, that can i modify it

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    please can explain your formula

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: fill between two date according to working day and non working day , holidays

    "0001110"
    MON, TUE, WED, THU, FRI, SAT, SUN = 0 is workday, 1 is weekend

    So in this case, flags THU, FRI & SAT as weekend in WORKDAY.INTL() formula

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: fill between two date according to working day and non working day , holidays

    "0001110" corresponds to Monday to Sunday with 0 = workday, 1 =non-workday

    Note your current C2 ignores the fact that 2nd january is a holiday so you should use the WORKDAY.INTL here.

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    Dear Ck76 can explain your formula

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    Dear Johntopley
    what about first day after starting day C2 what is the formula

  11. #11
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: fill between two date according to working day and non working day , holidays

    My formula is just the long way of doing things. It checks if WORKDAY.INTL result is Thursday using WEEKDAY() function and if true, then looks for next workday.

    Use JohnTopley's formula.

    C2:
    =WORKDAY.INTL(A2,1,"0001110",$G$2:$G$14)

  12. #12
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    please look to my attached file that want to list date missed from column C in Column D and calculate number of this date in E2
    this from start date and end date
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: fill between two date according to working day and non working day , holidays

    Missed Day count

    =(B2-A2+1)-COUNT(C3:C120)


    =185

    Missing dates

    in D3

    IFERROR(SMALL(IF(COUNTIF($C$3:$C$121,ROW($42005:$42307))=0,ROW($42005:$42307),""),ROWS($1:1)),"")

    Enter with Ctrl+Shift+Enter

    42005= 1st jan 2015 (in Excel date)

    42307= 30th October
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    Dear John
    the formula in D column list all the day include non-work day
    what about if i need only show working day and exclude nonworking day from this missed date list and holiday also from list
    Last edited by mazan2010; 01-24-2017 at 02:13 AM.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: fill between two date according to working day and non working day , holidays

    I don't know what "missed date" means but you already have the formula for calculating working days, excluding holidays.

  16. #16
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: fill between two date according to working day and non working day , holidays

    Please see my attached file
    in column F is the data is missed from column E , this data is working day for me it's consider not have any activity
    but column E is working day which have activity
    for this i want to know what the date not have activity and list it in column F
    hope you are now understand what i mean
    Attached Files Attached Files

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: fill between two date according to working day and non working day , holidays

    Column G has working days

    =WORKDAY.INTL($G2,1,"0001110")

    Column H has non-working days indicated by "X" in column

    =IF(COUNTIF(E:E,G3),"","X")

    Filter on Column H

    NOTE: no holidays considered

    Or in column F

    =IFERROR(INDEX(G:G,SMALL(IF($H$3:$H$200="x",ROW($H$3:$H$200)),ROWS($1:1))),"")

    enter with Ctrl+Shift+Enter
    Attached Files Attached Files
    Last edited by JohnTopley; 01-24-2017 at 02:34 PM.

+ 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. fill automatic between two date and calculate working day
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-31-2016, 02:11 PM
  2. [SOLVED] CFormat for Stat Holidays not working right
    By BlindAlley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-04-2015, 01:38 PM
  3. calculate the working days and Holidays
    By sriku in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2014, 02:03 PM
  4. Replies: 3
    Last Post: 10-30-2013, 05:15 AM
  5. Replies: 2
    Last Post: 06-14-2013, 10:45 AM
  6. Replies: 6
    Last Post: 05-20-2013, 07:45 PM
  7. non-working holidays
    By barkarlo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-25-2011, 06: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