+ Reply to Thread
Results 1 to 2 of 2

Can i use If to check if a cell is equal to any value in a particular range

  1. #1
    Registered User
    Join Date
    05-08-2006
    Posts
    19

    Can i use If to check if a cell is equal to any value in a particular range

    Hi

    Lets say i have a cell having a nameof a animal. Now i want to check if that cell's value is equal to a range of cell having more than 20 animal names.

    Column a column b column c
    Cat dog True
    Pig elephant False
    cat
    tiger

    In the above example which i have simplified there is a range of only four animals. now in a2 we have a cell have content "PIG" which is not there in the range. So c2 returns false.

    Hope i have made myself clear.

    Thanks in adavnce

    Manan

  2. #2
    Roger Govier
    Guest

    Re: Can i use If to check if a cell is equal to any value in a particular range

    Hi
    Try entering the following in B1 and copying down.
    =IF(B1="","",COUNTIF($A$1:$A$4,B1)>0)
    Change the range A1:A4 to cover your entire list.

    --
    Regards

    Roger Govier


    "manan" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > Lets say i have a cell having a nameof a animal. Now i want to check
    > if
    > that cell's value is equal to a range of cell having more than 20
    > animal
    > names.
    >
    > Column a column b column c
    > Cat dog True
    > Pig elephant False
    > cat
    > tiger
    >
    > In the above example which i have simplified there is a range of only
    > four animals. now in a2 we have a cell have content "PIG" which is
    > not there in the range. So c2 returns false.
    >
    > Hope i have made myself clear.
    >
    > Thanks in adavnce
    >
    > Manan
    >
    >
    > --
    > manan
    > ------------------------------------------------------------------------
    > manan's Profile:
    > http://www.excelforum.com/member.php...o&userid=34216
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=545410
    >




+ 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