Count Distinct Values While Ignoring Empty Cells in Excel
AuthorSiluvia•Last modified
When an Excel list contains duplicate entries and blank cells, counting the number of different values can be difficult. Functions such as COUNTA count every nonempty cell, including duplicates, while manually removing duplicate records may alter the original data.
The Count distinct values ignoring empty cells formula in Formula Helper Plus provides a more convenient solution. Simply select the data range, and Formula Helper Plus automatically generates the required formula to count each nonempty value only once—without requiring you to write or memorize a complex formula.
- Advantages of Count Distinct Values Ignoring Empty Cells
- How to Count Distinct Values While Ignoring Empty Cells in Excel
- Tips for Counting Distinct Values
- FAQ - Frequently Asked Questions
- Conclusion
Advantages of Count Distinct Values Ignoring Empty Cells
This formula is useful when you need to determine how many different customers, products, employees, departments, or other entries appear in a range containing both duplicates and blank cells.
Its main advantages include:
Repeated entries are treated as a single distinct value, regardless of how many times they appear.
Blank cells in the selected range are excluded from the result automatically.
There is no need to remove duplicates, filter the list, or modify the source records.
Choose the source range directly from the worksheet instead of editing cell references inside a complex formula.
Formula Helper Plus creates the appropriate formula automatically based on the selected range.
The distinct count automatically recalculates whenever values in the referenced range change.
How to Count Distinct Values While Ignoring Empty Cells in Excel
In this example, a customer order list contains 50 order records. Some customers placed multiple orders, while some records have no customer assigned. We’ll count the number of distinct customers in the Customer column without including the empty cells.

To count the distinct customers while ignoring the empty cells without manually writing a formula, follow these steps.
Step 1: Select the output cell
First, select the cell where you want the distinct-value count to appear. The generated formula will be inserted directly into this cell.
Step 2: Open Formula Helper Plus
Select Kutools > Formula Helper > Formula Helper Plus.

Step 3: Find the formula and configure the argument
Formula Helper Plus organizes formulas into categories and also provides a search box, making it easier to locate the required formula without knowing its syntax.
In the dialog box:
- Shift to the Local tab.
- Select Count in the Category list.
- Select Count distinct values ignoring empty cells from the Formula list.
Alternatively, enter a keyword such as distinct in the search box to locate the formula more quickly.
- Click inside the Range box, and then select the cells you want to check for distinct nonempty values. Exclude the column heading.
- Click OK.

Result
Formula Helper Plus inserts the formula into the output cell and immediately returns the number of distinct nonempty customers.
In this example, the result is 14. Customers with multiple orders are counted only once, while empty cells are excluded from the result.

Tips for Counting Distinct Values
The accuracy of the result depends on the data contained in the selected range. Entries that look identical or blank may contain subtle differences that cause Excel to treat them as separate values.
Follow these practices when counting distinct values:
Select only the data cells. If the heading is included, it may be counted as another distinct value.
A cell containing a space, an invisible character, or other hidden content is not truly empty and may be included in the count.
For example, Northstar Retail and Northstar Retail may be treated as different values when one entry contains a trailing space.
Use consistent spelling, punctuation, and data types throughout the selected range. Variations such as Maple & Co. and Maple and Co. are counted as different values.
If new data is entered below the referenced range, expand the formula range so that the new records are included in the calculation.
FAQ – Frequently Asked Questions
The following questions address common issues when counting distinct values while excluding empty cells.
Does the formula count duplicate values more than once?
No. Each distinct nonempty value is counted only once, even if it appears multiple times in the selected range.
Are empty cells included in the result?
No. Truly empty cells are ignored and do not increase the distinct-value count.
Why is a cell that looks empty being counted?
The cell may contain a space, a hidden character, or other invisible content. Delete the cell contents completely or clean the source data before counting again.
Are uppercase and lowercase versions counted as different values?
No. The generated formula is not case-sensitive, so entries such as Northstar Retail and NORTHSTAR RETAIL are generally treated as the same value.
Can the formula count both text and numeric values?
Yes. The selected range can contain both text and numeric values. However, keeping the data type consistent helps prevent the same value from being stored and interpreted differently.
Will the result change when the source data is edited?
Yes. Because Formula Helper Plus inserts a formula rather than a fixed value, the result recalculates automatically whenever data within the referenced range changes.
Will newly added records be counted automatically?
Only if the new records are within the range referenced by the formula. If data is added outside the original range, update the referenced range so the new records are included in the calculation.
Conclusion
The Count distinct values ignoring empty cells formula makes it easy to count each nonempty value only once in a range containing duplicates and blanks. With Formula Helper Plus, you only need to select the source range to generate the formula and obtain a dynamic result—without writing or memorizing complex formula syntax.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in
Table of contents
- Count Distinct Values Ignoring Empty Cells
- Advantages
- How to use
- Tips
- FAQ
- The Best Office Productivity Tools
Kutools for Excel
Brings 300+ powerful features to streamline your Excel tasks.
- ⬇️ Free Download
- 🛒 Purchase Now
- 📘 Feature Tutorials
- 🎁 30-Day Free Trial
