countif function.....

  • Thread starter Thread starter johnT
  • Start date Start date
J

johnT

this should be an easy one but i can't seem to figure it
out.....i'm comparing data in two columns, i would like to
count the number of cells in "b" that have the same data
as "a" ie: if a4 contains "john" and b4 contains "john"
then i want to count b4....etc..

thanks
 
Ctrl/shift/enter:
=SUM(1*NOT(ISNA(MATCH(A1:A100,B1:B100,0))))
Bob Umlas
ExcelMVP
 
Another way

=SUMPRODUCT(--(COUNTIF(A1:A100,B1:B100)))

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
Hi
if they have to be in the same row try:
=SUMPRODUCT(--(A1:A100=B1:B10))
 

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