+ Reply to Thread
Results 1 to 3 of 3

More help with nested IF OR AND

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Ky
    MS-Off Ver
    Excel 2013
    Posts
    344

    More help with nested IF OR AND

    Here was my 1st attempt:

    http://www.excelforum.com/excel-form...48#post3214148

    with the solution of =IF(AND(I7=9,I15<>1),"",IF(I17<9,"Invalid",IF(OR(AND(I17>10,I17<28),I15=1),"Error","")))

    This is quite helpful, but after playing with it some more, not quite want I want (but close).

    Here is what I want:

    IF I17=9 AND I15<>1 then return blank " "

    IF I17=9 AND I15=1 then return "Error"

    IF I17<9 OR Between the ranges of 11 to 18 (>=11 thru <=18) return "Invalid" regardless of I15

    IF I17=19 AND I15 <>1 then return blank " "

    IF I17=19 AND I15=1 then return "Error"

    Here's my attempt which is close but not quite:
    =IF(AND(I17=9,I15<>1),"",IF(OR(IF(AND(I17<9,I17=11,)*I17>=12,I17<=18)),"INVALID",IF(OR(I17=19,I15=1),"ERROR","")))

    In summary,basically, if I17 is 9 or 19 and if I15 is not 1, then everything is fine (return blank), but if I17 is 9 or 19 and I15 is 1, return "error", but if I17 is anything other than 9 or 19 and no matter what I15 is, then return "invalid"

    The problem I seem to be having is specifying the range if I17 is between 11-18... regardless if I15 is a 1 or not.


    ...If I could get this string down, then I may just add 1 more complexity, and try to get "Error" whenever I15=1 OR I16=1 when I17 is 9 or 19.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: More help with nested IF OR AND

    Try

    =IF(OR(I19<9,AND(I17>=11,I17<=18)),"Invalid",IF(OR(AND(I17=9,I15<>1),AND(I17=19,I15<>1)),"",IF(OR(AND(I17=9,I15=1),AND(I17=19,I15=1)),"Error")))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Ky
    MS-Off Ver
    Excel 2013
    Posts
    344

    Re: More help with nested IF OR AND

    Yepp - that works!! Your a nesting genius!! (Only small error was the very first cell reference is I17 not I19, but nbd). I will mark this thread solved before the end of the day and add reputation - but for extra credit, where would the OR statement go to include either I15 OR if I16 = 1 (or <>1) to return "error" (or "" if using <>)?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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