Consulting

Results 1 to 5 of 5

Thread: How can i count the number of working days between 2 dates

  1. #1
    VBAX Newbie
    Joined
    Sep 2008
    Posts
    2
    Location

    How can i count the number of working days between 2 dates

    Hi,

    i would like to count the number of working days between 2 dates.
    how can i do it?


    Thanks!
    Gal

  2. #2
    VBAX Regular Maui_Jim's Avatar
    Joined
    Sep 2008
    Location
    Tampa, Florida
    Posts
    9
    Location
    Gal,

    I typically use the NETWORKDAYS function, which is available through Excel?s Analysis Tool Package.

    If your two dates are in cell A1 and B1, you might use this formula:
    =NETWORKDAYS(A1,B1)-1
    This displays the total number of Week Days between the dates.

    If you wanted a more detailed result, you could use this formula:
    =(NETWORKDAYS(A1,B1)-1-(MOD(B1,1)< MOD(A1,1)))&" days "&TEXT(B1-A1,"h"" hours ""m"" minutes""")
    This displays the number of days, Hours & Minutes between the dates.

    You will need to activate the Analysis ToolPak for this function:

    How to install the Analysis ToolPak Add_In:
    > Click the Tools dropdown menu
    > Choose Add-ins... from the menu
    > In the Add-ins dialog box, select the check box for Analysis ToolPak
    > Click OK to close the Dialog box

    Hope this helps,
    Jim
    To the Optimist, the glass is half full. To the Pessimist, the glass is half empty.
    To the Engineer, the glass was designed to be twice as big as it needs to be.

  3. #3
    VBAX Newbie
    Joined
    Sep 2008
    Posts
    2
    Location

    Thanks, i forgot to mention i am talking about MS Project

    HI,

    Thanks for the reply,

    sorry for missleading, but i was talking about MS Project.

    altough, its always nice to learn something new


    anyone have an idea? how do i count the number of working days between 2 dates, according to MS Project general calendar, so it will remove weekends and holidays?

    Thanks

  4. #4
    Hi, I am away from MS Project right now so can't check the syntax . . . it is either DateDiff or DateDifference or ProjectDateDiff or ProjectDatedifference . . . search the helpfile.

    Mal

  5. #5
    hi, is there any way to count the number of resources(resource names column contains the names) used in a MS project 2010? whether any way to achieve through VBA macro?....consider the resource names as R1,R2 and so on...I need the count of R1, R2 respectively....Thanks in advance.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •