Count number of unique values in a column

Post Reply
guji
Posts: 4
Joined: Thu May 06, 2021 4:48 pm

Count number of unique values in a column

Post by guji »

How can I count the number of unique values in a column?
For instance suppose the column A contains:

Code: Select all

Meat
Meat
Meat
Ham
Ham
I would like to have in a new worksheet:

Code: Select all

Meat 3
Ham 2
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 2930
Joined: Wed Mar 11, 2020 5:31 pm

Re: Count number of unique values in a column

Post by SuperTech »

Please use COUNTIF function to this task. Below is the complete details of COUNTIF:

Syntax:

COUNTIF(Range, Criterion)

Description:

Counts those cells in a cell range that fulfill the specified criterion.

Range is the cell range to be evaluated.

Criterion is the condition that the values in Range have to fulfill to be included:

Use numbers or text (like "42" or "bolts") to count all cells that contain that value.

Tip: To count all non-empty cells, use "*" as criterion. For example COUNTIF(D2:D4, "*") counts all cells in the specified area that are not empty.

Use conditions (like ">10" or "<=5") to count all cells that match the specified condition.

Note: Criteria always have to be surrounded by double quotation marks (").

Example:

If the cells A1:A5 contain the values 1, 2, 3, 2, 1: The following applies:

COUNTIF(A1:A5, "2") returns 2

COUNTIF(A1:A5, ">=2") returns 3

Please check this sample file also for better understanding.
Countif Sample.pmdx
(6.41 KiB) Downloaded 154 times
Post Reply

Return to “PlanMaker 2021 for Linux”