1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Calculate Weekends

Discussion in 'Business Applications' started by andrew1968, Sep 18, 2014.

Thread Status:
Not open for further replies.
  1. andrew1968

    andrew1968 Thread Starter

    Joined:
    Jul 3, 2014
    Messages:
    11
    Can anyone help me?

    I need a way to determine the difference in time between two dates excluding weekends.

    For example:

    A1: 9/12/2014 8:51
    A2: 9/16/2014 14:45

    A1 is the start date, A2 is the end date.

    The difference between these is 4.25 days, but since it includes a weekend (ideally I'd also include holidays if possible) the ultimate answer I'm looking for is 2.25.

    I thought about calculating the total number of week days using NETWORKDAYS, but the problem I run into is that excel includes the entire day even if it's just one hour of that day.

    This formula doesn't work because it includes all of 9/12/14 and all of 9/16/14 when I only need it to count a part of those days.

    =(A2-A1)-(INT(A2-A1)-NETWORKDAYS(A1,A2))

    What would really be great is a NETNONWORKDAYS function (that would calculate weekends and holidays)

    Any ideas for me?

    Thanks in advance!
     
  2. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    you can try this


    =NETWORKDAYS(A1,A2)-MOD(A1,1)-(1-MOD(A2,1))
     
  3. andrew1968

    andrew1968 Thread Starter

    Joined:
    Jul 3, 2014
    Messages:
    11
    Thank you. That basically worked. I just needed to add back in the reminder of the difference between the two dates. Thank you!!!!
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1133875

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice