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

  • Thread starter Thread starter manan
  • Start date Start date
M

manan

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top