+ Reply to Thread
Results 1 to 10 of 10

Using the IF funtions to evaulate multiple cells

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    4

    Using the IF funtions to evaulate multiple cells

    [SOLVED]=IF(Names!B4:B25="BR42","No","Yes")
    When I used this formula it seems to only evaluate the first cell. What I'm trying to do is if BR42 is in any of the cells B4:B25 on the Names Sheet then it would come back No. What am I doing wrong. I fairly new with Excel.
    Thanks
    Last edited by deananne; 08-06-2011 at 05:14 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using the IF funtions to evaulate multiple cells

    =IF(countif(Names!B4:B25,BR42),"No","Yes")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    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

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using the IF funtions to evaulate multiple cells

    Another common method:

    =IF(ISNUMBER(MATCH(BR42, Names!$B$4:$B$25, 0)), "No", "Yes")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    08-06-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using the IF funtions to evaulate multiple cells

    Neither of these seem to be doing what i need. Probably because I'm not explaning corrrectly. I have a worksheet that has names on it and each name has been asigned a room number like BR42. On the other worksheet i have listed all the rooms down and want to be able to say if they are available or not.

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

    Re: Using the IF funtions to evaulate multiple cells

    post the work book

  6. #6
    Registered User
    Join Date
    08-06-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using the IF funtions to evaulate multiple cells

    Here's the file. Notice That the room BR42 is assigned and shows on the Brick Row sheet is not available (No). But if you change the room to BR43 or something else on the Names sheet it should change the Brick Row sheet to showing available (yes), because it hasn't been used.
    Thanks for your help.
    Attached Files Attached Files

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using the IF funtions to evaulate multiple cells

    The formula I gave works fine once you put in the correct match value... put this in C5 and copy down:

    =IF(ISNUMBER(MATCH(B5, Names!$B$4:$B$25, 0)), "No", "Yes")

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using the IF funtions to evaulate multiple cells

    same for me see what happens without a workbook we assumed BR42 was a cell reference not a value

  9. #9
    Registered User
    Join Date
    08-06-2011
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using the IF funtions to evaulate multiple cells

    Thats what I was looking for.
    Thanks :)

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using the IF funtions to evaulate multiple cells

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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