+ Reply to Thread
Results 1 to 4 of 4

how to combine and's with or's in a if statement

Hybrid View

Guest how to combine and's with... 12-23-2005, 04:10 AM
Guest RE: how to combine and's with... 12-23-2005, 06:45 AM
Guest RE: how to combine and's with... 12-23-2005, 06:55 AM
Guest Re: how to combine and's with... 12-23-2005, 08:10 AM
  1. #1
    Rick
    Guest

    how to combine and's with or's in a if statement

    If "A" is constant for both or conditions, how does one write the if
    statement? I tried to do this and got and error:
    If(or($b4="UA", sum($r4+$t4>0, and($a4="S")),1,2)
    --
    Rick Rack

  2. #2
    Stefi
    Guest

    RE: how to combine and's with or's in a if statement

    Hi Rick,

    You have a syntax error (missing closing parenthesis): sum($r4+$t4>0
    correct: sum($r4+$t4)>0

    But I can't tell wether your formula gives the result you want, because you
    don't tell us what you want exactly!

    Regards,
    Stefi

    „Rick” ezt Ã*rta:

    > If "A" is constant for both or conditions, how does one write the if
    > statement? I tried to do this and got and error:
    > If(or($b4="UA", sum($r4+$t4>0, and($a4="S")),1,2)
    > --
    > Rick Rack


  3. #3
    Toppers
    Guest

    RE: how to combine and's with or's in a if statement

    Rick,
    Is this what you require?

    =IF(AND(OR($B4="UA",$R4+$T4>0), ($A4="S")),1,2)

    If B4="UA OR R4+T4>0 AND A4="S" then results is 1, otherwise 2

    "Rick" wrote:

    > If "A" is constant for both or conditions, how does one write the if
    > statement? I tried to do this and got and error:
    > If(or($b4="UA", sum($r4+$t4>0, and($a4="S")),1,2)
    > --
    > Rick Rack


  4. #4
    Bob Phillips
    Guest

    Re: how to combine and's with or's in a if statement

    maybe

    =IF(OR($B4="UA",AND($R4+$T4>0,$A4="S")),1,2)

    but where is A constant?

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Rick" <Rick@discussions.microsoft.com> wrote in message
    news:7360E70F-3314-4FC9-83A5-FB461182A4EA@microsoft.com...
    > If "A" is constant for both or conditions, how does one write the if
    > statement? I tried to do this and got and error:
    > If(or($b4="UA", sum($r4+$t4>0, and($a4="S")),1,2)
    > --
    > Rick Rack




+ 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