Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Count Unique Records

I have the following table (Excel 2007)

Month Broker #
December 32350
December 32350
December 24715
January 24715
January 24715
January 44063

(table is a1:b7)
I want to search for a month and then count the unique records in column B.
So for the month of January, it would return 2 since one of the 3 records is
a duplicate. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count Unique Records

Try this:

=SUM(N(FREQUENCY(IF(A2:A7="January",B2:B7),B2:B7) 0))

ctrl+shift+enter, not just enter


"Jon Dow" wrote:

I have the following table (Excel 2007)

Month Broker #
December 32350
December 32350
December 24715
January 24715
January 24715
January 44063

(table is a1:b7)
I want to search for a month and then count the unique records in column B.
So for the month of January, it would return 2 since one of the 3 records is
a duplicate. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count Unique Records

Try this:

Both formulas need to be array entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

If there will be no empty cells in column B:

D2 = January

=COUNT(1/FREQUENCY(IF(A2:A7=D2,MATCH(B2:B7,B2:B7,0)),ROW(A2 :A7)-MIN(ROW(A2:A7))+1))

If there might be empty cells in column B:

=COUNT(1/FREQUENCY(IF((A2:A7=D2)*(B2:B7<""),MATCH(B2:B7,B2 :B7,0)),ROW(A2:A7)-MIN(ROW(A2:A7))+1))

Biff

"Jon Dow" wrote in message
...
I have the following table (Excel 2007)

Month Broker #
December 32350
December 32350
December 24715
January 24715
January 24715
January 44063

(table is a1:b7)
I want to search for a month and then count the unique records in column
B.
So for the month of January, it would return 2 since one of the 3 records
is
a duplicate. Any ideas?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Count Unique Records

Wow that's great. Thanks. This Forum ROCKS!!

"Teethless mama" wrote:

Try this:

=SUM(N(FREQUENCY(IF(A2:A7="January",B2:B7),B2:B7) 0))

ctrl+shift+enter, not just enter


"Jon Dow" wrote:

I have the following table (Excel 2007)

Month Broker #
December 32350
December 32350
December 24715
January 24715
January 24715
January 44063

(table is a1:b7)
I want to search for a month and then count the unique records in column B.
So for the month of January, it would return 2 since one of the 3 records is
a duplicate. Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count Unique Records

D2 = January

=COUNT(1/FREQUENCY(IF(A2:A7=D2,B2:B7),B2:B7))

Biff

"Teethless mama" wrote in message
...
Try this:

=SUM(N(FREQUENCY(IF(A2:A7="January",B2:B7),B2:B7) 0))

ctrl+shift+enter, not just enter


"Jon Dow" wrote:

I have the following table (Excel 2007)

Month Broker #
December 32350
December 32350
December 24715
January 24715
January 24715
January 44063

(table is a1:b7)
I want to search for a month and then count the unique records in column
B.
So for the month of January, it would return 2 since one of the 3 records
is
a duplicate. Any ideas?



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
Count Unique records based on the Criteria in another colum Rajat Excel Worksheet Functions 1 December 1st 06 12:46 AM
Count Unique records based on the Criteria in another colum Rajat Excel Worksheet Functions 0 November 30th 06 03:43 AM
Count Unique records based on the Criteria in another colum Ron Coderre Excel Worksheet Functions 0 November 29th 06 06:28 PM
Count unique records... with a twist... Need help! [email protected] Excel Worksheet Functions 4 August 3rd 06 06:17 PM
Count the number of unique records [email protected] Excel Worksheet Functions 7 March 8th 06 07:33 AM


All times are GMT +1. The time now is 01:08 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"