+ Reply to Thread
Results 1 to 5 of 5

Autofill networking days dates with variable start and end date

  1. #1
    Registered User
    Join Date
    07-06-2010
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    98

    Autofill networking days dates with variable start and end date

    Hi all,

    I cannot believe nobody needed this in the past. I have been researching extensively but no success.

    Please find attached an excel file with the desired output in tab "output".

    I am looking for a VBA code which autofills cells in tab "Output" with dates without holidays and weekends.

    The start and end date can be found in tab "input" B2 and C2, respectively. The holidays can be found in column B:B in the tab "holidays".

    The start date must be place in tab "output" D2 and the follwing dates always one column further to the right.

    The range of the dates is variable debending on the end date.

    Ideally I'd like to have the weekday in row 1 corresponding to the date in row 2. But that is a nice-to-have.

    Thanks in advance for all your help.

    Seb
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,754

    Re: Autofill networking days dates with variable start and end date

    LOTS of people have asked for this sort of thing before and it can be done with a formula - no need for VBA. Interested?

    Please check that your profile is up-to-date - are you still using Excel 2010?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,754

    Re: Autofill networking days dates with variable start and end date

    For anyone interested, in Output D2:

    =Input!B2

    In Output E2 and copied across as far as you wish:

    =IFERROR(IF(WORKDAY.INTL(D2,1,1,Holidays!$B$3:$B$5)<=Input!$C$2,WORKDAY.INTL(D2,1,1,Holidays!$B$3:$B$5),""),"")

    In Output D1 and copied across as far as you wish:

    =IF(D2="","",TEXT(D2,"ddd"))
    Attached Files Attached Files

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

    Re: Autofill networking days dates with variable start and end date

    Try this. In D4 copied across.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,754

    Re: Autofill networking days dates with variable start and end date

    Thanks for the rep.

+ 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. Networking days help
    By Markp74 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-16-2019, 03:11 AM
  2. [SOLVED] Networking days separated bu months
    By Ingolf in forum Excel General
    Replies: 5
    Last Post: 04-20-2019, 09:26 AM
  3. Replies: 4
    Last Post: 07-24-2017, 03:06 PM
  4. [SOLVED] Autofill work days to a variable Numbered row
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2014, 04:25 PM
  5. Calculate End Date Using Start Date and No. of Days excluding specific days.
    By SinusxCosinusx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:48 AM
  6. Replies: 7
    Last Post: 03-26-2013, 08:32 AM
  7. Networking Days Formula
    By Madball in forum Excel General
    Replies: 5
    Last Post: 12-22-2008, 11:21 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