• Combined AND and OR statement (Excel XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Combined AND and OR statement (Excel XP)

    Author
    Topic
    #421804

    Hi all,

    Perhaps someone can show me why I can’t get this formula to work:

    =IF(OR((AND(A1>0,A10,B1<10)),"OKAY",0)))

    I've moved the parenthisis all over the place with no luck.

    I think the formula is straight forward, but just to explain the situation:

    If a number in EITHER a first or second cell is greater then 0 and less then 10, I want a response in a third cell informing me that has occurred.

    The formula seems correct (to me at least!). Is it not possible to compine two AND statements within an OR statement?

    Thanks,
    BH Davis

    Viewing 2 reply threads
    Author
    Replies
    • #959632

      It is possible – you’ve just got your brackets muddled. The following works for me:

      =IF(OR(AND(A1>0,A10,B1<10)),"OKAY",0)

    • #959635

      Is this what you need?


      =IF(OR(AND(A1>0,A10,B1<10)),"OKAY",0)

    • #959646

      Thank you to both of you !

      It was the bracket in front of the second AND that was getting me. I thought you had to have a bracket in front of every OR and AND statement.

      Thanks again,
      BH Davis

      • #959659

        You don’t have to, but you can – as long as you put the matching right parenthesis in the correct place. Yours weren’t.

    Viewing 2 reply threads
    Reply To: Combined AND and OR statement (Excel XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: