# Count the number of occurrences of different words

#### NJS1982

##### Board Regular
Hi all, hopefully a fairly simple one. Does anybody know if there is a formula to count up the number of times individual words appear in a list?

I have a list of projects (2,500 in total), each with a single sport attached (could be tennis, basketball, football or many others). Is there a way to count up the number of these sports, using a single formula, to tell me the total number of differing sports that are in the list (i.e. not count the duplicates)?

I know how to do it with a pivot (there are 70 different sports listed) but can't work out how to do it with a formula. Count something, maybe?

#### kvsrinivasamurthy

##### Well-known Member
One example
A2:A12 is the range which contains duplicates
Formula to count individuals

=SUMPRODUCT(1/COUNTIF(A2:A12,A2:A12))

Last edited:

#### Dobo_Bobo

##### New Member
One example
A2:A12 is the range which contains duplicates
Formula to count individuals

=SUMPRODUCT(1/COUNTIF(A2:A12,A2:A12))

The formula Kvsrinivasamurthy provided will work, but it's an array formula, thus it will only work if you press Ctrl+Shift+Enter

E.g. {=SUM(1/COUNTIF(A2:A12,A2:A12))}

Last edited:

#### NJS1982

##### Board Regular
Great! Thanks both!

#### kvsrinivasamurthy

##### Well-known Member
CSE not required. SUMPRODUCT itself is array formula. Just Enter will work.

#### Dobo_Bobo

##### New Member
CSE not required. SUMPRODUCT itself is array formula. Just Enter will work.
Thanks for letting me know, I didn't remember it correctly from when I learnt how to do it.

1,082,269
Messages
5,364,148
Members
400,783
Latest member
sambills

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...