EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Excel Tips Count Unique Values in Excel
Secondary Sidebar
Excel Functions
  • Excel Tips
    • Recover Document in Excel
    • Excel Shortcut to Select Row
    • Excel Header Row
    • Excel Insert Button
    • Excel Translate
    • Budget in Excel
    • KPI Dashboard in Excel
    • Blank Invoice Excel Template
    • Write Formula in Excel
    • Auditing Tools in Excel
    • Autofit Row Height in Excel
    • Formatting Text in Excel
    • Add Rows in Excel Shortcut
    • Divide Cell in Excel
    • Compare Two Columns in Excel for Matches
    • Excel Troubleshooting
    • Unprotect Excel Workbook
    • Subtract Date in Excel
    • Carriage Return in Excel
    • Negative Numbers in Excel
    • Worksheets in Excel
    • Excel Match Multiple Criteria
    • Exponential Moving Average Formula
    • Sentence Case in Excel
    • Excel Reverse Order
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Percent Change in Excel
    • Drag and Drop in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (35+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course

Count Unique Values in Excel

By Pradeep SPradeep S

Count Unique Values in Excel Using COUNTIF

Count of Unique Values in Excel (Table of Contents)

  • Count Unique Values in Excel Using COUNTIF
  • COUNTIF Formula in Excel
  • How to Count Unique Values in Excel Using COUNTIF?

Count Unique Values in Excel Using COUNTIF

Unique values in any column are those that have only one occurrence, and that can be counted with the help of the countif function along with the SumIf function or Sum and If function. With the help of the Countif function first, we will get the cell with unique values, and then with the help of the Sum and If a function, we will get the sum of the count of unique cells. This is an array formula where we are using multiple functions. To exit from the syntax, press Ctrl + Shift + Enter together, which we will frame the complete formula into a curly bracket.

COUNTIF Formula in Excel

Below is the COUNTIF Formula in Excel :

COUNTIF Formula in Excel

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

The COUNTIF Function has two arguments, i.e. range, criteria.

  • Range: (Compulsory or required argument) It indicates the range of cells on which the criteria will be applied.
  • Criteria: (Compulsory or required argument) It is a condition that will be applied to the values presented by the range of cells. It indicates what needs to be counted.
Note: It can be either a text string, cell reference, or mathematical/logical expression.
  • In the Criteria argument, Non-numeric values must always be enclosed within double quotes.
  • Criteria argument is case-insensitive, where it can consider a lower, proper & upper case.
  • The Wildcard characters can also be used in the criteria argument of the COUNTIF function.

The three most widely used wildcard characters in Excel COUNTIF functions are:

All in One Excel VBA Bundle(120+ Courses, 30+ Projects)
Basic ExcelAdvanced ExcelVBA & MacrosExcel Dashboards
Pivot TablesStatistical FunctionsFinancial FunctionsCharts & Graphs
Price
View Courses
120+ Online Courses | 30+ Projects | 500+ Hours | Verifiable Certificates | Lifetime Access
4.9 (64,725 ratings)
  1.  Question mark (?): Used to track or identify or take a single character count.
  2.  Asterisk (*): To match any sequence of leading or trailing characters.
  3. Tilde (~): To find out an actual question mark or asterisk.

COUNTIF function is purely based on a logic that you apply in the criteria argument.

Various arithmetic operators can be used in the COUNTIF function:

< Less Than
> Greater Than
= Equal to
<= Less than or equal to
>= Greater than or equal to
<> Less than or greater than

The above-mentioned operators are used in the Criteria argument of the COUNTIF function. 

How to Count Unique Values in Excel Using COUNTIF?

Count Unique Values in Excel Using COUNTIF is straightforward and easy to use. Let us understand the count of unique values in excel by some examples.

You can download this Count Unique Values Using COUNTIF Excel Template here – Count Unique Values Using COUNTIF Excel Template

Count Values for a Given Unique Number Value in Excel – Example #1

In the below-mentioned example. The Table contains the student’s name in column B (B8 to B24) & the score of each student (C8 to C24). Here, there is a repetition of scores; here, I need to get the count of a unique score, i.e. “35” from this dataset range (C8:C24).

Let’s apply the COUNTIF function in cell “E9”. Select the cell “E9”, where the COUNTIF function needs to be applied.

Excel Data Example 1

Click the insert function button (fx) under the formula toolbar, a dialog box will appear, type the keyword “COUNTIF” in the search for a function box, the COUNTIF function will appear in the select a Function box. Double click on the COUNTIF function.

Count Unique Values Example 1-2

A dialog box appears where arguments for the COUNTIF function needs to be filled or entered, i.e. =COUNTIF (Range, criteria)

  • Range: To enter the range argument, click inside cell C8 and you’ll see the cell selected, then Select the cells till C24. So that column range will get selected, i.e. C8:C24.
  • Criteria: It is a condition that tells the countif function which cells to count, i.e. 35.

Click ok after entering both the argument.

=COUNTIF (C8:C24,35)

i.e. returns the count of unique scores, i.e. “35” from this dataset range (C8:C24). Click OK

Count Unique Values Example 1-3

Here, the COUNTIF function has returned a count of unique scores, i.e. “35” within a defined range, i.e. 4. The passing score has appeared 4 times in a dataset range (C8:C24).

Count Unique Values Example 1-4

Count Values for a Given Unique Text Value in Excel – Example #2

In the below-mentioned example, the Table contains a date in column G (G5 to G20) & a day in the column (H5 to H20). Here, there is a repetition of days; here, I need to get the count of the unique day, i.e. “Tuesday”, only from this dataset range (H5:H20).

Let’s apply the COUNTIF function in cell “J7”. Select the cell “J7”, where the COUNTIF function needs to be applied.

Excel Data Example 2

Click the insert function button (fx) under the formula toolbar, a dialog box will appear, type the keyword “COUNTIF” in the search for a function box, the COUNTIF function will appear in the select a Function box. Double click on the COUNTIF function.

Count Unique Values Example 2-2

A dialog box appears where arguments for the COUNTIF function needs to be filled or entered, i.e. =COUNTIF (Range, criteria)

  • Range: To enter the range argument, click inside cell H5 and you’ll see the cell selected, then Select the cells till H20. So that column range will get selected, i.e. H5:H20.
  • Criteria: It is a condition that tells the countif function which cells to count or cell containing text value, i.e. “TUESDAY”.

Here, we are using a text value or condition; we have to type it within double quotation marks. Another thing that you should know is the criteria. it is case insensitive, where you can also use “Tuesday” in lowercase format

Click ok after entering both the argument.

=COUNTIF (H5:H20,”TUESDAY”)

i.e. returns the count of a unique text value, i.e. “Tuesday” from this dataset range (H5:H20). Click OK.

Count Unique Values Example 2-3

Here, the COUNTIF function has returned a count of unique text values, i.e. “Tuesday” within the defined range, i.e. 3. Tuesday has appeared 3 times in a dataset range (H5:H20).

Count Unique Values Example 2-4

Suppose you want to count Saturdays and Sundays; you can still use this COUNTIF function. As both, the text value starts with “S”. we can use a simple syntax of COUNTIF.

Here we can use a wild character, an asterisk (*) to match a leading character sequence, i.e. “s.”

Let’s check out how it works; here, I use formula =COUNTIF (H5:H20, “S*”)

Count Unique Values Example 2-5

Where it returns the count of Saturdays and Sundays, i.e. 4

Final Result

Things to Remember about Count of Unique Values in Excel

  • COUNTIF function does not apply to a non-adjacent range of cells.
  • Suppose the text string in the criteria argument contains more than 255 characters or greater than 255 characters in length. Then #VALUE! Error occurs.

Recommended Articles

This has been a guide to Count unique values in excel using COUNTIF. Here we discuss the COUNTIF Formula in excel and how to count unique values in excel along with practical examples and downloadable excel templates. You can also go through our other suggested articles –

  1. COUNTIF Excel Function
  2. Excel Count Function
  3. Count Characters in Excel
  4. Count Cells with Text in Excel
Popular Course in this category
Excel Training (23 Courses, 9+ Projects)
  23 Online Courses |  9 Hands-on Projects |  110+ Hours |  Verifiable Certificate of Completion
4.9
Price

View Course

Related Courses

Excel Data Analysis Training (17 Courses, 8+ Projects)4.9
Excel for Finance Training (18 Courses, 7+ Projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Count Unique Values Using COUNTIF Excel Template

EDUCBA

Download Count Unique Values Using COUNTIF Excel Template

EDUCBA

डाउनलोड Count Unique Values Using COUNTIF Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more