+ Reply to Thread
Results 1 to 4 of 4

Formula to combine IF functions for days between dates?

  1. #1
    Registered User
    Join Date
    01-07-2021
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    5

    Formula to combine IF functions for days between dates?

    Hi there I am at a loss and would so appreciate any help.

    I have a formula calculating NETWORKDAYS between 2 dates. If the 2 dates are equal I need it to result in zero, instead it will result with a "1". I tried fixing this using a -1 at the end, but this won't work if the second date is less than the first date, where I need a result of -1, or -2, -3 etc.

    Part of my formula also contains an IF formula to only look at the date cells if there is an actual date in the cell.

    So I think I need to combine 2 IF formulas?

    My formula currently is: =IF(AND(ISNUMBER(K135),ISNUMBER(M135)),NETWORKDAYS(K135,M135,Lookups!V32:V59)," ")

    Now, I need to subtract 1 if the value is positive, and add one if the value is negative. Please help!!
    Last edited by Kellykix; 01-20-2021 at 10:01 PM.

  2. #2
    Registered User
    Join Date
    01-07-2021
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    5

    Re: Formula to combine IF functions for days between dates?

    I should have also mentioned, my current formula is looking up a holiday list to exclude those days

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    21,079

    Re: Formula to combine IF functions for days between dates?

    Try it like this:

    =IF(AND(ISNUMBER(K135),ISNUMBER(M135)),NETWORKDAYS(K135,M135,Lookups!V32:V59)-(K135<=M135)," ")

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    01-07-2021
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    5

    Re: Formula to combine IF functions for days between dates?

    YES!! This works. Thank you so much!!!

+ 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. Replies: 10
    Last Post: 02-19-2019, 03:28 AM
  2. [SOLVED] Negative days between dates formula
    By petsean007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2019, 01:14 AM
  3. Combine multiple Substitute functions into 1 formula
    By bakerman2 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-07-2016, 11:22 PM
  4. [SOLVED] Formula to loop and combine days of the week from multiple rows?
    By hopegriffin in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-06-2015, 08:07 PM
  5. Combine H Lookup and SumProduct functions formula
    By Anitykk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2013, 07:24 AM
  6. Replies: 1
    Last Post: 11-01-2012, 03:41 PM
  7. Combine INDEX+MATCH functions with INDIRECT formula
    By ABSTRAKTUS in forum Excel General
    Replies: 4
    Last Post: 04-12-2011, 04:16 PM

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