+ Reply to Thread
Results 1 to 17 of 17

fill automatic between two date and calculate working day

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

    fill automatic between two date and calculate working day

    Dear Sir
    i would like to autofill between two date and calculate working day according to with looking for holiday
    see my example
    when i enter c4 Start date and C5 end date they calculate and fill between this in column c with regarding to holiday which is between F:Cl
    our weekend is Friday and Saturday
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Re: fill automatic between two date and calculate working day

    Do you actually need it to auto-fill? Or will calculating the number of working days be sufficient?

    You can probably tweak the =networkdays.intl() function to work if you don't need auto-fill.

    If you do need to auto-fill, I'm not totally sure how to go about making a formula that just drags down, sorry.
    Last edited by TheN; 07-30-2016 at 03:18 PM.

  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
    30,699

    Re: fill automatic between two date and calculate working day

    What is wrong with your current formula? and dragging it down?

    You need to change C4 but leave C5 onwards as they are

    =IF($B$4<$B$5,WORKDAY.INTL($B$4,1,7,$F$4:$F$20),"")

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

    Re: fill automatic between two date and calculate working day

    But I need to add this formula selection automatic holiday
    Meaning if I 2016 add holiday 2016 if 2017 add holiday 2017 and soon
    And if I select from 2016-2017 take two holiday

  5. #5
    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
    30,699

    Re: fill automatic between two date and calculate working day

    These match the year in B4 versus your column header years to select the holidays. Change the 30 if more than 30 days holiday.

    In C4

    =IF($B$4<$B$5,WORKDAY.INTL($B$4,1,7,OFFSET($A$4,,MATCH(YEAR($B$4),$A$3:$CL$3,0),30)),"")

    in C5 and copy down

    =IF(C4+1<$B$5,WORKDAY.INTL($C4,1,7,OFFSET($A$4,,MATCH(YEAR($B$4),$A$3:$CL$3,0)-1,30,1)),"")

    For holidays, the array has to be a single dimension so if you want to have a year which starts in 2016 and ends in 2017 then (as far as I can ascertain) the holidays need to be in a singe (column) list.

    Planning to 2100 is very optimistic !!!.
    Last edited by JohnTopley; 07-31-2016 at 03:35 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: fill automatic between two date and calculate working day

    Quote Originally Posted by JohnTopley View Post
    Planning to 2100 is very optimistic !!!
    Certainly for me!!!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    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
    30,699

    Re: fill automatic between two date and calculate working day

    @Glenn,
    Et moi aussi !

    Welcome back!

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

    Re: fill automatic between two date and calculate working day

    please knidly find attached file that give me error after change the date for 2017 , annd also i try other date but give me error
    regarding to planing for 2100 because i make program that i need to make it unlimited that can any one edit holiday in future and applicable
    Attached Files Attached Files

  9. #9
    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
    30,699

    Re: fill automatic between two date and calculate working day

    Don't have blanks in your holiday list: start in row 4.

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

    Re: fill automatic between two date and calculate working day

    still give me error as in attached file
    Attached Files Attached Files

  11. #11
    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
    30,699

    Re: fill automatic between two date and calculate working day

    Put this C4

    =IF($B$4<$B$5,WORKDAY.INTL($B$4,1,7,OFFSET($A$4,,MATCH(YEAR($B$4),$A$3:$CL$3,0)-1,30,1)),"")
    Attached Files Attached Files

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

    Re: fill automatic between two date and calculate working day

    i would like to know why if leave holiday empty not calculate , suppose no holiday , why not give all working day without holidy

  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
    30,699

    Re: fill automatic between two date and calculate working day

    See attached: I discovered the VALUE errors appeared to be caused by "error" cells in 018 onwards in the files you sent.

    and my formula In B4 was incorrect. although it worked if "018 onwards data was truly blank.
    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 automatic between two date and calculate working day

    how can leave the cell blank instead of #Value

  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
    30,699

    Re: fill automatic between two date and calculate working day

    The last file I sent works OK: that is why I sent it! I did "Clear Contents" on all cells.

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

    Re: fill automatic between two date and calculate working day

    Yes I know but when I drag the function after finish give me #value
    Because I want to make this function in all Column

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

    Re: fill automatic between two date and calculate working day

    i mean after when i drag the function for extra cell it give me #value

    also can see my new attached file for another function that i want

    according to my selection in sampl sheet in cell A2 which divide month to four week and selec month and year
    that will create my plan automatic In E3 :I22
    with rules that i write in column M
    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. [SOLVED] calculate expiry date automatic according to product name
    By mazan2010 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2016, 02:01 PM
  2. Calculate start date from finish date minus 14 working hours
    By PietBom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2014, 07:23 PM
  3. [SOLVED] Calculate END DATE based on START DATE & No of working days
    By prashantha in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-20-2013, 07:22 AM
  4. Replies: 0
    Last Post: 03-21-2013, 12:22 PM
  5. Calculate start date based on working hours and end date
    By kaaver in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2010, 06:58 AM
  6. insert date, automatic calculate
    By Seroleh in forum Excel General
    Replies: 3
    Last Post: 06-02-2009, 11:17 AM
  7. automatic fill date
    By stevesunfold in forum Excel General
    Replies: 3
    Last Post: 03-30-2008, 12:06 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