View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default comparing two columns

I'm bored too!

--
Biff
Microsoft Excel MVP


"Harlan Grove" wrote in message
...
"T. Valko" wrote...
One way...


And the slow way . . .

Comparing column B to column A with the list in column A in the range
A1:A20.

=IF(COUNTIF(A$1:A$20,B1),"match","")


Bit faster to use

=IF(COUNT(MATCH(B1,A$1:A$20,0)),"match","")

or just

=MATCH(B1,A$1:A$20,0)

which would return a number when there's a match and #N/A when there
isn't.