How To Count Unique Values In Microsoft Excel

One major reasonMicrosoft Excelspreadsheets are so popular is the ability to process the data entered on a sheet easily. For instance, if you are planning a wedding and individually listing expenses for the location, the food, the music, and everything else that goes into planning a wedding, having a function that can easily add all those values together is such a time-saver. However, adding that sum is not the only function Excel can perform when you have a column filled with inputted data.

You may have a large column containing many different words or numbers in each cell and want to know how many distinct values are in that column. For example, let’s say you recently made a gigantic list of several hundred films you consider the best of all time that you will narrow to your top 100.

marker over printed spreadsheet

Obviously, you have the film titles in a column, but in your list-making, you have also created columns for the names of each film’s director and release year. If you wanted to know how many different directors or distinct years were represented on that list, Excel has the capabilities that let you do that. In fact, the program actually has two different ways of accomplishing this, depending on your comfort level with Excel functions andshortcuts.

How to count unique values with a filter

If you are unfamiliar with inputting formulas into Microsoft Excel, the much simpler way to get the number of unique values in an Excel column is through a filter. Although you will end up having to use a function, it is a very simple function that is easy to grasp.

After that, you will know how many unique values are in that column. For some of you, you could follow that until the ROWS function. Let’s say your column heading is in C1, and the final value is in C10. You would type the following into cell C11:

spreadsheet laptop graphic

Now hit Enter. Unless you want your column heading counted, make sure you use the cell of the first actual value in your range.

How to count unique values with a function

If you are more comfortable with Microsoft Excel functions, you may compute these unique values through a combination of functions as well. It will take a combination of five different functions to get the number of unique values in a column. Which functions you use depends on what values are being counted. For instance, if your column is just numbers, then you can use a combination of the SUM, IF, and FREQUENCY functions. Let’s say the entries in your column run from C2 to C115. Your function combo would read:

However, things get a little more intricate if your column contains text entries. If you were to use the above function combination for this, it would only count the rows that feature numbers. You still would use the SUM, IF, and FREQUENCY functions, but you would also add the MATCH and LEN functions. Using the same column of C2 to C15 as an example, the function would read:

Both function combinations will skip over any blank row and will not count towards the running total of unique values, as there is no value to be counted.