+ Reply to Thread
Results 1 to 9 of 9

How to count network days between two dates, using todays date where second date is blank?

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to count network days between two dates, using todays date where second date is blank?

    Hi

    I am looking to create a formula that will count the number of work days (network days) between two dates and to use today's date where the second is blank.

    The intention is that I can show how old incidents are in the one cell, regardless of whether they are open or closed

    Here's the layout for what i want to achieve:

    Col A, Col B, Col C
    Row 1, Open Date, Closed Date, No.Workdays Open
    Row 2, 05-Mar-2012, 12-Mar-2012, 6
    Row 3, 16-Mar-2012 , *, 2

    *where today is the 19 March


    So far I have worked out how to use Network Days
    =NETWORKDAYS(A2,B2)

    And how to use today's date where col B is blank
    =IF(ISBLANK(B2),TODAY()-A2,B2-A2)

    But I can't seem to combine the two.

    Any suggestions greatly appreciated.
    Last edited by phl8pg; 03-19-2012 at 12:48 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: How to count network days between two dates, using todays date where second date is bl

    Try:

    =NETWORKDAYS(A2,IF(B2="",TODAY(),B2))
    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 Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to count network days between two dates, using todays date where second date is bl

    =NETWORKDAYS(A2,IF(B2="",TODAY(),B2))

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,417

    Re: How to count network days between two dates, using todays date where second date is bl

    deleted - better solutions posted above...

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How to count network days between two dates, using todays date where second date is bl

    hi phl8pg,

    Welcome to the forum.

    use the following formula:-

    =NETWORKDAYS(A3,IF(ISBLANK(B3),TODAY(),B3))

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +91 9810929744
    dilipandey@gmail.com

  6. #6
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    552

    Re: How to count network days between two dates, using todays date where second date is bl

    =if(b2="",networkdays(a2,today()),networkdays(a2,b2))

  7. #7
    Registered User
    Join Date
    03-19-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to count network days between two dates, using todays date where second date is bl

    To NBVC, dilipandey, Domski and darknation144

    Thank you all so much for your advice, I've checked the three different solutions supplied and all result in identical, and correct, results.

    I am in awe of you all.

    Thanks also Icestationzbra for giving it a go...

    regards, phl8pg

  8. #8
    Registered User
    Join Date
    02-07-2013
    Location
    Tulsa, OK
    MS-Off Ver
    2010
    Posts
    1

    Re: How to count network days between two dates, using todays date where second date is bl

    This was very helpful for 50% of the data I am trying to record.
    Last edited by Slehvin; 02-07-2013 at 06:23 PM.

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How to count network days between two dates, using todays date where second date is bl

    you are welcome phl8pg,

    Cheers


    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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