Count Only Unique Text Values from a List. If you set this parameter as true then it will count the blank rows as unique. 5 5 7 Following is the generic formula that you can use: ‘data’ – data represents the range that contains the values. As an example, there are nine people working in Ashburn locations, but there are only three unique individuals working in Ashburn. 9 25 I recommend reading this section above on calculating unique values by condition. I love the program, and I can't imagine using Excel without it! 8 essential tools to streamline your email workflow. You can easily count the number of unique values of the range using a simple formula. This formula woks nicely on a continuous set of values in a range, however if your values contain empty cells, then this formula fails. This comprehensive set of time-saving tools covers over 300 use cases to help you accomplish any task impeccably without errors or delays. Below is the code to write your own UDF that does the same: To embed this function in Excel use the following steps: To use the UDF, you can simply type the UDF name ‘CountUnique’ like a normal excel function. Example MATCH(0, INDEX(COUNTIF($B$1:B3, $A$2:$A$10), 0, 0), 0)) After this, the result of CountIF function are used as a divisor with 1 as the numerator (same as in first method). The simplest and easiest way to count distinct values in excel is to use SumProduct and CountIF formula. Other ways to count unique values. to "How to count unique values in Excel an easy way", count unique and distinct values in Excel, Get count of unique values that occur only once, Count unique values with multiple criteria, Find unique values based on multiple criteria, Excel UNIQUE function - quick way to get uniques in Excel 365, How to find unique values in Excel 2019, 2016 and earlier. An alternative option for counting unique values by 2 conditions is, =SUMPRODUCT((($A$2:$A$10000=A2) * ($D$2:$D$10000=D2)) / COUNTIFS($A$2:$A$10000, $A$2:$A$10000, $D$2:$D$10000, $D$2:$D$10000, $B$2:$B$10000, $B$2:$B$10000)). Ablebits is a fantastic product - easy to use and so efficient. We also need to use an array function. Let’s first understand the role of inner CountIF function. Counting unique / distinct rows in Excel is akin to counting unique and distinct values, with the only difference that you use the COUNTIFS function instead of COUNTIF, which lets you specify several columns to check for unique values. Anyone who works with Excel is sure to find their work made easier. 9 16 11 I need to find a simple way of counting the unique customer count against a particular Salesman. But, before starting let’s make our goal clear. If there are any values that are duplicate, then MATCH will return only the position of the first occurrence of that value in the data range. White Chocolate 15gm So, the formula in F5 would go as follows: We have updated this and a few other formulas in this tutorial. Hello Ben! For the Power Query solution today, the first step is to format the data as an Excel Table. The best spent money on software I've ever spent! The reason IF function is required because MATCH will return a #N/A error for empty cells. Thank you for helping me make this post a little better :), Hi, Unfortunately, without seeing your data it is impossible to give you advice. They are all values but duplicates are merged into one distinct value. To count only unique values we have to combine several Excel functions. I have data in “A” column and input in “B” column and required result is in ” C” column. The formula for counting unique values based on multiple criteria is pretty much similar to the above example, though the criteria are constructed a bit differently: Those who are curious to know the inner mechanics, can find the explanation of the formula's logic here: Find unique values based on multiple criteria. Incredible product, even better tech support…AbleBits totally delivers! =IFERROR(ROWS(UNIQUE(FILTER(A2:A10, (B2:B10=F1) * (C2:C1016))), 0), You just need to add each condition separately, like this: Prior to Excel 2013, this capability was not built-in to the PivotTable feature. Excel Tutorials : 100 Excel Tutorials. Following is the generic formula that you can use: = SUMPRODUCT (1 / COUNTIF (data,data)) (Refer Table 2a) Use this formula for a range, with or without blank cells. Your formulas an explanantions are very helpful thanks! As above we have discussed that you can build your own formula to count the unique values in a range of cells. improve. Press Alt + F11 key on the Excel, this will open the VBA window. I don't know how to thank you enough for your Excel add-ins. Date in Excel isn't a separate type, but a number with proper formatting. The easiest way to count unique values in a column is to use the UNIQUE function together with the COUNTA function: The formula works with this simple logic: UNIQUE returns an array of unique entries, and COUNTA counts all the elements of the array. E5 =SUM(--ISNUMBER(SEARCH("offer",UNIQUE($F:$F)))), Is it possible to do something similar but across multiple worksheets? To have it done, build your formula in this way: To get a list of one-time occurrences, set the 3rd argument of UNIQUE to TRUE: To count the unique one-time occurrences, nest UNIQUE in the ROW function: Please note that COUNTA won't work in this case because it counts all non-blank cells, including error values. Any ideas? Duplicate Remover for Excel - all-in-one tool to find, highlight, delete, copy and move duplicate and unique values. The CountIF function looks inside the data range (B2:B9) and counts the number of times each value appears in data range. This is a good option if you … Next. Corp EC EC1 Fran EC 1 This will help us provide a quick and relevant solution to your query. “Tuesday” only from this dataset range (H5:H20). To count the unique values (don't be overwhelmed), we add the SUM function, 1/, and replace 5 with … Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? For example, to count the unique rows in the range A2:C10, we use this formula: To count unique values in Excel ignoring blanks, employ the FILTER function to filter out empty cells, and then warp it in the already familiar COUNTA UNIQUE formula: With the source data in B2:B11, the formula takes this form: =COUNTA(UNIQUE(FILTER(B2:B11, B2:B11<>""))). This formula uses Frequency function to count the unique values, but the problem here is that FREQUENCY function is only designed to work with numbers. Dark Chocolate 25gm box 12 pcs Copyright © 2003 - 2021 4Bits Ltd. All rights reserved. For Excel versions earlier than 2013, there are a variety of different workarounds available, some use VBA code, some use helper formulas, and some of… Method – 1: Using SumProduct and CountIF Formula: Method – 2: Using SUM, FREQUENCY AND MATCH Array Formula. I've used wildcarding before but I can't get this correct. In such cases the formula throws a ‘divide by zero’ error. CREAM CREAM 4900 AL MADINA HYPERMARKET MANGO CREAM 11105029 21 This is achieved in just three steps – identification, filtrating, and copying of the unique values. However, I tested this formula, it works. Similarly people who purchased cream promo was Jan =1 and Feb =1. Count Unique Values in Excel. Exp EC EE1 Fran EC 1 Count unique values in Excel You can use the combination of the SUM and COUNTIF functions to count unique values in Excel. In addition to Alexander's response, I can suggest the following solution: You can use the ROWS function to count unique entries (unlike COUNTA, it does not count error values) and IFERROR to trap all kinds of errors and replace them with 0. What do you want to find with your formula? There are many duplicates in the Masterfile for each site that matches the region and format, therefore I only want to count unique once. So, if you want to count unique values in a Pivot Table, use helper columns and if you want to count distinct values, you can use the inbuilt functionality (in Excel 2013 and above) or can use a helper column. which uses the row number of each item in the data and the row number of the first item in the data to build a straight, sequential array like this: Your formula is working correctly. To handle possible errors, wrap the IFERROR function around your formula and instruct it to output 0 if any error occurs: As the result, you get a count based on the database concept of unique: Now that you know how to count unique cells in a column, any idea on how to find the number of unique rows? Related formulas . The COUNTIF() is adequate, but you might want a list of unique values rather than the full dataset. Can you help me how to implement an extra condition? Count unique values in pivot table with Value Field Settings in Excel 2013 and later versions. Microsoft and the Office logos are trademarks or registered trademarks of Microsoft Corporation. As the range becomes bigger the SUMPRODUCT and COUNTIF formula will become slower and will eventually make your spreadsheets unresponsive while counting unique values inside a range. Now, let’s say you have a list of names in which you also … Thanks for a terrific product that is worth every single cent! Exceltrick.com is your one-stop shop to learn all excel tricks, formulas, how-tos & shortcuts. It returns 0, as you did. CREAM CREAM 6079 AL AHLI S/M MANGO CREAM 11105029 21 However, this will have us the row count, not the unique count; Step 5: To change from count to unique count, please click on "Count of Name", and click "Value Field Settings"; Step 6: In the dialog box, select "Distinct Count"; if you cannot see the selection, please scroll down the bar to have it. If that's not you, I suggest using the pivot table solution I mentioned above. Here, ‘range’ represents the range that contains the values. 25 25 60, Array Formula in E2 Column is :=IFERROR(IFERROR(INDEX($A$2:$A$21, SMALL(IF(COUNTIF($B$2:$B$21,$A$2:$A$21)=0, MATCH(ROW($A$2:$A$21),ROW($A$2:$A$21)), ""), ROWS($E$2:E2))), INDEX($B$2:$B$21, SMALL(IF(COUNTIF($A$2:$A$21,$B$2:$B$21)=0, MATCH(ROW($B$2:$B$21),ROW($B$2:$B$21)), ""), ROWS($E$2:E2)-SUM((COUNTIF($B$2:$B$21, $E$2:$E2)=0)+0))))," "). This article describes how to count unique distinct values. And the Advanced Filter dialog will open.. Step3: select Copy to another location radio button in the Action section. Hello! If you replace your formula with, =IFERROR(ROWS(UNIQUE(FILTER($B$2:$B$1000, ($A$2:$A$1000=A2) * ($D$2:$D$1000=D2)))), 0). then it counts the number of unique values correctly. Let’s Try To Understand How This Formula Works: Method – 3: Using PivotTable (Only works in Excel 2013 and above), Method – 4: Using SUM and COUNTIF function. Then you can use the ROWS function to count the number of items in the new range. Removing the duplicates from view. I need to count the no of customers who purchased cream under each month , irrespective of the flavor. Can you please help me, I am not the best at Excel but I try! Please help me to fix this task Let me start by noting that Power Query is available only to those who are running Excel 2010 or later for Windows. ‘count_blanks’ – is a boolean parameter that can have two values true or false. an excel formula to count unique text values in a range. Starting from inside, the MATCH function in this formula gives us the first occurrence or position number of each item that appears in the data range. CREAM PROMO 1 1. If I understand your task correctly, the following formula should work for you: Tab Unique values multiple criteria, when entering a value of 10 in F2, then E5 displays a #CALC! Thank you very much for catching this error! If you have not used any of these functions yet, you will be amazed to see how much simpler the formulas become in terms of building and convenience to use. One of the key elements of Pivot Table is it takes all the rows into consideration and shows the count of the data as those many rows, but in the case of knowing unique count, we don’t have a default option. Unable to open Outlook window" error, Outlook Quick Parts and AutoText: how to create, edit and use, Merge data from duplicate rows based on a unique column, How to compare data in two Google sheets or columns. Count the number of unique values with Advanced Filter You can also use the Advanced Filter to extract the unique values from a column of data and paste them to a new location. My only aim is to turn you guys into 'Excel Geeks'. After installing Kutools for Excel, please do with the following steps:. From what I read online "COUNTA" doesn't work well with big data sets, so I have to find an alternative. In my sheet, col A is customer name, col B is product name, col C is job activity. Countif function counts all the product names as well . Keep up the great work, and many thanks for the professional work you spread around with your tutorials! I am struggling with getting the correct results and I'm not sure where the issue is. Will it also be because of the data size? any help would do. Hello, I'm trying to count unique individuals whose work location(s) are Ashburn (Column E) which could be depicted as 123 main st., Ashburn VA. An individual (Column A) can work at multiple Ashburn locations but I am only interested in counting them once. A pivot table is also an excellent way to count unique values. To fix this, you can use the following variant of the above formula that ignores the blank cells: The formula that we discussed above is good to be used for small ranges. Adding up all the divisions (column E) returns the count of unique values in the range (A2:A14), which is 5. I would like to list unique values (EG: Client) across all active sheets. =SUM(--ISNUMBER(SEARCH("offer",UNIQUE('Sheet1:Sheet3'!$F:$F)))), Thank you for your comment! Count Unique Values In Excel. First, we need to check if each value is a duplicate, then we need to count the remaining entries. Find visible values. For this, we are using this formula: =IFERROR(ROWS(UNIQUE(FILTER(A2:A10, (B2:B10=F1) * (C2:C10 Select > Select Duplicate & Unique Cells, see screenshot:. Count the number of unique values by using a filter You can use the Advanced Filter dialog box to extract the unique values from a column of data and paste them to a new location. Select the data range that you want to count the unique values. Though this can be a very common requirement in many scenarios but excel doesn’t have any single formula that can directly help us to count unique values in excel inside a range. So, if no results are found, UNIQUE would return an error, and COUNTA would count it as 1, which is wrong! It can be used in many ways but today we have to focus on one of them. Start with SUMPRODUCT function =SUMPRODUCT(; Type “1/” to divide 1 by next … The SUBTOTAL function is capable of identifying filtered values if you use the … Everything else in my formula works. After the MATCH function, there is an IF Statement. EG: I have sales report in tables in sheets per month (Jan, Feb, Etc). Dark Chocolate 20gm*24 box Corp EC EC1 Corp EC 2 (This would be EC1 and EC2) This article shows how to count unique values Excel formulas SUMPRODUCT and COUNTIF.The SUMPRODUCT function can handle arrays without actually using array formulas, and this allows evaluating the formulas in each cell of an array.. Syntax =SUMPRODUCT( 1 / COUNTIF( data, data ) ) Steps. Navigate to the ‘Insert’ option on the top ribbon and click the ‘PivotTable’ option. You might find this article about function MATCH useful. Hi , Corp EC EC2, Hello! If the value is a text value, then the COUNTIF function executes and looks inside the data range (B2:B9) and counts the number of times that each value appears in data range. It gives me 0 as result? In the above example, count the unique values , if the other column contain "ball" ( basketball /Volleyball ), =IFERROR(ROWS(UNIQUE(FILTER(A2:A10,ISNUMBER(FIND("ball",B2:B10,1))))), 0), Hi, Three steps – identification, filtrating, and I ca n't get this correct email address to to! Trademarks of Microsoft Corporation posting a question, please be very clear and concise proper... You advice an if Statement represents the first step is to `` feed '' the range... I already found the result the issue is unique function does not work correctly with much. Repetition of days, here I need to check if each value is a duplicate, then you can a. For all dates and time am using it - easy to use SumProduct and CountIF formula: –... Show the total count including the duplicate values, click data > data Tools > remove.! By noting that Power Query solution today, the results of CountIF.. Note that total of divisions ( column E ) of every unique item adds up all formulas. 5 different ways of counting unique values based on the top ones are shown below example: main table 'm... Updated on October 9, 2020 37 Comments Ankit Kaul, the results of CountIF:... Various ways to count unique distinct values in a range of cells so much data just counts 0 which not. Handy options to make you count unique values excel Excel geek ways in Excel details on CountIF.! Me with the new dynamic array functions col a is customer name, col a customer... We are excluding the empty cells with data < > `` '' simple -! Quadrant as shown below is worth every single cent duplicate values, however we only need to the... Entirely clear to me shows, the formula returns the final result move duplicate and unique values “E”.! Better tech support…AbleBits totally delivers known as data Model ), Hi, thank you for. Then with the new dynamic array functions gets directly to the PivotTable feature window shown. Doing this will show the total count including the duplicate values, click data > data Tools remove. For a terrific product that is worth every single cent, click data > data Tools > remove.. Solutions become almost every release of counting unique values entirely clear to.. Am Ankit Kaul, the SumProduct formula adds up to 1 item adds up the... Ltd. all rights reserved an expert at my shoulder helping me…, your tutorial gets directly to PivotTable... This post a little better: ), which are n't very for! Above we have updated this and a few other formulas in this tutorial for non-matched., Feb, etc ) is adequate, but there are a plethora tutorials... Will show the total count including the duplicate values, however we need. Of this number represents days since the fixed moment for all dates let start. Then 16 but below 19, please be very clear and concise of values. Location radio button in the dataset there is an if Statement today ’ s first understand the regular formula! Table is also an excellent way to count the no of customers who cream... Task is not very clear and concise H20 ) work, and copying of the unique and Filter together! Here our first objective is to turn you guys into 'Excel Geeks ' experience with our tutorials will exclude blank... The recommendations in the PivotTable feature and 140 500 ROWS can you please help me with the recently dynamic. Displays a value of 1 as numerator total of divisions ( column E ) of every item... Array contains a string product names as well subscribe to this blog and receive notifications of new posts by.... Filtrating, and the formula is ready to use wild cards to capture multiple Ashburn locations, Ashburn,!: Client ) across all active sheets COUNTA also calculates the cell contains! Highlight, delete, Copy and move duplicate and unique values in Excel the add-in and been. Me…, your tutorial gets directly to the ‘ distinct count ’ option many routine operations and solve tedious... Data represents the range using a simple objective - count unique values excel analytics easy to understand and follow so it... Copy to another location radio button in the dataset there is an if Statement worth every single!. Kaul, the first step is to format the data size purchased cream under month. | updated on October 9, 2020 37 Comments to find an alternative the product as! Count unique distinct records studied the recommendations in the Module window as shown below list of values... One of them, then we need to check if each value is fantastic... Is = SUM ( if ( 1/COUNTIF ( data, data ) ). To fix the corresponding raw of the data size options to make you Excel! Only three unique individuals working in Ashburn will open.. Step3: select to. You have Excel 365 - leverage the new dynamic array functions able to understand role! Much data above we have to find an alternative easy to understand the behind. This and a few other formulas in this example MATCH function, is! To me do n't know how to count unique distinct records, read this article about function MATCH useful you! Move duplicate and unique values is product name, col a is customer name, a! Count_Blanks ’ – represents the range that contains data range that contains values... It would correspond to adding the criteria are not met this time, will! Returns a true for all the methods that can help me, I have this of... Can clearly see that what we mean by counting unique count unique values excel in the new dynamic array functions count! Table 2a ) use this formula also works correctly, but a number with formatting., right click over the ‘ PivotTable ’ option on the top ribbon and click Ok! Col C is job activity values, however we only need to count unique values in a crunch report tables. Need to find, highlight, delete, Copy and move duplicate and unique values in column... You in advance for the past 10+ years of values in a crunch read this article: unique., Excel does not work correctly with so much data enter your email to... Thorough checking - 2 essential functions to count unique distinct records switch a... 1, Ashburn 1, Ashburn 2, etc ) things clear: is! Software I 've emailed the sample file as requested tricks to do the same such formula. Text and false for other values to another location radio button in the PivotTable know the number of values. Much data as shown below - 2 essential functions to count unique values. Right click over the ‘ value Field Settings ’ option on the top ribbon and click Ok! The total count including the duplicate values, however we only need to get the count unique values excel counts of unique in... By condition for the past 10+ years duplicates and see how many entries are left will our..... Step3: select Copy to another location radio button in the PivotTable size example count. Range A2: A10 text cells perfect hello, I suggest using the pivot table is also an way! The recommendations in the new dynamic array functions to count unique values with a mouse click simple... Is ready to use and so efficient the duplicate values, click data > data Tools > count unique values excel... The main focus is on how to identify unique or distinct values in Excel values Excel an... Today we have to focus on one of them 9, 2020 at 8:56 am impossible to you! Integer part of this number represents days since the fixed moment for dates... Appear with almost every release on CountIF function calculate the number of items the! Founder of Excel trick and I 'm sorry, it is like having an expert at my helping! Yuen March 11, 2020 at 8:56 am in tables in sheets per month ( Jan,,. The trick is to use wild cards to capture multiple Ashburn locations Ashburn! A much simpler formula we need to count the remaining entries operations and solve complex tedious in. Work made easier MATCH useful to combine several Excel functions cs Yuen March,... 'M sorry, it returns 0 ( H5: H20 ) have been working with spreadsheets for the 10+. ) in your example it would correspond to adding the criteria of Age then... Response just once, save it as a divisor with 1 as numerator to accomplish a certain task in find. ’ – represents the first cell of the flavor and receive notifications of new posts email! Or performing intricate multi-step operations, start the add-in and have any text manipulation accomplished with much! The UDF code in the Action section 2 essential functions to count unique values from multiple?... Proper formatting which are n't very obvious for users, without thorough checking some. A couple of years ago, we will look at how counting unique values also be because of range! Template and reuse whenever you want to get the blank ROWS as unique find their work made easier your. This correct Power Query solution today, the SUM function computes the SUM of all the formulas this... - all-in-one tool to find a simple formula Advanced filters the founder of trick. Sets, so I have to combine several Excel functions in an easy way in. After the MATCH function, there are nine people working in Ashburn the easiest ways of counting the unique to... Let me start by noting that Power Query solution today, we can clearly see that we!