Counting unique text

Kcbundy

New Member
Joined
Apr 19, 2023
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
I’m part of a small employee engagement committee at my place of work, we decided to play scattergories over email. Instead of counting each individual word, I was curious if there was a way to assign the word a numerical value of 1 while omitting the duplicate words. I know how to conditional format to highlight the cell to show the duplicate values, but I don’t know how to get excel to count words-especially omitting the duplicate values.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
 
Upvote 0
I know this doesn't help you without Office 365, but I'll post it anyway
=COUNTA(UNIQUE(B:B))
 
Upvote 0
I know this doesn't help you without Office 365, but I'll post it anyway
=COUNTA(UNIQUE(B:B))
I’m using 365! This is perfect. My only complaint is, it starts with 1 instead of 0. For instance, it’s already counting values before I enter in words. Minor inconvenience.
 
Upvote 0
I’m using 365! This is perfect. My only complaint is, it starts with 1 instead of 0. For instance, it’s already counting values before I enter in words. Minor inconvenience.
That is odd that it is counting 1 more than the number of entries in the column, but easily fixed by just subtracting 1 from the formula...

=COUNTA(UNIQUE(B:B))-1
 
Upvote 0
That is odd ..
Not really since Excel treats blanks as 0 so when col B is empty UNIQUE(B:B) returns 0 and when there are entries in col B unless all 1 million+ rows are filled with words there will still be a 0 returned as one of the unique values
 
Upvote 0
Not really since Excel treats blanks as 0 so when col B is empty UNIQUE(B:B) returns 0 and when there are entries in col B unless all 1 million+ rows are filled with words there will still be a 0 returned as one of the unique values
In that case, in my opinion, it might have been useful if the designers of the UNIQUE function would have included an IgnoreBlanks optional argument (defaulted to TRUE).
 
Upvote 0
In that case, in my opinion, it might have been useful if the designers of the UNIQUE function would have included an IgnoreBlanks optional argument
I agree, but it wouldn't actually help here because the function would still have to return something even if the column is empty and COUNTA would still count 1 for whatever was returned. In that circumstance the count would be incorrect for an empty column but correct for non-empty which might be worse. :eek:
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top