Results 1 to 5 of 5

Thread: COMBINE AND OR with IF Function in Single Formula

  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    11

    COMBINE AND OR with IF Function in Single Formula

    My current Formula is as under

    Code:
    =IF(AND(Z6>=2.5,AA6>AA5,AA5>AA4),"New","Ignore")
    Now, within same formula, if above condition is not met BUT following condition is true, then also, it should return, "New"

    =IF(AND(Z6>=2.5,AA6>=AA4*0.90,"New", "Ignore")


    So, if either of the condition is True, like

    Condition 1) =IF(AND(Z6>=2.5,AA6>AA5,AA5>AA4),"New","Ignore")

    OR

    Condition 2) =IF(AND(Z6>=2.5,AA6>=AA4*0.90,"New", "Ignore")

    Formula should return 'New', else 'Ignore'

    How to combine two criteria AND OR with IF statement in single formula? Sample File attached.

    Thanks
    Attached Files Attached Files
    Last edited by analyst; 02-24-2014 at 02:08 PM.

  2. #2
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    11
    I just tried this, I guess this is right!!!

    Code:
    =IF(AND(Z6>=2.5,OR(AA6>AA5,AA5>AA4),(AA6>=AA4*0.9)),"New","Ignore")

  3. #3
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    11
    I have two formula, which I require to merge to have one single formula:

    Formula 1

    Code:
    =IF(AND(Z222>=5,(M222>=(M217*5)),(M222>=(M221*2)),K222>=50),Z222&" Shock","")
    Formula 2

    Code:
    =IF(AND(K221>=50,(K222/K221)>=5),Z222&" Shock", "")
    If either of the formula result is true, it should return value "Shock".

    I tried different ways to put it in using IF, AND OR but no success......somewhere I'm making logical error, kindly correct/help me.

  4. #4
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    11
    To combine above formula, I am trying following which gives error

    Code:
    IF(OR(AND(Z222>=5,(M222>=(M217*5)),(M222>=(M221*2)),K222>=50),((K221>=50),((K222/K221)>=5))),Z222&" Shock","")
    Last edited by analyst; 03-26-2014 at 05:09 PM.

  5. #5
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    11
    Got the solution, was not properly put the brackets

    the solution is like

    Code:
    =IF(OR(AND(Z222>=5,(M222>=(M217*5)),(M222>=(M221*2)),K222>=50),AND(((K221>=50)),((K222/K221)>=5))),Z222&" Shock","")

Similar Threads

  1. Use Native Excel Function Lookup Formula In VBA
    By ramananhrm in forum Excel Help
    Replies: 8
    Last Post: 05-03-2013, 09:10 AM
  2. Combine Columns From Multiple Sheets To One Sheet
    By Portucale in forum Excel Help
    Replies: 6
    Last Post: 04-24-2013, 09:18 PM
  3. Replies: 2
    Last Post: 03-21-2013, 10:38 PM
  4. Replies: 2
    Last Post: 02-23-2013, 09:18 PM
  5. Nested Search Function Excel Formula
    By trankim in forum Excel Help
    Replies: 6
    Last Post: 10-29-2012, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •