Google Sheets COUNTUNIQUE for Schoolwork
Use COUNTUNIQUE when the question asks how many different values a practice list contains. Six cells can contain only three distinct labels. The answer is one number, not a list of labels or a count of every occurrence.
Work in your own unshared practice spreadsheet on a computer. Check the account, file title and sheet tab. Use fictional labels, not student names, marks or attendance. Do not overwrite a teacher's sheet or clear cells to make room.
Read the six supplied labels first
Use one column. Put the heading Colour in A1, then enter the following labels exactly, with no extra spaces. Every practice input is nonblank text with the same spelling and capitalization each time it repeats.
- A2: Red
- A3: Blue
- A4: Red
- A5: Green
- A6: Blue
- A7: Red
On paper, cross off repeated occurrences without changing the sheet: Red, Blue and Green are the three different labels. Red occurs three times, Blue twice and Green once. Their frequencies add to 3 + 2 + 1 = 6 entries.
Calculate one separate distinct count
Google documents the syntax as COUNTUNIQUE(value1, [value2, ...]). The first argument can be a range. This exercise uses only one range, so no additional arguments are needed.
- Check that C2 is unused and outside A2:A7.
- Enter
=COUNTUNIQUE(A2:A7)in C2. - Read the saved formula and confirm its first and last source cells.
- Compare the result 3 with the three distinct labels counted on paper.
Do not include A1. In this supplied example, =COUNTUNIQUE(A1:A7) returns 4 because the heading Colour adds another different text value. A formula can be valid while its range answers the wrong question.
Separate distinct labels from occurrences
For these six known nonblank labels, =COUNTA(A2:A7) counts 6 values, including repeats. =COUNTUNIQUE(A2:A7) counts 3 distinct values. Neither number tells you whether a label is correct or whether an assignment is complete.
Distinct does not mean present exactly once. Red and Blue each contribute one to the distinct count even though they repeat. Green is the only label occurring exactly once, which is a different question.
COUNTUNIQUE returns a numeric count. Google's UNIQUE function instead returns distinct rows from a source range. This guide does not use that list-producing function, a Remove duplicates command or a values-only copy. Leave all source entries intact.
Keep the range and interpretation bounded
Use A2:A7, not a whole-column reference that can include a heading or unrelated work. If your number differs, read each cell's full stored text and inspect the formula range. Do not edit source labels merely to force an answer of 3.
This exercise does not establish rules for blanks, formulas returning empty text, mixed numbers and text, or labels that differ in case or spacing. Stop and investigate those inputs separately rather than extending this clean-text example to them.
Google says COUNTUNIQUE does not support counting unique rows across multiple columns. Do not interpret a count over two columns as a count of distinct paired records. A count of labels also does not verify how many people the labels represent.
Finish by stating both the range and the quantity: A2:A7 contains 3 distinct colour labels across 6 supplied entries. Keep the original entries, saved formula and paper check available for comparison.
Common questions
What does COUNTUNIQUE(A2:A7) return for this practice?
It returns 3 for Red, Blue, Red, Green, Blue, Red. The six supplied cells contain three different labels. Repeated occurrences do not add new distinct labels.
Does unique mean a value must appear exactly once?
Not here. Red and Blue still count as distinct labels although they repeat. Only Green occurs exactly once, but the distinct-label total is 3, not 1.
Will COUNTUNIQUE produce a list or delete duplicates?
Neither. The result is one number in the formula cell. It does not list the labels or delete source entries. Keep all six source cells because the formula refers to them.
Can I use this number as a count of students?
No. This exercise counts distinct fictional text labels, not people or verified records. A repeated name can belong to different people, and one person can appear under different spellings.
Sources and scope
Sources checked . These are documented formula examples and an independent paper count, not a claim of a hands-on Sheets session or a test of private school data.
- Google: COUNTUNIQUE documents values, ranges and the limitation on counting unique multi-column rows.
- Google: COUNTA distinguishes a count including repeated values from a unique count.
- Google: UNIQUE documents the separate row-returning function.
- Sheets Help: COUNTUNIQUE independently explains counting repeated words once. Its examples are the publisher's, not ours.