Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default unique records in specified range

I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default unique records in specified range

Try an array function like:

=Count(If(A1:A10="item
id-s",If(B1:B10=Date(2008,1,1),If(B1:B10<Date(2008,4 ,1),A1:A1))))

Finally, because it is an Array function, while holding down the Cntrl and
Shft Key, press Enter. This will enclose the function in braces { }.

Good Luck.

"adimar" wrote:

I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default unique records in specified range


I must have not been clear about the "item id-s". Here is a data sample:

shipped item id
==============
05/16/02 b02100535
06/11/02 b02100525
06/11/02 b02100534
06/13/02 b02100524
06/13/02 b02100533
07/03/02 b02100528
07/16/02 b02100531
07/16/02 b02100532
10/04/02 b02100527
11/12/02 b02100534
05/22/03 b02100530
10/10/03 b02100534
06/14/04 b02100525
01/26/05 b02100532
02/11/05 b02100534
08/16/05 b02100524
08/16/05 b02100533
10/12/05 b02100533
10/17/05 b02100524
12/02/05 b02100528
06/29/06 b02100524

I'm looking for the number of unique item id-s that shipped in 2005.

Thank you.

"ND Pard" wrote:

Try an array function like:

=Count(If(A1:A10="item
id-s",If(B1:B10=Date(2008,1,1),If(B1:B10<Date(2008,4 ,1),A1:A1))))

Finally, because it is an Array function, while holding down the Cntrl and
Shft Key, press Enter. This will enclose the function in braces { }.

Good Luck.

"adimar" wrote:

I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default unique records in specified range

Try this:
"Shipped" & "item_id" are defined name ranges

=SUM(N(FREQUENCY(IF(YEAR(Shipped)=2005,MATCH(item_ id,item_id,0)),MATCH(item_id,item_id,0))0))

ctrl+shift+enter, not just enter


"adimar" wrote:


I must have not been clear about the "item id-s". Here is a data sample:

shipped item id
==============
05/16/02 b02100535
06/11/02 b02100525
06/11/02 b02100534
06/13/02 b02100524
06/13/02 b02100533
07/03/02 b02100528
07/16/02 b02100531
07/16/02 b02100532
10/04/02 b02100527
11/12/02 b02100534
05/22/03 b02100530
10/10/03 b02100534
06/14/04 b02100525
01/26/05 b02100532
02/11/05 b02100534
08/16/05 b02100524
08/16/05 b02100533
10/12/05 b02100533
10/17/05 b02100524
12/02/05 b02100528
06/29/06 b02100524

I'm looking for the number of unique item id-s that shipped in 2005.

Thank you.

"ND Pard" wrote:

Try an array function like:

=Count(If(A1:A10="item
id-s",If(B1:B10=Date(2008,1,1),If(B1:B10<Date(2008,4 ,1),A1:A1))))

Finally, because it is an Array function, while holding down the Cntrl and
Shft Key, press Enter. This will enclose the function in braces { }.

Good Luck.

"adimar" wrote:

I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default unique records in specified range

On May 28, 5:25 pm, adimar wrote:
I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.


Google "morefunc". They have a free UDF that supposedly does exactly
this.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default unique records in specified range


morefunc/COUNTDIFF counts unique occurences in an array.

I'm not clear how to get the source code to update it to add the additional
check for the date range.

Thank you.

"Spiky" wrote:

On May 28, 5:25 pm, adimar wrote:
I have a very large table of non-unique items shipped; the table contains
item id and ship date columns.

I need to find the number of unique item id-s shipped in a given
timeframe, ex. 01/01/08 - 03/31/08

Ive tried using the commonly quoted solution:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&""))

Somehow, I cannot get the additional check for timeframe to work in the
above formula, something like:
=SUMPRODUCT((A1:A10<"")/COUNTIF(A1:A10,A1:A10&"")*(B1:B10 = C1)*( B1:B10
<= C2))

I would appreciate suggestions for array formula solutions.

Thank you.


Google "morefunc". They have a free UDF that supposedly does exactly
this.

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
unique filter results in some non-unique records. Serials Librarian Excel Discussion (Misc queries) 2 May 26th 06 09:58 PM
Counting unique records based on date range aspAddict Excel Worksheet Functions 3 October 26th 05 08:12 PM
Unique records Pete Excel Discussion (Misc queries) 1 July 26th 05 06:58 PM
Unique Records Arturo Excel Worksheet Functions 2 December 1st 04 09:33 PM
unique records Pyotr Excel Worksheet Functions 1 November 4th 04 02:59 PM


All times are GMT +1. The time now is 09:54 AM.

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

About Us

"It's about Microsoft Excel"