View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Count Unique (30000 rows) using criteria - Please help!

mike in texas wrote...
I'd suggest a pivot table on sheet 2. Set it up with dates in the rows and
use the "count" of date in the data field.

....

Perhaps reading the OP's specs carefully would help.

Robert_L_Ross wrote...
In Sheet1 I have:
ColE * * *ColB
1/1/08 * 00113800
1/1/08 * 02559000
1/2/08 * 00113800
1/2/08 * 02559000
1/2/08 * 02559000
1/3/08 * 00113800
1/3/08 * 02559000

....
In Sheet2 I Need:
ColA * * *ColB
1/1/08 * 2
1/2/08 * 2
1/3/08 * 2

....

Create a Pivot Table from the data in Sheet1 as you propose and the
result would be

1/1/08 2
1/2/08 3
1/3/08 2

Note the difference: Pivot Table would return 3 for the 1/2/08 date
while the OP wants 2. If you had read the OP's specs carefully (or
even the subject line), you might have noticed the bit about counting
UNIQUE (meaning counting distinct). There are only 2 distinct col B
values corresponding to the col E value 1/2/08 in the OP's original
data. How would you use a Pivot Table to return the DISTINCT count?