Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
BeSmart
 
Posts: n/a
Default Count unique entries

I have a list of 900 entries and for each change of code in column B I need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.
--
Thank for your help
BeSmart
  #2   Report Post  
Max
 
Posts: n/a
Default

One try ..

Assume the posted data is in Sheet1,
cols A to E, data from row2 down

Using 3 empty cols to the right, say cols G to I, put:

In G2: =B2&"_"&D2
In H2: =IF(COUNTIF($G$2:G2,G2)1,"",G2)
In I2: =IF(H2="","",B2)

Select G2:I2, fill down until the last row of data

In another sheet
-----------
The B codes are listed in A1 down, viz.:

ABCABC
ABCDDD
etc

Put in B1: =COUNTIF(Sheet1!I:I,A1)
Copy down

Col B will return the desired counts for the codes in col A
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"BeSmart" wrote in message
...
I have a list of 900 entries and for each change of code in column B I

need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula

next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.
--
Thank for your help
BeSmart



  #3   Report Post  
Max
 
Posts: n/a
Default

Typo, sorry.

Line:
cols A to E, data from row2 down


should read:
cols A to D, data from row2 down

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 29 Aug 2005 17:33:16 -0700, "BeSmart"
wrote:

I have a list of 900 entries and for each change of code in column B I need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.


Here's one way.

1. Download and install Longre's morefunc.xll from http://xcell05.free.fr/

2. With the B code in H1, use this **ARRAY** formula:

=COUNTDIFF(IF(Code=H1,Publications),,FALSE)

To enter an **ARRAY** formula, after typing or pasting in the formula, hold
down <ctrl<shift while you hit <enter. Excel will place braces around the
formula.




--ron
  #5   Report Post  
BeSmart
 
Posts: n/a
Default

Thanks for that
I've downloaded the morefunc.xll and included your formulas (as an array),
however it isn't taking into account the two conditions.

The result I got only told me how many times ABCABC occurs in the list.

What I need to know is:

"For everything in column B that says ABCABC, count and report the number of
different publications listed in column D.

Do I need to define name the column D list and call it "publications"?

--
Thank for your help
BeSmart


"Ron Rosenfeld" wrote:

On Mon, 29 Aug 2005 17:33:16 -0700, "BeSmart"
wrote:

I have a list of 900 entries and for each change of code in column B I need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.


Here's one way.

1. Download and install Longre's morefunc.xll from http://xcell05.free.fr/

2. With the B code in H1, use this **ARRAY** formula:

=COUNTDIFF(IF(Code=H1,Publications),,FALSE)

To enter an **ARRAY** formula, after typing or pasting in the formula, hold
down <ctrl<shift while you hit <enter. Excel will place braces around the
formula.




--ron



  #6   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 29 Aug 2005 20:33:10 -0700, "BeSmart"
wrote:

The result I got only told me how many times ABCABC occurs in the list.

What I need to know is:

"For everything in column B that says ABCABC, count and report the number of
different publications listed in column D.

Do I need to define name the column D list and call it "publications"?


I'm not sure what you are doing differently than I.

You can either NAME the appropriate ranges (Code=$B$2:$B$n
Publications=$D$2:$D$n) or use the cell references in their place in the
formula.

So if your table were in A2:D10, the formula could read:

=COUNTDIFF(IF($B$2:$B$10=H1,$D$2:$D$10),,FALSE)

again -- entered as an ARRAY formula.


--ron
  #7   Report Post  
Domenic
 
Posts: n/a
Default

Here's another way...

Assuming that F1:F2 contains ABCABC and ABCDDD...

G1, copied down:

=SUM(IF(FREQUENCY(IF($B$1:$B$9=F1,MATCH($D$1:$D$9, $D$1:$D$9,0)),ROW($D$1:
$D$9)-ROW($D$1)+1)0,1))

or

=COUNT(1/FREQUENCY(IF($B$1:$B$9=F1,MATCH($D$1:$D$9,$D$1:$D$ 9,0)),ROW($D$1
:$D$9)-ROW($D$1)+1))

Both formulas need to be confirmed with CONTROL+SHIFT+ENTER, not just
ENTER.

Hope this helps!

In article ,
"BeSmart" wrote:

I have a list of 900 entries and for each change of code in column B I need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.

  #8   Report Post  
BeSmart
 
Posts: n/a
Default

That works wonderfully - thanks heaps

"Domenic" wrote:

Here's another way...

Assuming that F1:F2 contains ABCABC and ABCDDD...

G1, copied down:

=SUM(IF(FREQUENCY(IF($B$1:$B$9=F1,MATCH($D$1:$D$9, $D$1:$D$9,0)),ROW($D$1:
$D$9)-ROW($D$1)+1)0,1))

or

=COUNT(1/FREQUENCY(IF($B$1:$B$9=F1,MATCH($D$1:$D$9,$D$1:$D$ 9,0)),ROW($D$1
:$D$9)-ROW($D$1)+1))

Both formulas need to be confirmed with CONTROL+SHIFT+ENTER, not just
ENTER.

Hope this helps!

In article ,
"BeSmart" wrote:

I have a list of 900 entries and for each change of code in column B I need
to know the number of publications used in D excluding the duplication, ie
for ABCABC there are 3 publications, for ABCDDD there are 4.

A B C D
ABC ABCABC A MELAGE
ABC ABCABC A MELAGE
ABC ABCABC A MELHER
ABC ABCABC A DOGHAN
ABC ABCDDD A MELAGE
ABC ABCDDD A MELAGE
ABC ABCDDD A SYDMOR
ABC ABCDDD A MELHER
ABC ABCDDD A BRICOU

In a separate area I will then have a list of B codes with the formula next
to it that calculates the number of unique publications eg:

ABCABC 3
ABCDDD 4

Any help with the formula I should use would be greatly appreciated.


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
"COUNTU" function in Excel to count unique entries in a range WayneL Excel Worksheet Functions 20 September 19th 08 03:50 AM
Table to pick out most common entries and count occurences of each Neil Goldwasser Excel Worksheet Functions 4 August 6th 05 09:57 AM
Count of unique entries slang Excel Discussion (Misc queries) 4 July 3rd 05 06:45 AM
how to count unique entries with multiple condition Michael Excel Worksheet Functions 6 June 29th 05 12:38 PM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM


All times are GMT +1. The time now is 04:52 PM.

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"