+ Reply to Thread
Results 1 to 8 of 8

Calculating Dates and Ignore certain values.

Hybrid View

  1. #1
    Registered User
    Join Date
    06-03-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Calculating Dates and Ignore certain values.

    Hello!

    I previously requested assistance to calculate the number of days between two dates which is working great, I have since added another column (H) which contains a "Yes" or "No" value and I would like the formula to calculate days if H2 = "No" and put a zero value if H2 = "Yes"

    The formula which is currently calculating the number of days is this;

    IF(K2=M2,0,NETWORKDAYS(K2,M2)-1)

    Thank you in advance.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Calculating Dates and Ignore certain values.

    =IF(OR(K2=M2,H2="yes"),0,NETWORKDAYS(K2,M2)-1)

  3. #3
    Registered User
    Join Date
    06-03-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Re: Calculating Dates and Ignore certain values.

    Thank you, that works perfectly.

    I now have a follow up question, is there a way I can ignore the formula when the cells are blank?

    Thank you

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Calculating Dates and Ignore certain values.

    And which cells would that be?

  5. #5
    Registered User
    Join Date
    06-03-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Re: Calculating Dates and Ignore certain values.

    Hi,

    Cell A1 would need to contain data if not, ignore the formula.

    Thank you

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Calculating Dates and Ignore certain values.

    Try
    =IF(A1="","",IF(OR(K2=M2,H2="yes"),0,NETWORKDAYS(K2,M2)-1) )

  7. #7
    Registered User
    Join Date
    06-03-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Re: Calculating Dates and Ignore certain values.

    Thank you, this is working and I am happy!

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Calculating Dates and Ignore certain values.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Calculating values between dates
    By SamuriWilliams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2019, 10:53 AM
  2. [SOLVED] Calculating values between dates
    By simonplus in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-13-2016, 04:34 PM
  3. [SOLVED] Min of Dates to Ignore #N/A values
    By coreytroy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2013, 09:16 PM
  4. [SOLVED] Calculating turn around time for taskers and ignore text values
    By AndreBlush in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2013, 02:44 PM
  5. calculating values over dates
    By neocuproine in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-15-2012, 03:10 PM
  6. [SOLVED] Excel calculating same dates as different values???
    By hijinxx in forum Excel General
    Replies: 4
    Last Post: 05-15-2012, 06:10 AM
  7. Calculating Dates Using Different Values for NETWORKDAYS
    By Kelly in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-22-2006, 10:15 AM

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