+ Reply to Thread
Results 1 to 5 of 5

Thread: IF Function help

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Smile IF Function help

    Hi,

    I have an IF function in which i am trying to put 2 different values in the [logical test] section of the forumla but do not know how to do this.

    E.G

    IF(D10="receive or rec back", B10+I10, B10-I10)

    Am I able to put two variables in the logical test field?

    Please advise

    Many Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,208

    Re: IF Function help

    You can use OR function

    =B10+I10*IF(OR(D10="receive","rec back"),1,-1)
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: IF Function help

    Original formula amended:
    IF(OR(D10="receive",D10="rec back"), B10+I10, B10-I10)

    ZBOR's formula with correction:
    =B10+I10*IF(OR(D10="receive",D10="rec back"),1,-1)

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,208

    Re: IF Function help

    Oh, yes, miss that part
    "Relax. What is mind? No matter. What is matter? Never mind!"

  5. #5
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,791

    Re: IF Function help

    another variation
    =IF(OR(D10={"receive","rec back"}), B10+I10, B10-I10)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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.2.0