+ Reply to Thread
Results 1 to 4 of 4

Nested If / And / Or ?

  1. #1
    Titian
    Guest

    Nested If / And / Or ?

    Greetings

    Is there any way the following can be expressed in single formula?

    If A2 = 1 and B2 <= 10 - "Yes"

    If A2 = 1 and B2 > 10 - "No"

    If A2 = 2 and B2 <= 20 - "Yes"

    If A2 = 2 and B2 > 20 - "No"

    Thanks in advance.



    Dan





  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    =IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF(OR(AND(A2=1,B2>10),AND(A2=2,B2>20)),"No",""))

    There are options that will leave the cell blank (= "" )


    Quote Originally Posted by Titian
    Greetings

    Is there any way the following can be expressed in single formula?

    If A2 = 1 and B2 <= 10 - "Yes"

    If A2 = 1 and B2 > 10 - "No"

    If A2 = 2 and B2 <= 20 - "Yes"

    If A2 = 2 and B2 > 20 - "No"

    Thanks in advance.



    Dan

  3. #3
    Titian
    Guest

    Re: Nested If / And / Or ?

    "Bryan Hessey" wrote in message
    >
    > =IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF(OR(AND(A2=1,B2>10),AND(A2=2,B2>20)),"No",""))
    >
    > There are options that will leave the cell blank (= "" )
    >
    >
    > Titian Wrote:
    >> Greetings
    >>
    >> Is there any way the following can be expressed in single formula?
    >>
    >> If A2 = 1 and B2 <= 10 - "Yes"
    >>
    >> If A2 = 1 and B2 > 10 - "No"
    >>
    >> If A2 = 2 and B2 <= 20 - "Yes"
    >>
    >> If A2 = 2 and B2 > 20 - "No"
    >>
    >> Thanks in advance.
    >>
    >>
    >>
    >> Dan

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile:
    > http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=487142
    >


    Thanks so much Bryan

    it works a treat.

    cheers
    Dan



  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Good to see, and thanks for the response.

    Quote Originally Posted by Titian
    "Bryan Hessey" wrote in message[color=blue]
    >
    > =IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF(OR(AND(A2=1,B2>10),AND(A2=2,B2>20)),"No",""))
    >

    it works a treat.

    cheers
    Dan

+ 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