ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing and counting occurences in 2 columns (https://www.excelbanter.com/excel-worksheet-functions/83252-comparing-counting-occurences-2-columns.html)

Brian Johnston

Comparing and counting occurences in 2 columns
 
I have a worksheet with 2 columns of data (non-numeric), I need to count the
occurences of each row in column 2 in column 1. The data in column 2 appears
once and in column one it may appear 1-many times. eg data is like this,
(column 3 is the requested count of column 2 in column 1)

abc abc 1
abcd abcd 2
abcd acd 3
acd ...
acd
acd
...

There's 10,000 rows in column 1 and 3000 rows in column 2



Bondi

Comparing and counting occurences in 2 columns
 
Hi,

You can use CountIf()

=COUNTIF(Column1,Criteria)

Regards,
Bondi


Ardus Petus

Comparing and counting occurences in 2 columns
 
In C1, enter:
=COUNTIF(A:A,B1)
and copy down

HTH
--
AP

"Brian Johnston" <Brian a écrit dans le
message de ...
I have a worksheet with 2 columns of data (non-numeric), I need to count

the
occurences of each row in column 2 in column 1. The data in column 2

appears
once and in column one it may appear 1-many times. eg data is like this,
(column 3 is the requested count of column 2 in column 1)

abc abc 1
abcd abcd 2
abcd acd 3
acd ...
acd
acd
..

There's 10,000 rows in column 1 and 3000 rows in column 2






All times are GMT +1. The time now is 03:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com