+ Reply to Thread
Results 1 to 8 of 8

Multiple nested IF/and to show condition Met or Not Met

  1. #1
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Multiple nested IF/and to show condition Met or Not Met

    Hi,

    Based on the below formula, if Status = Success, SchedFinish is 24/3/16, ActDate is 14/9/17 (more that 14 days) result is show correctly as "Not Met".
    But if SchedFinish is 15/9/17 and ActDate is 14/9/17 or blank (less than 14 days) result should show as "Met".
    However, it still shows as "Not Met" which is not right.

    =IF([@XCRSTAGE]="IMPLEMENTATION",IF([@Status]<>"",IF(OR(NETWORKDAYS([@SCHEDFINISH],[@ActualDate])>=14,NETWORKDAYS([@SCHEDFINISH],TODAY())>=14),"Not Met","Met")))

    Based on this formula, please anyone can advise how should I correct this formula. Thank you.

    Regards
    Chitra

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Multiple nested IF/and to show condition Met or Not Met

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Re: Multiple nested IF/and to show condition Met or Not Met

    Hi,


    Oops Sorry, below is the revised formula set in excel which is not working.


    =IF([@XCRSTAGE]="IMPLEMENTATION",IF(OR(IF(AND([@[Status_Imp]]="",NETWORKDAYS(TODAY(),[@SCHEDFINISH])>=14),AND([@[Status_Imp]]<>"",NETWORKDAYS([@ActDate],[@SCHEDFINISH])>=14))),"Met","Not Met"),"")

    As requested, attached is the excel sheet.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Multiple nested IF/and to show condition Met or Not Met

    suchetherrah

    I am confused. Upload says rows 5 and 7 "Should be Not Me". That is what the formula is returning in F5 and F7.

    PS Also the formula states IF(AND([@[Status_Imp]]="",NETWORKDAYS(TODAY(),[@SCHEDFINISH])>=14). Column D ([@[Status_Imp]]) has ' (single quote characters) in all the cells. That AND function will never be TRUE.

    PSS NETWORKDAYS(TODAY(),[@SCHEDFINISH])>=14 is never TRUE. NETWORKDAYS(TODAY(),[@SCHEDFINISH]) is returning all negative numbers.
    Last edited by FlameRetired; 09-17-2017 at 11:27 PM.
    Dave

  5. #5
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Re: Multiple nested IF/and to show condition Met or Not Met

    Sorry for the confusion.

    Yes, it should be "Met". Reattached the file to avoid confusion.
    Eventhough, I have removed the Status_IMP = ', it's still not working.
    Attached Files Attached Files
    Last edited by suchetherrah; 09-18-2017 at 06:58 AM. Reason: Removed ' and reattached the file

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Multiple nested IF/and to show condition Met or Not Met

    suchetherrah I am having great difficulty understanding the intended logic in the formula under ClosureSLA.

    I've tried guessing and some trial and error "fixes" to duplicate what you intend. They have not worked.

    All I have now are some observations regarding details. These need to be addressed. They are causing difficulties in your formula.

    This is what I observe:
    1. ActDate returns a #NAME? error. I should be [@ActDate].
    2. In the event [@ActDate] is blank (which is usually the case) NETWORKDAYS returns a #VALUE! error. [@ActDate] needs to be a number. N([@ActDate]) will coerce that value into a 0 where there are blanks or text.
    3. NETWORKDAYS(TODAY(),[@SCHEDFINISH]) always returns a negative value. Perhaps it should be NETWORKDAYS([@SCHEDFINISH],TODAY())???
    4. This IF segment doesn't appear to do anything ... IF(AND([Status_Imp]="",NETWORKDAYS(TODAY(),[@SCHEDFINISH])>=14),AND([Status_Imp]<>"",NETWORKDAYS(ActDate,[@SCHEDFINISH])>=14))) ...
    Beyond that I am unable to "help". Sorry.

  7. #7
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Re: Multiple nested IF/and to show condition Met or Not Met

    Hi,

    After your have highlighted, just realized my logic of the formula is not correct. So separate both formulas in different senarios. Trying to achieved by combining both the formulas in 1 cell.

    =IF([@XCRSTAGE]="IMPLEMENTATION",IF([@ActDate]="",IF(NETWORKDAYS([@SCHEDFINISH],TODAY())>=14,"Not Met","Met")))
    =IF([@XCRSTAGE]="IMPLEMENTATION",IF([@ActDate]<>"",IF(NETWORKDAYS([@SCHEDFINISH],[@ActDate])>=14,"Not Met","Met")))

    Tried number of times combining but didn't work. Please help is really appreciated.

    Thank you.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,555

    Re: Multiple nested IF/and to show condition Met or Not Met

    As to combining the formulas that could be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    As to cell F5 still displaying 'Not Met' that is the logical result because E5 is blank, and the number of net work days between Feb. 13th, 2016 (A5) and Sept. 19th, 2017 (TODAY()) is 417.
    As to cell F7 still displaying 'Not Met' that is the logical result because E7 isn't blank and the number of net work between Feb. 26th, 2016 (A7) and Sept. 15th, 2017 (E7) is 406.
    I feel like the logic of displaying 'Met' or 'Not Met' needs to be reevaluated.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Multiple IF Statements (Nested If???) to show different outcomes
    By thompsy121 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2017, 11:07 AM
  2. Nested IF/Multiple Condition IF
    By AggieGradStudent in forum Excel General
    Replies: 6
    Last Post: 03-24-2017, 08:26 PM
  3. Complex Nested Condition
    By venkatraman_r in forum Excel General
    Replies: 5
    Last Post: 09-20-2016, 07:11 AM
  4. [SOLVED] Nested If condition
    By nawas in forum Excel General
    Replies: 7
    Last Post: 02-05-2016, 01:42 AM
  5. [SOLVED] Nested If condition
    By nawas in forum Excel General
    Replies: 3
    Last Post: 01-15-2015, 05:00 AM
  6. [SOLVED] Nested IF Condition
    By Enigma Trio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2014, 01:35 AM
  7. [SOLVED] Need Help with Multiple Condition Nested Logical Functions
    By SandPounder1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2014, 07:29 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