+ Reply to Thread
Results 1 to 3 of 3

Using "double equal signs" in place of an IF statement

  1. #1
    Scott P
    Guest

    Using "double equal signs" in place of an IF statement

    I am aware that you can evaluate two cells for equality using "double equal
    signs" -- for example, by entering "=A1=B1" into cell C1 to test cells A1 and
    B1 for equality. Is there a way to use this "double equal signs" approach in
    place of an IF statement?

    More specifically, is it possible to create a formula such as "=A1=B1
    AVERAGE(1,2) "NA""? I have seen a formula such as this that did not include
    commas between parameters -- any help on this front will be greatly
    appreciated.

  2. #2
    Harlan Grove
    Guest

    Re: Using "double equal signs" in place of an IF statement

    Scott P wrote...
    >I am aware that you can evaluate two cells for equality using "double equal
    >signs" -- for example, by entering "=A1=B1" into cell C1 to test cells A1 and
    >B1 for equality. Is there a way to use this "double equal signs" approach in
    >place of an IF statement?


    It's not double equal signs. The first equal sign indicates that the
    cell contents is a formula while the second equal sign is a comparison
    operator.

    >More specifically, is it possible to create a formula such as "=A1=B1
    >AVERAGE(1,2) "NA""? I have seen a formula such as this that did not include
    >commas between parameters -- any help on this front will be greatly
    >appreciated.


    Not possible. If you could accept 0 as the result when A1<>B1, you
    could use

    =(A1=B1)*AVERAGE(1,2)

    or you could use some other function like CHOOSE, LOOKUP or INDEX
    instead of IF, but there's no alternative to using one of these
    functions if you want to return different type results (number or text)
    depending on whether A1=B1 is TRUE or FALSE.


  3. #3
    Scott P
    Guest

    Re: Using "double equal signs" in place of an IF statement

    Thank you, Harlan. I appreciate your reply and assistance.

    "Harlan Grove" wrote:

    > Scott P wrote...
    > >I am aware that you can evaluate two cells for equality using "double equal
    > >signs" -- for example, by entering "=A1=B1" into cell C1 to test cells A1 and
    > >B1 for equality. Is there a way to use this "double equal signs" approach in
    > >place of an IF statement?

    >
    > It's not double equal signs. The first equal sign indicates that the
    > cell contents is a formula while the second equal sign is a comparison
    > operator.
    >
    > >More specifically, is it possible to create a formula such as "=A1=B1
    > >AVERAGE(1,2) "NA""? I have seen a formula such as this that did not include
    > >commas between parameters -- any help on this front will be greatly
    > >appreciated.

    >
    > Not possible. If you could accept 0 as the result when A1<>B1, you
    > could use
    >
    > =(A1=B1)*AVERAGE(1,2)
    >
    > or you could use some other function like CHOOSE, LOOKUP or INDEX
    > instead of IF, but there's no alternative to using one of these
    > functions if you want to return different type results (number or text)
    > depending on whether A1=B1 is TRUE or FALSE.
    >
    >


+ 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