1. Attention: We have put together a thread with tips and a tutorial video to help with using the new software. Please take a moment to check out the thread here: Trapshooters.com Tutorial & Help Video.
    Dismiss Notice

Excel Function Help Needed

Discussion in 'Off Topic Threads' started by pullbangloss, Jan 8, 2009.

Thread Status:
Not open for further replies.
  1. pullbangloss

    pullbangloss Active Member

    Joined:
    Jan 29, 1998
    Messages:
    1,831
    Hey All,

    My current formula reads =IF(B2=33,M2,""). What I want is for the cell to equal M2 if either B2=33 or B2=43. Any help would be appreciated.

    Thanks in advance,
    Matt Ski
     
  2. paul.QTGC

    paul.QTGC TS Member

    Joined:
    Jul 16, 2008
    Messages:
    9
    try this
    =IF(AND(B2<36,B2>32),M2,"")
     
  3. paul.QTGC

    paul.QTGC TS Member

    Joined:
    Jul 16, 2008
    Messages:
    9
    Sorry how about this one
    =IF(OR(B2=33,B2=43),M2,"")
     
  4. texasaggie2000

    texasaggie2000 Member

    Joined:
    May 20, 2008
    Messages:
    63
    If you want M2 to equal the discrete numbers of 33 or 43, try this:

    =if(b2=33,m2,if(b2=43,m2,""))
     
  5. Bruce Specht

    Bruce Specht Well-Known Member

    Joined:
    Jan 29, 1998
    Messages:
    5,055
    Location:
    Near but not in chicago
    try a calculator
     
  6. zzt

    zzt Well-Known Member

    Joined:
    Jan 29, 1998
    Messages:
    3,460
    Location:
    SE PA
    Paul's second example is the correct formula, although texasaggie's will also return the value of M2 if true.
     
  7. 320090T

    320090T Well-Known Member

    Joined:
    Jan 29, 1998
    Messages:
    3,348
    Location:
    Indiana
    Now, one of you guys explain all that in regular terms, please, thanks.
     
  8. jhoward

    jhoward Member

    Joined:
    Nov 4, 2008
    Messages:
    827
    =IF(OR(B2=33,B2=43),M2,"")

    =If(expression, if true, if false)

    Basically, the equation evaluates the 'expression' to determine if it is true or false. In this case is "OR(B2=33,B2=43)" true or false? I'll go over the 'OR' statement in a minute. If the 'expression' is true, then Excel will use the first value given, in this case the value in cell M2. If the 'expression' is false, then Excel will use the second value of "".

    OR(B2=33,B2=43)

    If the value in cell B2 = 33 OR 43 then the expression returns a value of 'true', if the value in cell B2 is something other than 33 or 43 then the expression returns a value of 'false'.

    =IF(OR(B2=33,B2=43),M2,"")

    If the value in cell B2=33 or 43 then use the value in cell M2 in this cell, otherwise leave this cell blank.
     
  9. 320090T

    320090T Well-Known Member

    Joined:
    Jan 29, 1998
    Messages:
    3,348
    Location:
    Indiana
    And what might this be used for?
     
  10. pullbangloss

    pullbangloss Active Member

    Joined:
    Jan 29, 1998
    Messages:
    1,831
    Thanks to all for your help. I knew there had to be some Excel guru's out there somewhere.

    Mitch,
    Thanks for the congrats. It wasn't pretty but we got the job done! I learned the secret to winning calcuttas...have a good partner!

    Thanks again to EVERYONE!

    Matt Ski
     
  11. wolfram

    wolfram Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    6,261
    Try =if(b2=33,m2,if(b2=43,m2),""). Nested if statement. If you get into more conditions that this you may want to use the lookup function and a table. Its alot easier to modify and expand.
     
Thread Status:
Not open for further replies.