+ Reply to Thread
Results 1 to 5 of 5

SOLVED - Another IF(AND function question

Hybrid View

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    65

    SOLVED - Another IF(AND function question

    Probably a simple solve, but I'm doing something wrong on my spreadsheet.

    Here's the scenario:

    --E--AX--AY
    1 -5, 10, 1
    2 4, -12, 1
    3 12, 6,
    4 -14, 7,

    I need an IF(AND formula that illustrates that if cell AX1 is greater than or equal to 9 but less than 20, or less than or equal to -9 and greater than -20, AND cell E1 is between 9 and -9, then cell AY1 has a "1" in it. If these conditions aren't met, it returns a " ".

    Here is how I wrote it, and it's not working.

    =IF(AND(AX1>=9,AX1<20,AX1<=-9,AX1>-20,E1>=-9,E1<=9),"1","")

    Maybe I need an IF(AND(OR formula...?

    Any help would be appreciated. Thanks.
    Last edited by brose99; 06-28-2013 at 12:10 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Another IF(AND function question

    Yep, you need AND(OR(AND

    =IF(AND(OR(AND(AX1>=9,AX1<20),AND(AX1<=-9,AX1>-20)),E1>=-9,E1<=9),1,"")

    Or it could be simplifed using the ABS function

    =IF(AND(ABS(AX1)>=9,ABS(AX1)<20,ABS(E1)<=9),1,"")

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Another IF(AND function question

    maybe
    =IF(AND(E1<=9,E1>=-9,OR(AND(AX1>=9,AX1<20),AND(AX1<=-9,AX1>-20))),1,"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    11-15-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    65

    Re: Another IF(AND function question

    Works like a charm! Thanks!

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SOLVED - Another IF(AND function question

    Glad to help, thanks for the feedback.

+ 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