+ Reply to Thread
Results 1 to 10 of 10

Nested IF formula with multiple conditions

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Exclamation Nested IF formula with multiple conditions

    Hello, grateful if you could help.

    I need to write an IF statement in Excel based on several conditions. If an employee has served for more than 4 years and achieved performance rating "OP'/"AP" in latest 2 years, cell C should return to text "OK", otherwise "N/A".


    If C2>=4 & A2="OP" & B2="OP"; D2="OK"

    If C2>=4 & A2="OP" & B2="AP"; D2="OK"

    If C2>=4 & A2="AP" & B2="OP"; D2="OK"

    If C2>=4 & A2="AP" & B2="AP"; D2="OK"

    If anything else, output "N/A"

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Nested IF formula with multiple conditions

    Hello

    Try put this on D2:

    Please Login or Register  to view this content.
    If I have solved your question, please mark the thread as [SOLVED],
    And consider adding reputation

    ?Simplicity is the ultimate sophistication? (Leonardo Da Vinci)

    Regards,
    F?bio Gatti

    https://www.youtube.com/pulodogatti
    https://www.linkedin.com/in/fabiocgatti/
    https://instagram.com/pulodogatti

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Nested IF formula with multiple conditions

    Try this...
    =if(and(C2>=4,or(A2="OP",A2="OP",b2="OP",b2="OP")),"OK","N/A")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-26-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Nested IF formula with multiple conditions

    Dear Gatti, Thanks for your help. I tried your method but the output fails to return "OK" even the employee has met all conditions. Please see below picture show that Employee 10 has served for 12 years and got "AP" in latest 2 consecutive years.

    Untitled.png

  5. #5
    Registered User
    Join Date
    01-26-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Nested IF formula with multiple conditions

    Dear Gatti, Thanks for your help. I tried your method but the output fails to return "OK" even the employee has met all conditions. Please see below picture show that Employee 10 has served for 12 years and got "AP" in latest 2 consecutive years.

    Attachment 442949

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,285

    Re: Nested IF formula with multiple conditions

    It would help if you attached an Excel file rather than images so we have data to work with.

    Click "Go advanced" then "Paper Clip" icon to add file.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,285

    Re: Nested IF formula with multiple conditions

    Ford's formula amended

    =IF(AND(C2>=4,OR(A2="OP",A2="AP",B2="OP",B2="AP")),"OK","N/A")

  8. #8
    Registered User
    Join Date
    01-27-2016
    Location
    saudi arabia
    MS-Off Ver
    2010
    Posts
    27

    Re: Nested IF formula with multiple conditions

    value1 value2 value3 value4 Result
    C 0 0 0 C
    0 A+ 0 0 A+

    I have these values C 0 0 0 and the result is C same as second row values are 0 A+ 0 0 and i need the result A+.

    anybody can help me please.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,285

    Re: Nested IF formula with multiple conditions

    @cutebeach: Why are posting on this thread?

    Start a new thread and it will help if you can post an Excel file explaining your requirement and showing expected results..

    Click "Go advanced" then "Paper Clip" icon to upload file (not image).

  10. #10
    Registered User
    Join Date
    01-27-2016
    Location
    saudi arabia
    MS-Off Ver
    2010
    Posts
    27

    Re: Nested IF formula with multiple conditions

    thanks dear

+ 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] Nested IF/AND functions... Multiple Conditions
    By jnswbc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2016, 01:13 PM
  2. Nested If loop with multiple conditions
    By schaasyd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2012, 08:16 AM
  3. Need to create nested IF's with multiple conditions
    By hruski in forum Excel General
    Replies: 1
    Last Post: 05-05-2011, 06:52 PM
  4. Replies: 5
    Last Post: 07-14-2009, 11:22 AM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  6. Multiple conditions in nested IF statements
    By havfunonline2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2009, 05:36 AM
  7. Nested IFs formula to find matching values with multiple conditions
    By ghuang in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2009, 02:02 AM

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