+ Reply to Thread
Results 1 to 6 of 6

Networkdays

  1. #1
    Registered User
    Join Date
    09-04-2007
    Posts
    98

    Networkdays

    Hi All

    From the following formula I want to work out that:

    =IF(OR(K8,X8=""),"",NETWORKDAYS(K8,J8)+NETWORKDAYS(N8,X8))-SIGN(NETWORKDAYS(K8,J8)N8,X8))

    If K8 or X8 are empty then leave this blank

    other wise

    Workout the NETWORKDAYS between the dates in K8 and J8

    and ADD it to the

    the number of networdays between the dates in N8 and X8.

    the -Sign.... is to say that if the result if NEGATIVE then display as a MINUS or if positive then leave as normal.

    Any ideas how I could do this?

    Thanks!
    Last edited by XLS-EXCEL; 09-25-2007 at 08:39 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You mean something like:?

    Please Login or Register  to view this content.
    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.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    Not quite sure what you mean about sign but perhaps you want this

    =IF(OR(K8="",X8=""),"",NETWORKDAYS(K8,J8)+ NETWORKDAYS(N8,X8)-SIGN(NETWORKDAYS(K8,J8))-SIGN(NETWORKDAYS(N8,X8))

  4. #4
    Registered User
    Join Date
    09-04-2007
    Posts
    98
    VBA NOOB

    It was not working so I put some extra brackets and now it works!

    I guess extra brackets without your solution would have been pointless so THANK YOU!

    From this:
    =IF(OR(K8="",X8=""),"",NETWORKDAYS(K8,J8)-SIGN(NETWORKDAYS(K8,J8))+NETWORKDAYS (N8,X8)-SIGN(NETWORKDAYS(N8,X8)))

    To this:
    =IF(OR(K8="",X8=""),"",NETWORKDAYS(K8,J8)-SIGN(NETWORKDAYS(K8,J8))+(NETWORKDAYS(N8,X8)-SIGN(NETWORKDAYS(N8,X8))))

    ?!
    (didnt think it would make a diff but I guess it does)

    DLL I havent tried yours but I guess the above one works so its cool!

    Thanks guys!

    Regards

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Ummm.... I think you mean NBVC....

  6. #6
    Registered User
    Join Date
    09-04-2007
    Posts
    98

    Apologies

    I am so sorry!

    You know I have been up to my neck in work today and when you have people breathing down your neck it kind of cramps your style.

    THANKS NBV!!

    Apologies once again!

    Kindest Regards

+ 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