+ Reply to Thread
Results 1 to 5 of 5

How to exculde saturday and sunday in date calculation?

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    How to exculde saturday and sunday in date calculation?

    Hi All,

    I have three columns named "name","start_date" and "end_date"

    ex:

    Name start_date end_date
    AB 9/11/13 10:19 AM ??
    CD 9/12/13 11:45 AM ??


    All i need to find is,

    If Name = AB, i want put start_date+3 days in the end_date column,
    similarly for name = CD , start_date+7 days.

    But the calculation should exculde weekends(sat and sun).

    ex:
    For AB, start_date = 10/3/13 (3rd oct , thrusday), end_date should be start_date+3 ,so end_date = 10/6/13 but 6th october is sunday so the formula should give end_date as 10/7/13.

    I hope this is clear.

    Help me to find it .

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,911

    Re: How to exculde saturday and sunday in date calculation?

    =NETWORKDAYS(StartDate,EndDate) counts the number of days between dates but ignores weekends.

    So if start date is in A1 and end date is in B1, in C1 enter =NETWORKDAYS(A1,B1)

    Does that do what you mean?

  3. #3
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: How to exculde saturday and sunday in date calculation?

    This is for the 3 day formula above

    Please Login or Register  to view this content.
    This is for the 7 day formula above

    Please Login or Register  to view this content.
    Hope this works for you. Good luck

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to exculde saturday and sunday in date calculation?

    Check out the new function NETWORKDAYS.INTL that makes allowance for holidays.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,696

    Re: How to exculde saturday and sunday in date calculation?

    Quote Originally Posted by Thinker8 View Post
    For AB, start_date = 10/3/13 (3rd oct , thrusday), end_date should be start_date+3 ,so end_date = 10/6/13 but 6th october is sunday so the formula should give end_date as 10/7/13.
    For adding working days to a date you need WORKDAY function (NETWORKDAYS counts working days between 2 dates) ....but if you add 3 working days to a Thursday the result will be the following Tuesday because WORKDAY doesn't count the start date so you might have to adjust accordingly. Try this formula

    =WORKDAY(B2-1,IF(A2="AB",3,7))

    where A2 contains the date and A2 contains the "name"

    Note that any time in B2 will be ignored - if you want to keep the same time for the result then try this version

    =WORKDAY(B2-1,IF(A2="AB",3,7))+MOD(B2,1)
    Audere est facere

+ 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. VBA to calculate hours between 2 date/time excluding saturday & sunday
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-12-2013, 10:12 AM
  2. Calculating date and time in business days other than Saturday/Sunday
    By russ101 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2012, 07:55 PM
  3. Function to Ignore Saturday and Sunday
    By kamalthakur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2008, 11:34 AM
  4. identifying saturday and sunday in a date
    By mdub72 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2008, 04:23 PM
  5. [SOLVED] Is there a way to identify saturday and sunday automatically
    By Unicornlmb in forum Excel General
    Replies: 2
    Last Post: 01-05-2006, 01:40 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