As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Excel Function Quickie: IF [Solved]

LaOsLaOs SaskatoonRegistered User regular
edited March 2008 in Help / Advice Forum
Is it possible to have, in Excel, IF look at a whole range of cells rather than just a single cell?

I want it to do something to a cell IF a certain value is found within a range somewhere else.

For example:
IF(Sun!$B:$B=A3,"Yes","No")

That does not work (returns the No), but:
IF(Sun!$B4=A3,"Yes","No") (Sun!$B4 actually does = A3 :P)

works fine.

Is what I want even possible?

LaOs on

Posts

  • Options
    milehighmilehigh Registered User regular
    edited March 2008
    Look into the VLOOKUP function. You should be able to nest that with an IF and an ISERROR statement to return what your looking for. I'm guessing it'll look something like this:

    =IF(ISERROR(VLOOKUP(A3,Sun!$B:$B,1,FALSE)),"FALSE","TRUE")

    milehigh on
  • Options
    FishMistFishMist Registered User regular
    edited March 2008
    An If function by itself isn't versatile enough to do this, but an If combined with a Vlookup and a Isna should do the trick:

    IF(ISNA(VLOOKUP(A3, Sun!$B:$B, 1, FALSE)), "No", "Yes")

    FishMist on
    [SIGPIC][/SIGPIC]
  • Options
    LaOsLaOs SaskatoonRegistered User regular
    edited March 2008
    FishMist wrote: »
    An If function by itself isn't versatile enough to do this, but an If combined with a Vlookup and a Isna should do the trick:

    IF(ISNA(VLOOKUP(A3, Sun!$B:$B, 1, FALSE)), "No", "Yes")

    Ooh!

    That works quite well. I didn't know about the IS functions. Thanks a bunch.

    I told you it was a quickie!

    LaOs on
This discussion has been closed.