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" <BeSmart@discussions.microsoft.com> wrote in message
news:908B8CAE-ECCC-4AA9-ABB0-203914BC7834@microsoft.com...
> 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
Bookmarks