Calculating The Number Of Unique Entries In A Column
Jul 17, 2009how to calculate the number of unique entries in a column? I have a column of email addresses and i would like to know how many of them are unique.
View 9 Replieshow to calculate the number of unique entries in a column? I have a column of email addresses and i would like to know how many of them are unique.
View 9 RepliesI have a list of data and I want to identify the unique entries for both columns but the second column has to unique to the unique values in the first column.
Example List
Fruit
Color
Apple
[Code]....
I have a spreadsheet which is to record quality checks on work carried out by staff. The spreadsheet has a customer reference number in column B and a Staff reference number in column C.
I can carry out a number of checks on a member of staff on one transaction, so for instance, I could carry 3 checks on one customer number, which would result in the staff ref number being enetered 3 times (there is 1 check per row).
I need a formula to count the number of checks I carry out on each member of staff. My problem is that although 3 checks could be completed on someone, if it is on the same customer NO, it only counts as 1 check. In effect, I need a formula to count the number of staff ref numbers which have a unique customer number eneterd in the adjacent column.
All the cust numbers are unique so would I be able to use a wildcard?
I have 620 columns of data with each column consisting of 17 rows. I need to be able to count the number of unique entries in each column. I recorded a macro that would do what I wanted, but it just used absolute references for each column, which would make the process rather tedious. Is there a way to make the macro less restrictive?
Sub Macro1()
Columns("B:B").Select
ActiveSheet.Range("$B$1:$B$17").RemoveDuplicates Columns:=1, Header:=xlNo
End Sub
From column A,(lets say cell 10 onwards) I need to copy all the unique entries into column B (cell 10 onwards). However, I dont know what length column A will be. What would be the best way in VBA/Excel to do so ?
View 4 Replies View RelatedThis may be a basic question but I haven't been able to find the solution:
I'm using Excel 2003. I have a list with repetitive entries in one column and unique entries in the other columns. Example
0001 a
0001 b
0002 c
0002 d
0003 e
0003 f
I need to filter the list so that only unique entries in the first column show up, but I need the rest of the information to carry with it. Example:
0001 a
0002 c
0003 f
I can't use the Avanced Filter > Unique Entries Only function because the information in the adjoining columns is not unique.
I need to count all unique entries in column A (list of names) (this bit I can do!)...however:
Column B gives each name a value of A or B, I need to count all unique names with an A and all unique entries with a B.
eg
Matt A
Matt A
Matt A
Bob A
Tom B
Tom B
This would give a count of 2 for A's and 1 for B's.
I tried to ask this question yesterday -- but it was a follow-up question stuck at the bottom of a thread. So, with your indulgence, here is a simpler version of the question, complete with an attached spreadsheet, if you wish to use it. I also closed the other thread by marking it "Solved", since it answered my initial question.]
The situation:
I have two columns of data. The data is not in alphabetical order, and every column includes duplicate values.
namegender
jones m
martinf
smithf
collinsf
wilsonm
jones m
martinf
hughesm
wilsonm
martinm
smithf
west f
jones m
west f
martinm
The challenge:
In one cell, count the number of unique names that appear in the name column 3 or more times... with the additional condition that each unique name (which appears at least 3 times) must include at least one one woman!
The correct result: ...
How do you remove entries from a column such that only unique entires are left?
Say the spreadsheet contains only a single column:
david
kris
tony
hayley
kristy
john
david
test
hello
david
I tried an "advanced filter" with "unique records only" checked. It gets rid of one david, but not 2 (there are originally 3 of them, and we want to leave 1)
This is the result.
david
kris
tony
hayley
kristy
john
david
test
hello
I have a data table that repeats as follows:
CITI
SCB
SCB
SCB
SCB
SCB
SCB
SCB
RBC
RBC
RBC
RBC
From the data above I need to make a new unqie list that would grab all unique entries.
CITI
SCB
RBC
I am trying to use the following guide:
http://blogs.techrepublic.com.com/howdoi/?p=111
Get stuck on "Listing A:
Need to find a way to flag the unique number in column with 641892
2057988-0380121611AAAAA########70002057988-0380121611641892########59262057988-0380121611642176########53442057988-0380121611646570########63032057988-0380121611645812########56232057988-0380121611643573########55912057988-0380121611640502########62482057988-0380121611645723########58592057988-0380121611645818########61662057988-0380121611641295########55712057988-0380121611643574########61452057988-0380121611640079########63042057988-0380121611640450########61252057988-0380121611645494########57392057988-0380121611644573########51832057988-0380121611643595########51842057988-0380121611645404########56442057988-0380121611646669########57812057988-0380121611646890########63052057988-0380121611646013########63022057988-0380121611646755########51822057988-0380121611642278########52732057988-0380121611641892########79262057988-0380121611640787########51802057988-0380121611640774########5426
i'm currently trying to count the number of unique numbers in a Column using this formula:
=SUMPRODUCT((A3:A3002<>"")/COUNTIF(A3:A4002;A3:A3002&""))
So far so good.....But I want to add some conditions like only count the numbers that meet the condition say N1:N3000="SE*"
=SUMPRODUCT((A1:A3000<>"");(AND(OR(N1:N3000="SE*";N1:N3000="INC*")/COUNTIF(A1:A3000;A1:A3000&""))))
On this one I get #VALUE! and i can't figure out why.
I have also tried to put the AND/OR condition before the actual starting of the array of the SUMPRODUCT but nothing.
I am trying to count the number of unique items in a single column (~5,000 rows of data). For example, I may have the following data
a1 = apples
a2 = pears
a3 = oranges
a4 = apples
a5 = apples
a6 = apples
a7 = pears
in this case number of uniques items is 3
Right now I am using a Pivot Table to figure out the number of unique items but I am sure there is an easier way to do this.
I have a column where I have record numbers. The record number can end up duplicate in some cells.
PROBLEM_ID
IBM-02204732
IBM-03252238
IBM-03252238
IBM-03335648
IBM-03534918
IBM-03534918
IBM-03862015
IBM-03862015
IBM-12737629
IBM-12737629
IBM-17269762
I would like the get a formula that can count the number of unique numbers in that column?
I would like to get if possible to get a formula that summarize the number into a single cell.
What I need to do is sort certain entries in longer list (column A, it is in .csv format and needs to be in it so coordinates and names and ID, all sorted with commas) and I have another list (column C) which is shorter list of certain IDs. I googled and tried and got some results for the basic structure but the fuction seems to fail. It doesn't matter how I get that third list done, but there is only one criteria: since the list in column A is really long and those entries need to keep the .csv formatting, the function should copy that info what is in the matching cells.
Let me try to put it simple: .csv cells from column A that have matching ID from column C should be copied to column B (or N).
the function I'm working with right now is
=IF(ISERROR(FIND($C:$C; A1))=TRUE;"0";A1)
I have 1500+customer names in column C7 of table. I'm looking for a SUMPRODUCT formula that achieves the following 2 logical goals. First, it needs to determine the number of unique names in column C7. It can't just count the rows because many customers appear multiple times in the range. So, I have been using the following formula and it works great:
=SUMPRODUCT(
((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&"")))
Second, I'd like the formula to tell me how many of the unique names in C7 correspond to public companies. Column C8 of my table indicates whether or not a company is public ("Yes") or private ("No"). So, I've been using the following formula and it seems to deliver the right result:
=SUMPRODUCT(
((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&""))
*
(COUNTIFS(Table[C7],Table[C7]&"",Table[C8],"Yes")>=1))
But the added COUNTIFS statement seems very unwieldy and indirect to me. Why do I have to examine every instance of a particular company's name when the answer could be determined by looking at any instance of the name -- after all, each company in C7 is either public or private, and has the same corresponding value in C8 (whether "Yes" or "No") everywhere that its name appears in C7!
So that's my first question: is there a clearer, more efficient way to achieve the same result? My second question has to do with toggling the public company test.
What if I create a special cell, say A1, that will always contain either the word "On" or "Off"........
I have a column of dates (Column A) with intermittent blanks and I need to display the number of occurrences for each unique date.
This is what I am starting with: (Note= The number of rows varies by project so I need the whole Column A referenced)
Dates
02-24-2013
02-24-2013
12-15-2012
[Code].....
I have a list of around 50000 names. I need to count how many are unique.
I have a file with a column containing a series of records where a reference number can be repeated several times. I want to create a formula that will count the number of unique reference numbers in the column.
However - and this is the tricky part - I need it to allow for when the report is filtered, i.e. something like a SUBTOTAL function which ignores the hidden values.
So, the column in the full report has 691 unique values across 2,200+ records. If I apply a filter the column only has say 78 unique values. Is there a formula that can calculate this?
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
I need to move data in column E to single row (as text string is fine as I can Text to column later) for each unique OSIS number. VB should copy columns A-D to sheet 2 then move each row data for unique OSIS to column E as one long text string separated by common. I can then parse out using text-to-column. Below is the VB code which stops on: txt = txt & Sheet1.Range("E" & x) & ","
I want to be able to look up class code and score by OSIS either using vlookup or in Access with OSIS as primary key.
Public Sub processR2C()
pos = 1
txt = ""
For x = 2 To 99999
txt = txt & Sheet1.Range("E" & x) & ","
If Sheet1.Range("A" & x) Sheet1.Range("A" & x + 1) Then
Sheet2.Range("A" & pos) = Sheet1.Range("A" & x)
[Code] .........
Here is sample data
A B C D E
229647698 ABBASI AMJAD 2L4 ESS21QQR,40
[Code] ..........
I searched and searched and I can't find an easy way to do this without using Access which I am rubbish at. Is there an easy way to do the following in Excel.
I have several thousand records by row each with a unique numerical identifier. The unique identifier is the "Household". Within the household there are sub "Accounts". The sub accounts are truely unique. All the "Accounts" are in the same column.
What I am trying to do is combine the records into one row per "Household" with the accounts listed in successive columns. The maximum number of accounts there may be is 7 but it can be as few as 1. Example:
BEFORE
HH Acct
1 1234
1 2345
1 3456
1 4567
2 9876
2 8765
3 1113
4 5556
4 4447
4 3335
AFTER
HH Acct1 Acct2 Acct3 Acct4 Acct5 Acct6 Acct7
1 1234 2345 3456 4567
2 9876 8765 8765
3 1113
4 5556 4447 3335
I want to count the number of unique, or distinct, company names in column [C7], subject to two conditions that will exclude certain unique company names from the count.
I should also point out that most company names appear multiple times in column [C7].
a) Count the unique company names in column [C7]...
b) ...including only those companies who have at least one "Yes" in column [C8] somewhere among their records
c) ...and who also have at least one value equal or greater than "1" in column [C15] somewhere among their records
Note that that there is no requirement that the "Yes" and the "1" ever appear in the same record.
How do I create a 6 digit unique random number for use as an ID in column A. Once created the rows with preexisting 6 digit unique random ID numbers must not change every time new rows are added.
View 9 Replies View RelatedI have attached a sample workbook to try and explain what I'm after.
Basically I want to sum the amount of occasions a person has had checks and each occasion could have 1,2 or 3 individual checks.
Couting Unique Entries
I've included a sample worksheet ...
I have a list with many names, several of them appearing more than once. I would like to extract the unique entries an then make the list of them.
I can do that using the filter. But can I do it with formulas ? (In order to, whaterever change is made to the first list, get the extracted one immediately updated).
I was wondering if there might be a better way to write this macro. What it does is clears unique items from a Range( leaves duplicates ) I've looked all over the net I can find all kinds of function and subs to remove duplicates but haven't been able to find anything that just removes single entries. I"ll bet there's a more elegant way to write this maybe using a Collection or a Dictionary.
Sub Dummy()
Dim MP1_Rnge As Range
Set MP1_Rnge = Range("A1:A100")
For Each Cell In MP1_Rnge
If Not IsEmpty(Cell) Then
If Cell.Row = 1 Then..........
I have the below table of data, in Column A there is a list of entries and there may be duplicates in them, what I want to do in column B is be able to list all the unique entries in there and basically remove any duplicates.
AB1DETAILED LISTUNIQUE LIST2Holden 3Ford 4BMW 5Mercedes 6Ford 7Ford 8Audi 9BMW 10Holden 11Ferarri 12Holden 13BMW 14Toyota 15Toyota
I have a worksheet, where in C3:C100 (or even higher) i will have text strings. A lot of these will be repeated, and i want to pick out just one instance of each text string and display it in E3:E10 (or higher).
So, for example, if i had the following values in column C:One
Two
Two
One
One
Three
Seven
Two
Four
Seven
One
Three
I would want the following values in column E:One
Two
Three
Seven
Four