Lookup??

C

Connie Martin

I have two long columns of numbers, one colum much longer than the other
obviously with numbers that don't exist in the other shorter column. I would
like to do a formula in a column beside the shorter one, which will lookup
the numbers in the shorter column to see if they exist in the longer column
and then put YES or NO accordingly beside each number in the shorter column.
Hope that is clear. How do I do this? Connie
 
T

Tom Ogilvy

Assume short column is B and long column is A. In C1:
=if(countif($A:$A,$B1),"yes","no")

then drag fill down to the bottom of the short column.
 
C

Connie Martin

Thank you, Ron. Both yours and Tom's give the same answer although different
formulas. Thanks so much. I love this newsgroup. There's so much help here!

Connie
 
R

Ron Coderre

Thanks for the feedback, Connie

(You might notice a performance hit using the COUNTIF approach because it
will search the entire column to count instances. Whereas, the MATCH
approach stops at the first hit.)

***********
Regards,
Ron

XL2003, WinXP
 
Top