Ever found yourself sifting through endless data in Excel, wondering how to count unique items in a list? You're not alone. With datasets growing by the day, it's crucial to extract meaningful insights quickly and accurately. Today, we're going to explore a simple yet powerful function that does just that - the COUNTIF function along with the unique() feature of Excel's Dynamic Arrays, introduced in Office 365 and Excel 2021.

Before we dive in, let's set the stage. Imagine you have a column of data, say A1:A100, containing customer names. You want to find out how many unique customers there are. Traditional methods might involve manual sorting and counting, but that's tedious and prone to errors. Let's make this process easier and more efficient.

Using COUNTIF and UNIQUE Together
The beauty of Excel lies in its ability to combine different functions to get the result you want. The COUNTIF function is a straightforward way to count the number of times a specific criterion is met. However, it doesn't inherently cater to unique items. This is where the UNIQUE feature of Dynamic Arrays comes in, to identify unique items first, which COUNTIF can then count.

But hold on, you might not have access to Dynamic Arrays as they're a relatively new feature. Don't worry, we'll cover both methods - the new and the old school way.
Counting Unique Items using UNIQUE and COUNTIF (Dynamic Arrays)

Here's how you can do it in Excel 365 or Excel 2021:
1. In a new column, say B1, use the formula =UNIQUE(A1:A100) to get a list of unique customer names.
2. In a new cell, say C1, use the formula =COUNTIF(B1:B100, " граждан") to count the number of unique customers. Note that " граждан" is a placeholder; replace it with the specific criterion you're looking for.

Counting Unique Items using COUNTIF with an IF Statement (Legacy Method)
If you're not on the latest version of Excel, here's an alternative method:
1. In a new column, say B1, use the formula =IF(A1=A2,"",A1) and drag it down to B100. This eliminates duplicates.

2. In a new cell, say C1, use the formula =COUNT(B1:B100) to count the number of unique customers.
Expanding Our Search - Removing Blank or Null Values




















What if your list contains blank or null values? You don't want to count those, right? Let's refine our search.
In both methods above, you can add an IF statement to check if the cell is not blank or null before processing. For the legacy method, your formula in C1 would look like this:
=COUNT(IF(B1:B100<>"", B1:B100, 0))
For the Dynamic Arrays method, your formula in C1 would look like this:
=COUNTIF(B1:B100, " гражданин")
Notice we've added an extra condition to check if the cell is not blank or null before counting.
That's it! You've now mastered how to count unique items in a list using Excel. Whether you're using the latest version or an older one, there's always a way to streamline your data analysis process. The next time you find yourself immersed in a sea of data, remember these methods to save time and effort.
But don't stop here. Excel is a vast universe of possibilities. Keep exploring, keep learning, and remember - no data is too big, too complex, or too unique for Excel. Happy counting!