# List Unique Values In Excel And Count Occurrences Of Each?

May 25, 2014

I realise this is beyond me and wonder if it is possible to list uniqure values in excel and place a count occurrences of each. I have a hugh list of over 400 alpha code i.e ABCD, ABCD, ABCE, BDCE, BDCF ZXYE etc etc. What I'd like to do is pick out all the unique values so I can see what alpha codes are on the list. But then I would also like to count the occurrences of each value/name so I know how many times they appeared on the list.

Col A
ABCD
ABCD
ABCE
BDCE
BDCF
ZXYE
ZXYE
YEZY
CDEF

Col B is where i would like to list all the unquie vaules with a count e.g.
ABCD 2
ABCE 1
BDCE 1
BDCF 1
ZXYE 2
YEZY 1
CDEF 1

## Count Occurrences Based On Unique Values In Another Column

Mar 18, 2013

I've got two columns, one with policy numbers, the other with error codes.

A policy could be in the list more than once, so I'm counting the number of unique policy numbers with the function

=SUM(IF(FREQUENCY(A10:F10000,A10:A10000)>0,1))

I want to count the number of errors that are NOT code 00 or code 21. Because the error codes are saved as text, I'm counting the number of errors with

=SUMPRODUCT((B10:B10000"21")*(B10:B10000"00")*(B10:B10000""))

The problem is that since a policy number could be listed twice, when I count the errors, I might be counting the same policy as an error twice. This means that I could feasibly end up with more errors than I have unique policies, which doesn't work.

What I'd like to do is only count the number of errors that have unique policy numbers. That is, I only want to count an error the first time it is in the list, based off it's policy number. Is that possible?

Here's my sample data: [URL]

## How To Count The Number Of Unique Values In A List, Based On Another Value

Jul 27, 2009

I need to count the unique values in a list based on another value. i.e.

AB ___ Jones
AB ___ Smith
BC ___ Henry
AB ___ Jones
BC ___ Brown
BC ___ Henry
AB ___ Tomkins

For all the AB's in column 1, I need a formula that will give me all the unique names from column 2, in this case 3. I've tried adapting:

=IF(LEN(June!D5:D100),SUMPRODUCT(1/COUNTIF(June!D5:D100,June!D5:D100)))

but haven't been able to get it to work.

## Count Unique Occurrences Based On Multiple Conditions In Another Cells

Sep 19, 2013

I am trying to count the number of unique entries in a sheet, that also satisfy 2 other conditions.

I've attached an example sheet : Example email report.xlsx

The result I need is: The number of unique values in column E, that also have NULL in column G and NULL in column I.

So, in the example, the result would be 7.

I know I can do this by conditional formatting and filtering, but would prefer a formula, and perhaps also a macro that I could apply as the number of rows in each sheet is up to 20000, and each month's sheet will be a different size.

## Write Formula That Will Count Number Of Unique Occurrences In Column?

Nov 2, 2011

I'm trying to write a formula that will count the number of unique occurrences in a column, if a specified value is found in a different column.

So I want to count the number of unique values in the "ID" column if let's say the text "NameA" appears in the "Name" column.

ID Name 12345

NameA
NameB
NameA 12346

## Excel 2007 :: Count Of Unique Values

Nov 18, 2011

I would like to get the count of unique values in my 2nd column using my values in 1st column as the criteria. Below is my example of my data set.

EFGH5DeptHC

6A304794A17B86122B38B86179C39B90050D1310C82705

11C94955

12C308165

[Code] .........

Excel 2007

I would like to see the count on column H (highlighted in yellow).

## Excel 2010 :: Produce Unique List Of Key Values With Second Values Concatenated Together

Sep 15, 2013

I have some data with recurring key values and differing values in the second column, I need to produce a unique list of key values with the second values concatenated together.(See below)

The data can be 10 rows to 5000 and I can have anything from 5 to 150 sheets (Separate data sets), a macro would go a long way to keeping me sane.

Sample data Required Output
A | B Z
1| 10 | a 10,a,b,c
2| 10 | b 11,a
3| 10 | c 12,a,b
4| 11 | a
5| 12 | a
6| 12 | b

My system is Windows 8 Excel 2010.

## Excel 2010 :: Count Unique Values In Pivot Table

Jun 20, 2014

I have data set up like the example but then for 1797 lines.

D39BKYes
D39BKYes
D39BKYes
D39BKYes
GHFLBNo
R80FANo
R80FANo

[code].....

What I need to get in a pivot table is: two columns or rows (Yes / No) and the unique count of the code.In this case is should show Yes: 2 and No: 3

## Excel 2010 :: Count Unique Values On Pivot Table

Jun 21, 2013

How do count unique values in category in pivot table. (my table, im taking data from ms query). I am using excel 2010

Pivot table example: the result i want is the "no of types" as my data only show "category" and "types".

Category
Types
No of Types

Fruits
Apple
Pear
Orange
3

Vegetable
Cabbage
1

## Function / Formula In Excel To Count Unique Values Matching Criteria

Jun 4, 2013

I have a worksheet. I would like to count unique number of "Trans" in column A only if value of cells in column B "Type" equals "Return". In example below, I would want to see the value "3" as total.

Trans Type
1 Return
2 Return
2 Return
3 Exch
4 Exch
5 Return
5 Return

## VBA To Count Occurrences On A List And Assign Number

Jun 6, 2013

I have found ways to count cells but what I am trying to do is in column F I have a list of meeting topics, and sometimes these repeat in a year. in my drop down menu I have all of them listed however my supervisor wants me to add a count after the meeting number in the 1_1X format where x is the number of times a topic has been used.

The output will be added to my macro here

Code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

Dim y As String
Dim z As String
Dim b as Integer

If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("MEETINGNUMBER")) Is Nothing Then Exit Sub

[Code] .......

## Count Number Of Occurrences In Excel

Apr 22, 2014

In a datafile I have one column containing a trip 'origin' and a second column contains 'destinations'. I want to count how many times each trip occurs (so the same origin/destination pair). This is doable using COUNTIFS but unfortunately respondents did not provide consequent origins and destinations. I encountered the following formulations

-Alfastraat, Amsterdam
-Alfastraat 5, Amsterdam
-Alfastraat 5, 1021AB Amsterdam
-Amsterdam, Alfastraat

Since the format is different among and within respondents functions containing LEFT, RIGHT, MID are not useful (at least, my trials did fail). I found a VBA-script for a FUZZYVLOOKUP which sounded promising. Unfortunately the data is stored on a remote PC without VBA on it.

Is there a way to count the occurrences of trips given the circumstances?

## Count Unique Occurrences In Column A If Column B Equals Value?

Jul 25, 2014

how to count the unique occurrences in column A based on the value in column B. In the example below, I am trying to count the number of unique names in each state (Illinois=1, Colorado=2, New York=2). I would like the formula to count unique occurrences for the entire column A because I will be adding to the list.

..A.............B............C
John......Illinois
John.....Illinois
Alex.....New York
Steve...New York
Steve...New York

## Excel 2010 :: Count Days Between Last Two Occurrences Of Value In Row?

Nov 9, 2012

I have a spreadsheet with 6 months of data in one row. the dates are from A3 (Jan 1) to FY3 (Jun 30). The data is in range A4:FY4. The data is a "\$" (without quotes). The \$'s are entered randomly during the 6 month period. I need a formula to determine the days between the last occurrence and the next to last occurrence of the \$. Example spreadsheet shows the \$'s on Mar 28 and May 5 as the last two. The spreadsheet is attached. I am using Microsoft Office Excel 2010.

## Excel 2010 :: Count Number Of Occurrences Per Month Per Day?

Mar 31, 2014

I have data arranged in a worksheet (see attachment) that has hours of work broken down by day. What I need is a formula that will find the number of times a record occurred in Column F that is greater than or equal to 12 hours each day. So for March 1st there would be 9 times. I can do that now with no problem using "=COUNTIF(F4:F14,">=12")" However, the real thing that I need is how many days of each month were there only 1 count (of 12 hours or more). So it needs to look at the range of data that goes from 3/1/13 to 3/31/13 and find the total number of days that had 1 count (of 12 hours or more) each day and return the number of days it found.

## Count All Unique Values (text) + Definition Of UNIQUE :D

Aug 24, 2009

If I have multiple entries with different but repeatable text values in one column - how do I count all unique ones ? Is there a function or does it have to be a pivot table of sth ?

## Count Values In One List And Then Narrow / Combine Values Based On Criteria And Count Those

Jan 20, 2014

I need a way to find a value in a column which has one or more corresponding values in an adjacent column. Then take all of the corresponding values found and count all occurrences of the found values in another column. But I only want to count the entries if an adjacent column is not blank.

Not the easiest thing to describe. Starting to wonder if I need to think in reverse. I hope the attached example makes more sense.

Book1.xlsx

## Macro To Give Count Of Unique Values After Comparing Comma Separated Values?

Mar 2, 2014

I need a Macro (not formula) which compares the comma separated values present in Column "I" with individual values present in Column "D" and generate the count of unique values in Column "J".

The sample sheet has been attached for reference.

## Count Unique Values In Column Based On Values In Other Columns

Mar 14, 2014

I'm running into an issue trying to calculate unique values in a Data column based on a few variables in other columns.

My current formula in Summary tab D4:D19 is
{=SUM(IF(FREQUENCY(IF(Data!\$I\$3:\$I\$66<\$E\$1,IF(Data!\$A\$3:\$A\$66=\$H\$1,
IF(Data!\$C\$3:\$C\$66=A4,ROW(Data!\$I\$3:\$I\$66)))),ROW(Data!\$I\$3:\$I\$66)),1))
+
SUM(IF(FREQUENCY(IF(Data!\$I\$3:\$I\$66<\$E\$1,IF(Data!\$A\$3:\$A\$66=\$I\$1,
IF(Data!\$C\$3:\$C\$66=A4,ROW(Data!\$I\$3:\$I\$66)))),ROW(Data!\$I\$3:\$I\$66)),1))}

This is currently counting the number of times a date value (data column I) appears for that name (A4:A19) in the data when meeting all of the conditions. I need it to instead count the number of times a unique date appears for that name with the additional conditions met (which all appear to work fine).

The results in the pink highlighted cells (Summary column D) should be:

Names starting with A - 3
All others - 2

I've left some other columns in the data with X's so that I can easily convert this back to my working spreadsheet.

## Count Of Unique List

Jan 22, 2009

to calculate the count of unique text values from a list based on condition.

I have 2 columns A & B. In column A, I have Yes or NO text and in column B, I have Client names.

I want to count a list of unique values from column B if it is Yes in column A.

I have to write a formula to do this task and will appreciate any expert help in solving this.

## Unique List Based On Count?

Jan 29, 2012

I am trying to get an unique list based on the value being the only member of the group.

Sheet1

A B 1 Group A A 2 Group A C 3 Group B B 4 Group C C 5 Group C B 6 Group D B 7 Group E C 8 Group E B

The solution is

Sheet1

D E 2 Solution 3 Group B B 4 Group D B

Is there a way to do this?

## How To Count Unique Words In A List

Sep 30, 2008

Usually it's to count for one unique word in a cell. But what if I have 2 or more unique word in a cell and need to be counted for?

for example
10827Holiday Decorations & Party Supplyholiday decoration supply10827Holiday Decorations & Party Supplyseasonal decorative
this category has 5 unique words in the synonym list

11044Facial massagerfacial11044Facial massagerbeauty care product11044Facial massagerbeauty appliance11044Facial massagerbeauty11044Facial massagerbeauty care11044Facial massagerbeauty product11044Facial massagerfacial appliance
this category has only 5 unique words although the synonym list is much longer.

## Count Of List & Make Unique

Feb 8, 2008

I have created a VBA Script with the goal of taking an initial Excel Spreadsheet and essentially creating a summary of it. The original Spreadsheet has data in it such as:

110 Compact Car
110 Compact Car
111 Full Sized Car
111 Full Sized Car
111 Full Sized Car
113 Truck

The numerical part of the above data is in column A, and the description is in column B of the original spreadsheet. I have been successful in creating a new Spreadsheet, naming the columns with each unique entry from the first set of data, but I cannot seem to correctly formulate a looping statement which correctly counts the above. The solution that I would like to get to on the new sheet is the following:

110 Compact Car 2
111 Full Sized Car 3
113 Truck 1

The number after the descriptions would be generated by the VBA Script and placed into column C in the new Spreadsheet behind the correct description.

## Obtaining List Of Unique Values From List Based On Some Criteria?

May 28, 2014

The function below should return the value in a cell IF the string in the cell two cells to the left of it is "Nemo" Omitting the part highlighted in blue, my function returns a list of unique values...but when it's included, nothing is returned at all. Perhaps, there is an error in the syntax that I'm overlooking?

Function listUnique(rng As Range) As Variant
Dim row As Range
Dim elements() As String

[Code]....

## How To Count Only Unique Values

Jul 24, 2014

I'm working with a data set (attached) that tracks financials at both the job and item level (in my customer's data - a unique job can be made up of a single or multiple items).

I've successfully built a formula (in column C of the attached) that counts the total number of items and their associated \$ values that were invoiced in a given month based on my customer's requested item-type categorizations (i.e. "Exact Match", "Similar", "Inferred", "Cost-Plus").

The problem I'm running into is building a formula that counts the first unique instance of the Job ID associated with those items. For example - in cell C33 on the attached - The total number of items invoiced in June that were "Exact Match" was 10. These items were spread across 9 unique jobs - and that's where I'm struggling - to build a formula that only counts the first unique instance of the corresponding Job ID in Column C.

The formula I'm having trouble with is located in Cell D12 on the "Dashboard" tab of the attached.

The formula as I have it is returning a result of 8 - because it's summing the "1"'s in Column I on my "Invoice Data" tab - however it should read 9 (Filter Column Q on the "Invoice Data" tab to "June", Filter Column AQ on the "Invoice Data" tab to "Exact Match", and then sum the unique job IDs in Column C).

Excel_Forum_Example_Dataset_7.24.14.xlsx‎

## Count Unique Values ....

Dec 28, 2009

So here is my dilemma and I haven't been able to find anything to exacly help me out:

I have a large (100k+ records) sheet of sales invoice details.

I need to add a total item line per invoice number to each record ....

## Count Unique Values

Jan 13, 2010

Card Number
XXXX5512
XXXX5512
XXXX4211
XXXX4510
XXXX6134
XXXX9035
XXXX6002
XXXX8653
XXXX7826
XXXX8819
XXXX8315
XXXX0274

I'm looking for a formula to generate the number of unique card numbers are in the column...I'm using this daily, simply pasting the new data in so if I want to keep it as automated as possible.

## How To Count Only Unique Values

Jun 6, 2014

I want to count data that corresponds to 4 criteria for data located in Columns B, C, D and E. However, I only want to count only the unique values in Column A. How do I improve on this formula?

=SUMPRODUCT((\$E\$2:\$E\$5=J\$2)*(\$D\$2:\$D\$5=I\$2)*(\$C\$2:\$C\$5=H\$2)*(\$B\$2:\$B\$5=G\$2))

See data below

## Count All Unique Values

Apr 15, 2009

Is there a formula that can be used to count all unique values in a specified column.
Example:
Col. A
123
123
Test
ABC
ABC
ABC

Result: 3 (since there are 3 unique values in col. a)

## Count Unique Values, For Specific Values

Sep 13, 2006

I have an array that I'm using - and it works perfectly: =SUM(If((FREQUENCY(If(LEN(B10:B100)>0,MATCH(B10:B100,B10:B100,0),""),If(LEN(B10:B100)>0,MATCH(B10:B100,B10:B100,0),""))>0),1))

Now, what I would like to do, is see how many of these unique numbers relate to another number in column D
See attachment.