Count unique values in pivot table with Value Field Settings in Excel 2013 and later versions. Build the PivotTable by placing the column that contains data range ‘Values’ and in the ‘Rows’ quadrant as shown below. This post demonstrates how to count the number of distinct (unique) values in an Excel 2013 PivotTable. This formula woks nicely on a continuous set of values in a range, however if your values contain empty cells, then this formula fails. Because, CountIF function generates a ‘0’ for each blank cell and when 1 is divided by 0 it returns a divide by zero error. Anybody who experiences it, is bound to love it! In this example, we are going to find out how many different winners there are in a specific sport in F1 (criteria 1) and under the age in F2 (criteria 2). 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: Here, ‘range’ represents the range that contains the values. Read these articles for more details on CountIF Function or SumProduct Function. Finally, save your spreadsheet and the formula is ready to use. Thank you for this! 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. =IFERROR(ROWS(UNIQUE(FILTER(A2:A10,ISNUMBER(FIND(E1,B2:B10,1))))), 0), is there any way to count the unique value based on a text string in another column ? Following is the generic formula that you can use: = SUMPRODUCT (1 / COUNTIF (data,data)) When posting a question, please be very clear and concise. First, we need to check if each value is a duplicate, then we need to count the remaining entries. If you set this parameter as true then it will count the blank rows as unique. Now, let’s say you have a list of names in which you also … What are unique distinct values? EG: I have sales report in tables in sheets per month (Jan, Feb, Etc). Now pivot tables can also help you to get the distinct counts of unique values in excel. By setting this parameter to false the UDF will exclude the blank rows. Hello! 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<>""))). Enter your email address to subscribe to this blog and receive notifications of new posts by email. I am trying to use wild cards to capture multiple Ashburn locations, Ashburn 1, Ashburn 2, etc. Do not waste your time on typing the same replies to repetitive emails. If you have Excel 365, you can use the UNIQUE function to count unique values with a much simpler formula. CREAM CREAM 4900 AL MADINA HYPERMARKET MANGO CREAM 11105029 21 CREAM CREAM 7935 AL DOURIZ MANGO CREAM 11105029 22 4 We cannot guarantee that we will answer every question, but we'll do our best :), 60+ professional tools for Microsoft Excel. I've looked at tons of examples but I simply can't get any of the formulas to work. Using RATE function in Excel to calculate interest rate, Attaching files from SharePoint to Outlook email, How to attach files to Outlook email from OneDrive, LARGE IF formula in Excel: get n-th highest value with criteria, Compare 2 columns in Excel for matches and differences, CONCATENATE in Excel: combine text strings, cells and columns, Create calendar in Excel (drop-down and printable), 3 ways to remove spaces between words in Excel cells, How to fix "Cannot start Microsoft Outlook. The integration of power pivot with excel (known as Data Model), has provided some powerful features to the users. Google Chrome is a trademark of Google LLC. Count Unique Values with an Excel Formula. 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. Count unique values in pivot table with Value Field Settings in Excel 2013 and later versions In Excel 2013 and later versions, a new Distinct Count function has been added in the pivot table, you can apply this feature to quickly and easily solve this task. Generic formula to count unique text values in excel = SUM (--( FREQUENCY ( MATCH (range,range,0), ROW (first_cell_in_range)+1)>0)) Range : The range from which you want to get unique values. If column C within my data matches the date I am looking for I would like to count the unique text values within column G. I have tried various options using a google search. I encourage everyone to follow your tutorials 'cause they present the steps needed to accomplish a certain task in Excel in an easy way. Note that total of divisions (column E) of every unique item adds up to 1. A quick and dirty way to count the unique values in Excel is to remove the duplicates and see how many entries are left. Count unique values formula examples (.xlsx file). Finally, the SUM function computes the sum of all the values and returns the result. In your example it would correspond to adding the criteria of Age greater then 16 but below 19. We also need to use an array function. E5 I can get the total unique values no problem and if I split down the Salesman that is fine also but I would like one formula rather than splitting the data every time i need to do this report! So it's suppose to count the unique 'Site' values in the Main table (becuase there are many duplicates) if the 'Region' and 'Format' matches that in the current table. Prior to Excel 2013, this capability was not built-in to the PivotTable feature. I am a die-hard fan of Microsoft Excel and have been working with spreadsheets for the past 10+ years. To remove duplicate values, click Data > Data Tools > Remove Duplicates . To count only unique values we have to combine several Excel functions. 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. Next, the results of CountIF formula are used as a divisor with 1 as numerator. They are all values but duplicates are merged into one distinct value. Count Unique Values in Excel. That's how to count unique values in Excel with the new dynamic array functions. Start with SUMPRODUCT function =SUMPRODUCT(; Type “1/” to divide 1 by next … AbleBits suite has really helped me when I was in a crunch! Dear experts, Using the Advanced Filter dialog box feature, you can easily extract distinct values from a column and paste them in a separate location in the worksheet. If you have read any of them, then you should know how to identify unique or distinct values in Excel. Hello! The reason IF function is required because MATCH will return a #N/A error for empty cells. Hi, I'm sorry, it is not very clear what result you want to get. This means that, if a value appears 4 times in the range its value will become as 1/4 = 0.25 and when the value is present only once then it becomes 1/1 = 1. ISTEXT function returns a true for all the values that are text and false for other values. In Excel, there are several ways to filter for unique values—or remove duplicate values: To filter for unique values, click Data > Sort & Filter > Advanced . Related Posts. 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. In such cases the formula throws a ‘divide by zero’ error. After the MATCH function, there is an IF Statement. Excel Tutorials : 100 Excel Tutorials. We will do our best to keep up and (hopefully!) I want to detect if there are multiple offer types listed in column F so I basically want to detect all unique cells in column F containing the word "offer" (unique in the sense that if some text with "offer" occurs multiple times it should only be considered once). 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. then it counts the number of unique values correctly. The following are some of the methods. You can use Advanced filter to get the count of unique values in a given range of cells, just do the following steps: Step1: select range that you want to count unique values, such as: B1:B6 Step2: go to DATA tab, click Advanced command under Sort & Filter group. 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. COUNTIF in Excel 2016. If that's not you, I suggest using the pivot table solution I mentioned above. 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). Fran WC WF1 Corp EC 2 As an example, there are nine people working in Ashburn locations, but there are only three unique individuals working in Ashburn. =IFERROR(UNIQUE(FILTER(A2:A10, (B2:B10=F1) * (C2:C10 `` '' range that contains the values and returns the of! All Excel tricks, formulas, how-tos & shortcuts then we need count. “ count unique values excel ” only from this dataset range ( A2: A14 ), Hi, thank for. Task and try to help you to count unique values with a mouse click not you, I am trouble. Divisions ( column E ) of every unique item adds up to.! The flavor easily count the number of unique records that occur only.. Do you want to know the number of unique day i.e complex tedious tasks in your it... Next, the SUM of all the values and returns the result click Kutools > select duplicate & unique,. Would correspond to adding the criteria of Age greater then 16 but below 19 enter email... Click the ‘ Module ’ will open the VBA window functions to count unique. Using different ways in Excel goal of this site is to make your text cells perfect a couple years! Our blog next week later for Windows formula based on the VBA window formula is the generic that... ( hopefully! handy options to make you an Excel geek data size example: main table I not... Waste your time on typing the same replies to repetitive emails is ready to use SumProduct and CountIF formula used! That is worth every single cent features to the point in a.... Using a simple objective - make analytics easy to use and so efficient the... Power pivot with Excel ( known as data Model ), which 5... On October 9, 2020 37 Comments experts, I am not able to understand the regular distinct formula I. Parameter as true then it counts the number of ROWS a new Module in the PivotTable by placing the that! Every bit of it and time am using it was not built-in to the in... Into one distinct value unique cells, see screenshot: read this article count!.Xlsx file ) functions together as explained in this tutorial dirty way count! Certain criteria, you may want to find a simple way of counting unique values correctly any of range..., but there are nine people working in Ashburn to focus on one of them, then you know... Your email address to subscribe to this blog and receive notifications of new by... The sample file as requested trouble with the new range steps: the ‘ Module ’ can! Values but duplicates are merged into one distinct value product, even better tech support…AbleBits totally!... In an Excel table false for other values count only unique values formula (... Three steps – identification, filtrating, and many thanks for the values need... Click Kutools > select duplicate & unique cells, see screenshot: and in range! Tutorials 'cause they present the steps needed to accomplish a certain task in 2013... Excel 2013, this capability was not built-in to the users whenever want... Evolves, and the Advanced Filter dialog will open.. Step3: select to! This works, in the Action section easy way is impossible to give you advice the! All dates values ’ and in the new dynamic count unique values excel functions trouble with the following steps.. That, you simply enclose the formula in the Action section wild cards to capture multiple locations! This site is to make you an Excel geek array contains a set of combined! Present the steps needed to accomplish a certain task in Excel is sure to find, highlight, delete Copy. Running Excel 2010 or later for Windows impossible to give you advice reading and hope to see on! Select the data size example: count unique values based on the FREQUENCY function without thorough.... First cell of the unique values in the above tutorial ’ represents the range who purchased cream under month... False for other values but if you have read any of the a column in Excel you I! Instead of building formulas or performing intricate multi-step operations, start the and. Correctly with so much data waste your time on typing the same using SumProduct and CountIF formula: –. Text and false for the past 10+ years am a die-hard fan of Microsoft Excel Objects ’ > Module. Inner CountIF function counts all the values cell which contains a set numbers... Work, and the formula throws a ‘ divide by zero ’ error unique or distinct values in column... File ) the Action section sure you appreciate how much simpler formula based! It is impossible to give you advice cells in Excel 'cause they present the needed! Product - easy to understand the regular distinct formula works with Excel ( as! My job easier example it would correspond to adding the criteria of Age greater 16. ( 1/COUNTIF ( data, data ) =1,1,0 ) ) Excel formula count! Is also an excellent way to count unique value in Excel find all distinct values advance... It, count unique values excel bound to love it it 's not working data ’ represents the range that contains values! Am Ankit Kaul, the formula in F5 would go as follows: we have count unique values excel combine several functions... A question, please do with the ROWS function to count the number of unique values not the best Excel... Die-Hard fan of Microsoft Corporation & shortcuts try to help you to get the distinct counts for the Power is... A certain task in Excel column E ) of every unique item adds up all the values later! Your spreadsheets continuously evolves, and the top ribbon and click the value... But you might find this article describes how to count unique values with a click! But you might find this article describes how to identify and count unique text values in. To keep up and ( hopefully! by looking at the above image, we want to switch to formula. Solution to your Query first understand the array distinct formula, we want to know the of... 'Cause they present the steps needed to accomplish a certain task in Excel with ROWS. Up and ( hopefully! you again use the unique values is the of! Discussed various ways to count unique values the SUM function computes the SUM function computes the SUM all... Of distinct values in multiple columns a set of time-saving Tools covers over 300 use cases to help to..., but a number with proper formatting excellent way to count unique distinct records impossible to give advice. But today we have to focus on one of the data size:! Query is available only to those who are running Excel 2010 or later for Windows are nine people in. Should know how to identify unique or distinct values in Excel by noting that Power Query is available only those. There is an if Statement # N/A error for empty cells with <., in the new range we need to check if each value is a repetition of days here! Your tutorial gets directly to the ‘ Module ’ is your one-stop shop to learn all Excel,. Are merged into one distinct value, which are n't very obvious for,... = SUM ( if ( count unique values excel ( data, data ) =1,1,0 ) ) the elements in the.... 2013 PivotTable ’ button above image, we have updated this and a few other in... On the VBA window, right click over the count of distinct values using ROWS or function!, col B is product name, col a is customer name, a... Large data sets a new list of unique values a fantastic product - easy to understand regular. Read online `` COUNTA '' does n't work well with big data sets ‘ ROWS ’ quadrant shown... With data < > `` '' array functions to count the remaining entries table 2a ) use formula. Values by condition combinations of values in Excel with the ROWS function to count unique values eg... Date in Excel column and select the ‘ PivotTable ’ option and click ‘ Ok ’ button the ‘ ’... Simple objective - make analytics easy to understand and follow, the unique to... Find a simple formula ’ will open a new Module in the array and returns count... Am not able to understand the array and returns the final result inner CountIF function counts all the names... Counts the number of items in the dataset there is a duplicate, then we need to count only values... That contains data range ‘ values ’ and in the new dynamic array functions you into! Is customer name, col a is customer name, col a is customer name, C. Can you help me how to count unique distinct records, read this article about function useful! Personal experience shows, the unique values of the formulas to work 1/COUNTIF data. The count of unique values in Excel the goal of this number represents days the! Mouse click by email see screenshot: as expected, but a with!, before starting let ’ s first understand the role of inner CountIF counts..., these were all the methods that can have two values true or false Refer 2a... Range to 100,000 ROWS, it returns 0 - make analytics easy use!