Determine if value is present in a given range in Excel

Hello,

In Excel (2007), suppose Col A has a couple thousand entries which are random but all of the same format (General).  Furthermore, suppose that Col B also has numerous entries, some of which are identical to entries in Col A and some of which are not.

What formula would go in Col C to indicate, with a simple Yes or No response, whether the adjacent entry in Col B can also be found in Col A?

Here is a quick example (if Col A had only seven rows) showing the desired result in Col C:
 1I thought the correct formula would be something like:

    =IF(LOOKUP(B#,$A$1:$A$7...???...="TRUE"),"Yes","No")

but I can't quite get it to work.  Am I using the correct functions?

Thanks

Steve_BradyAsked:
Who is Participating?
 
SiddharthRoutConnect With a Mentor Commented:
In Fact Use this

=IFERROR(IF(VLOOKUP(B1,$A$1:$A$1000,1,0)=B1,"YES"),"NO")

Sid
0
 
SiddharthRoutCommented:
Put this in C1

=IF(VLOOKUP(B1,$A$1:$A$1000,1,0)=B1,"yes","No")

and drag it down :)

Sid
0
 
Steve_BradyAuthor Commented:
I was just going to say the 1st one gave me #N/A's but the 2nd fixed that.  I'll study that solution so I understand it.

Thanks
0
 
SiddharthRoutCommented:
Steve, Would you like me to break it up?

Sid
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.