Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting unique entries in a field

I have a spreadsheet that is 6 columns by 58000 rows. In this spreadsheet I filter data. However I want to count the number of unique entries in a list (that are not the same). See example:

ORDER RDATE RTIME PHL SQA# FDATE
XHGB 8/18/08 5:00 JW F15031 8/18/08
XWBC 8/18/08 5:05 JW F15031 8/18/08
XHCT 8/19/08 7:05 LW S15033 8/19/08
XALT 8/20/08 11:24 FS W13055 8/20/08

I am counting the number of unique entries by the SQA# field (which should be 3). What is the best way to pull this data for 58000 entries if sorting by the SQA#? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Counting unique entries in a field

Use Pivot table.

"Jeff Whitesel" wrote:

I have a spreadsheet that is 6 columns by 58000 rows. In this spreadsheet I filter data. However I want to count the number of unique entries in a list (that are not the same). See example:

ORDER RDATE RTIME PHL SQA# FDATE
XHGB 8/18/08 5:00 JW F15031 8/18/08
XWBC 8/18/08 5:05 JW F15031 8/18/08
XHCT 8/19/08 7:05 LW S15033 8/19/08
XALT 8/20/08 11:24 FS W13055 8/20/08

I am counting the number of unique entries by the SQA# field (which should be 3). What is the best way to pull this data for 58000 entries if sorting by the SQA#? Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 342
Default Counting unique entries in a field

Maybe not the best solution, but you could use <Data<Filter<Advanced
Filter to copy a list of unique values to a different location. Then you
could count the new list.

Tom
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Counting unique entries in a field

Another way would be to download "morefunc" UDFs and install it. (just
Google it) Use their function COUNTDIFF to give the number of unique
entries.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Counting unique entries in a field

Hi,

The formula to do this is
=SUMPRODUCT(1/COUNTIF(A1:A58000,A1:58000))

Adjust the references for the column containing your data.

If this helps, please click the Yes button.

--
Thanks,
Shane Devenshire


"Jeff Whitesel" wrote:

I have a spreadsheet that is 6 columns by 58000 rows. In this spreadsheet I filter data. However I want to count the number of unique entries in a list (that are not the same). See example:

ORDER RDATE RTIME PHL SQA# FDATE
XHGB 8/18/08 5:00 JW F15031 8/18/08
XWBC 8/18/08 5:05 JW F15031 8/18/08
XHCT 8/19/08 7:05 LW S15033 8/19/08
XALT 8/20/08 11:24 FS W13055 8/20/08

I am counting the number of unique entries by the SQA# field (which should be 3). What is the best way to pull this data for 58000 entries if sorting by the SQA#? Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Counting unique entries in a field

You could use
=Sumproduct((E1:E58000<"")/Countif(E1:E58000, E1:E58000))

But a user defined function would be faster for a range that size. Here is
a UDF supplied by Charles Williams
http://msdn.microsoft.com/en-us/library/aa730921.aspx


Public Function COUNTU(theRange As Range) As Variant
Dim colUniques As New Collection
Dim vArr As Variant
Dim vCell As Variant
Dim vLcell As Variant
Dim oRng As Range

Set oRng = Intersect(theRange, theRange.Parent.UsedRange)
vArr = oRng
On Error Resume Next
For Each vCell In vArr
If vCell < vLcell Then
If Len(CStr(vCell)) 0 Then
colUniques.Add vCell, CStr(vCell)
End If
End If
vLcell = vCell
Next vCell

COUNTU = colUniques.Count
End Function


"Jeff Whitesel" wrote:

I have a spreadsheet that is 6 columns by 58000 rows. In this spreadsheet I filter data. However I want to count the number of unique entries in a list (that are not the same). See example:

ORDER RDATE RTIME PHL SQA# FDATE
XHGB 8/18/08 5:00 JW F15031 8/18/08
XWBC 8/18/08 5:05 JW F15031 8/18/08
XHCT 8/19/08 7:05 LW S15033 8/19/08
XALT 8/20/08 11:24 FS W13055 8/20/08

I am counting the number of unique entries by the SQA# field (which should be 3). What is the best way to pull this data for 58000 entries if sorting by the SQA#? Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting unique entries with criteria Rachel Excel Discussion (Misc queries) 10 January 15th 10 04:35 PM
Counting Unique Entries Tendresse Excel Discussion (Misc queries) 3 June 4th 07 08:19 AM
Counting unique entries DianeandChipps Excel Discussion (Misc queries) 1 October 14th 06 07:35 PM
Counting Unique Entries SouthCarolina Excel Discussion (Misc queries) 7 April 14th 06 01:18 PM
Best way to get a list of unique entries in a field [email protected] Excel Worksheet Functions 2 January 19th 06 10:30 PM


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"