+ Reply to Thread
Results 1 to 5 of 5

Formula to display workday days with condition

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Formula to display workday days with condition

    Hello,

    7/2/2014 16:18

    7/4/2014 10:19


    I want formula which would show netwrokday ( Exclude Saturday and Sunday ).

    I above date should give me answer as 2 Days. How to do that?

    Thanks,
    Shiva
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to display workday days with condition

    7/2/2014 = Wed
    7/3/2014 = Thu
    7/4/2014 = Fri

    NETWORKDAYS = 3

    So, which date do you want to not count?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Formula to display workday days with condition

    This might also work for you, depending on which workdays you want to exclude...
    B
    C
    D
    E
    1
    7/2/2014 16:18
    3
    6
    8
    2
    7/3/2014 16:18
    4
    3
    7/4/2014 16:18
    5
    4
    7/5/2014 16:18
    6
    5
    7/6/2014 16:18
    7
    6
    7/7/2014 16:18
    1
    7
    7/8/2014 16:18
    2
    8
    7/9/2014 16:18
    3
    9
    7/10/2014 16:18
    4
    10
    7/11/2014 16:18
    5


    C1=WEEKDAY(B1,2) (not really needed and not used, I just used it to show the week day number)
    D1=SUMPRODUCT(--(WEEKDAY($B$1:$B$10,2)<6)*--(WEEKDAY($B$1:$B$10,2)<>4)) exclude Thursdays
    E1=SUMPRODUCT(--(WEEKDAY($B$1:$B$10,2)<6)) count all weekdays (Tony's suggestion for this is much better)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: Formula to display workday days with condition

    Tony/Ford,

    I do not want exclude date there..

    Start time is 7/2/2014 4:18 PM. Now request need to be closed within 2 business days which means, request should be closed before 07/04/2014 at 11.59PM
    If look at the time differenc between these two date, it is around 2 days and 7 hours. But I need some formula which would round the time to 2 days only. If request has been closed at 07/05/2014 at 12.01 AM, then answer should be 3 days.

    7/2/2014 16:18
    7/4/2014 10:19
    Answer to this is : 2 days

    7/2/2014 16:18
    7/5/2014 23:19
    Answer to this is : 3 days

    7/2/2014 16:18
    7/6/2014 00:19
    Answer to this is : 4 days.


    Hope this helps.

    Please advice,

    Thanks,
    Shiva

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

    Re: Formula to display workday days with condition

    Hello Shiva,

    According to your first post you want to exclude Saturday and Sunday.......but if those examples in your last post are right you are including Saturday and Sunday......which is correct?

    If those latter example are right you can use this formula

    =INT(B1)-INT(A1)
    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. [SOLVED] Formula for duplicate referral - same condition or repeat within 30-90 days
    By jason_guest in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2014, 02:27 AM
  2. Replies: 3
    Last Post: 10-30-2013, 05:15 AM
  3. Replies: 8
    Last Post: 07-13-2012, 09:02 AM
  4. Make Workday count 6 days in a week
    By BlastRanger in forum Excel General
    Replies: 6
    Last Post: 09-22-2010, 01:18 AM
  5. [SOLVED] Is there a WorkDay() type function that count all days except tho.
    By Dark Skunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-15-2005, 06:45 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