+ Reply to Thread
Results 1 to 6 of 6

IF NETWORKDAYS formula with one date?

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    9

    IF NETWORKDAYS formula with one date?

    Hello,

    I need to write a formula that calculates the days between two dates and then enters a word as a result under specified criteria. So if the calculated dates are equal to or less than 2 work days I want it to say "Met". If the dates are more than 2 work days apart, I want it to say "Miss".

    For example:

    If column A has the date 10/9/13 and column B has the date 10/10/13, then column C would say "Met". If column A has the date 10/9/13 and column B has the date 10/11/13, then column C would say "Miss".

    I have been able to do this with the following formula in cell C1:

    =IF(NETWORKDAYS(A1,B1)<=2,"Met","Miss")

    It mostly works correctly, except I am having one issue. Occasionally, the A1 cell will be empty and the only reference is the B1 cell. In that case, the formula is defaulting to "Miss" but I need it to default to "Met". How can I get it to do this?

    Hope that made sense. Thanks!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: IF NETWORKDAYS formula with one date?

    welcome to the forum, hollyperret. try:
    =IF(OR(A1="",NETWORKDAYS(A1,B1)<=2),"Met","Miss")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: IF NETWORKDAYS formula with one date?

    Wrap your formula in another if statement.

    if(a1="","met", your formula)

  4. #4
    Registered User
    Join Date
    10-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: IF NETWORKDAYS formula with one date?

    Thanks so much for the quick response and for the welcome!

    Both of those worked. Now I don't have to look at the calendar or manually enter the results for hundreds of date ranges. Thank you. Thank you.

  5. #5
    Registered User
    Join Date
    10-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: IF NETWORKDAYS formula with one date?

    One more question. Is there a way to make it enter nothing if neither cell has a date in it? I know I can just leave out the formula, but I want to put it in so I don't have to add it every time I enter dates. As it is, it enters "Met" when it sees nothing in both cells. The amount of "Met" entries are added up and this will skew results, unless I add the formula every time.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF NETWORKDAYS formula with one date?

    Maybe this...

    =IF(COUNT(A1:B1)<2,"",IF(NETWORKDAYS(A1,B1)<=2,"Met","Miss"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] networkdays formula - show zero for same date
    By steve@stanley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2013, 01:23 PM
  2. Replies: 1
    Last Post: 01-12-2012, 06:10 PM
  3. Replies: 1
    Last Post: 06-08-2011, 02:00 AM
  4. How do i add networkdays to a date?
    By Eld7283 in forum Excel General
    Replies: 1
    Last Post: 09-09-2005, 01:05 AM
  5. Replies: 2
    Last Post: 02-10-2005, 04:06 PM

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