How to count non duplicate values in excel
Tutor 5 (99 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To count non-duplicate values in Excel, you can use built-in formulas and functions depending on whether your data is numeric, text, or a mix. Non-duplicate values are the unique entries that appear only once in a range.
Method 1: Using COUNTIF with SUMPRODUCT
Select the range of data. Suppose your data is in column
AfromA2toA20.Use this formula to count values that appear only once:
=SUMPRODUCT(--(COUNTIF(A2:A20,A2:A20)=1))
Explanation:
COUNTIF(A2:A20,A2:A20)counts how many times each value appears in the range.=1checks for values that appear only once.--converts TRUE/FALSE results to 1/0.SUMPRODUCTsums all 1s, giving the total count of non-duplicate values.
Method 2: Using UNIQUE and COUNTA (Excel 365 or Excel 2021)
Suppose your data is in
A2:A20.Enter this formula:
=COUNTA(UNIQUE(A2:A20, TRUE, FALSE))
Explanation:
UNIQUE(A2:A20, TRUE, FALSE)returns only values that appear once.COUNTAcounts the number of unique values returned.
Method 3: Using a Helper Column
In column
B, next to your data, enter this formula inB2:=IF(COUNTIF(A$2:A$20,A2)=1,1,0)
Drag the formula down to match your data range.
Sum column
Bto get the count of non-duplicate values:=SUM(B2:B20)
Notes and Tips
Text values and numbers are treated the same in
COUNTIF.Blank cells are ignored if using
COUNTIFbut counted in some variations ofUNIQUE.UNIQUEis available only in newer Excel versions. Older versions requireCOUNTIFor helper columns.
This method works efficiently for lists of hundreds or thousands of entries, making it easy to identify strictly non-duplicate values.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to freeze a row in excel
Answers · 1
How to freeze the top three rows in excel
Answers · 1
How to freeze the top two rows in excel
Answers · 1
How to freeze top row excel mac
Answers · 1