Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Or() Statement With Text (2003)

    Trying to type in an Or() function into C1 that would do the following: If the words "Red", "Blue", or "Green" are in Cell A1, I would like to insert the contents of Cell B1 (a number) into C1, else, insert 25% of B1 into C1. I tried typing the following into C1, but came up with a "Value" error message:

    =if(A1=or("Red","Blue","Green"),B1,.25*B1)

    Any thoughts?

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Or() Statement With Text (2003)

    You must repeat the A1= for each condition, and put it within the OR:
    <code>
    =IF(OR(A1="Red",A1="Blue",A1="Green"),B1,.25*B1)</code>

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Or() Statement With Text (2003)

    Thanks, Hans.

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Or() Statement With Text (2003)

    Incidentally, because you are testing the same cell each time, you can use:
    <code>=IF(OR(A1={"Red","Blue","Green"}),B1,.25*B 1)
    </code>
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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