+ Reply to Thread
Results 1 to 3 of 3

ifs and ors

  1. #1
    garymme
    Guest

    ifs and ors

    can I not to this? it keeps giving me errors...

    =IF(D2=OR("AB","NT","YT"),Y2*1.07,IF(D2=OR("BC","SK","MB"),Y2*1.14))

    I'm just trying to ask it to calculate something if it is one of the listed
    codes, but I'm not sure I'm using my or statment right....

  2. #2
    Bob Phillips
    Guest

    Re: ifs and ors

    =IF(OR(D2={"AB","NT","YT"}),Y2*1.07,IF(OR(D2={"BC","SK","MB"}),Y2*1.14))



    --
    HTH

    Bob Phillips

    (remove xxx from email address if mailing direct)

    "garymme" <[email protected]> wrote in message
    news:[email protected]...
    > can I not to this? it keeps giving me errors...
    >
    > =IF(D2=OR("AB","NT","YT"),Y2*1.07,IF(D2=OR("BC","SK","MB"),Y2*1.14))
    >
    > I'm just trying to ask it to calculate something if it is one of the

    listed
    > codes, but I'm not sure I'm using my or statment right....




  3. #3
    garymme
    Guest

    Re: ifs and ors

    Wow, thanks Bob, its exactly what I was trying to do!

    "Bob Phillips" wrote:

    > =IF(OR(D2={"AB","NT","YT"}),Y2*1.07,IF(OR(D2={"BC","SK","MB"}),Y2*1.14))
    >
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove xxx from email address if mailing direct)
    >
    > "garymme" <[email protected]> wrote in message
    > news:[email protected]...
    > > can I not to this? it keeps giving me errors...
    > >
    > > =IF(D2=OR("AB","NT","YT"),Y2*1.07,IF(D2=OR("BC","SK","MB"),Y2*1.14))
    > >
    > > I'm just trying to ask it to calculate something if it is one of the

    > listed
    > > codes, but I'm not sure I'm using my or statment right....

    >
    >
    >


+ 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