+ Reply to Thread
Results 1 to 5 of 5

How to use "or" in an if function: If C1=C2 OR if

  1. #1
    asf - ExcelForums.com
    Guest

    How to use "or" in an if function: If C1=C2 OR if

    I am trying to make a spreadsheet with a cell that says if the value
    in C1 = the value in c2 or the value in c3, then the cell returns a
    "true"

    So we start with:

    =IF(c1=c2, "TRUE")

    but I have no idea how to add "OR IF C1=C3" to the whole bit.

    help! :D


  2. #2
    N Harkawat
    Guest

    Re: How to use "or" in an if function: If C1=C2 OR if

    =IF(OR(C2=C1,C1=C3),"true","")

    "asf - ExcelForums.com" <[email protected]> wrote in
    message news:[email protected]...
    >I am trying to make a spreadsheet with a cell that says if the value
    > in C1 = the value in c2 or the value in c3, then the cell returns a
    > "true"
    >
    > So we start with:
    >
    > =IF(c1=c2, "TRUE")
    >
    > but I have no idea how to add "OR IF C1=C3" to the whole bit.
    >
    > help! :D
    >




  3. #3
    David McRitchie
    Guest

    Re: How to use "or" in an if function: If C1=C2 OR if

    Use the OR Worksheet Function
    =IF(OR(c1=c2,c1=C3) "TRUE", "False")
    or since you would see number values as True or False anyway
    =IF(OR(c1=c2,c1=C3))

    You could do this as a Conditional Format, if you did not
    want to use a column and wished to see color, but if you are
    going to do more worksheet functions based on this result
    then you would still want this in the worksheet or within subsequent
    formulas.
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "asf - ExcelForums.com" <[email protected]> wrote in message news:[email protected]...
    > I am trying to make a spreadsheet with a cell that says if the value
    > in C1 = the value in c2 or the value in c3, then the cell returns a
    > "true"
    >
    > So we start with:
    >
    > =IF(c1=c2, "TRUE")
    >
    > but I have no idea how to add "OR IF C1=C3" to the whole bit.
    >
    > help! :D
    >




  4. #4
    Jimbola
    Guest

    RE: How to use "or" in an if function: If C1=C2 OR if

    Hi

    Use

    =if(or(c1=c2,c1=c3),"TRUE")

    HTH

    J

    "asf - ExcelForums.com" wrote:

    > I am trying to make a spreadsheet with a cell that says if the value
    > in C1 = the value in c2 or the value in c3, then the cell returns a
    > "true"
    >
    > So we start with:
    >
    > =IF(c1=c2, "TRUE")
    >
    > but I have no idea how to add "OR IF C1=C3" to the whole bit.
    >
    > help! :D
    >
    >


  5. #5
    Aladin Akyurek
    Guest

    Re: How to use "or" in an if function: If C1=C2 OR if

    =OR(C1=C2,C1=C3)

    or to exclude evaluation when C1 empty:

    =IF(ISBLANK(C1),OR(C1=C2,C1=C3),"")

    asf - ExcelForums.com wrote:
    > I am trying to make a spreadsheet with a cell that says if the value
    > in C1 = the value in c2 or the value in c3, then the cell returns a
    > "true"
    >
    > So we start with:
    >
    > =IF(c1=c2, "TRUE")
    >
    > but I have no idea how to add "OR IF C1=C3" to the whole bit.
    >
    > help! :D
    >


+ 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