+ Reply to Thread
Results 1 to 4 of 4

Date Diff Calculation

Hybrid View

  1. #1
    Registered User
    Join Date
    10-16-2007
    Posts
    1

    Date Diff Calculation

    Hi All,

    I'm desperately seeking an answer to my problem.

    Cell
    A1= 12/10/07
    D1 = 15/10/07
    E1=D1-A1
    F1= 16/10/07
    G1= F1-A1
    H1= 17/10/07
    I1=H1-A1

    (The above dates are in the british format of dd/mm/yy btw)
    What I would like to do is have E1, G1 and I1 returning how many days transpired between the two dates independently of each other. That's simple enough to do I know but I need it to only show WORKING days and not include Saturdays and Sundays in the final figure.

    If you tap those figures into Excel you get this;

    E1= 3
    G1=4
    H1=5

    However, there is a weekend between 12/10 and 15/10/07, so I want them to say

    E1=1
    G1=3
    H1=4

    Any ideas on the formula for this? Or would it be better to whack a bit of code in? If so, could you tell me how to go about doing that please? I know it's tricky so I'm sorry.

    Thanks again!!

    Jenn

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hello Jenn

    If you have the Analysis Toolpak installed (check in Tools>Add-Ins) then you can use the NETWORKDAYS function:

    =NETWORKDAYS(Date1,Date2)

    you have the potential to include holiday days to exclude (eg Public Holidays) as an optional 3rd argument to the function. This function excludes Saturdays and Sundays.

    Richard

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Take a look at this link, similar question

    http://www.excelforum.com/showthread.php?p=1821092
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you have the Analysis Toolpak installed (Tools|Addins) then you could use the Networkdays() function, which will give you the number of days between dates excluding weekends (and you can also avoid holidays too...)

    eg.

    =Networkdays(A1,D1)

    to use the holidays feature, you need to have a list of holidays somewhere and then the formula would be:

    =Networkdays(A1,D1,holidays).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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