View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default count duplicate records in a group

Hi,

You may try the following array formula (Ctrl+Shift+Enter). the data is in
the format below (in range A1:B7)

12345 1
12345 2
12345 3
12345 1
12345 2
12345 3
12345 1

In A9 enter, 12345 and in B9 enter 1. in C9, enter the following array
formula COUNT(IF(($A$1:$A$7=A9)*($B$1:$B$7=B9),B1:B7))

You may chage the value in B9 to 2 or 3.

Regards,



"Mparekh" wrote:


Here's the set of data I am struggling with:

Column A Column B
12345 1
12345 2
12345 3
12345 1
12345 2
12345 3
12346 1
12346 2
12346 1
12346 2

Am trying to write a formula that would count duplicate records in
column B for the group of records in Column A. For e.g. for record
12345 in column A, 1 in column B gets repeated twice and so on and so
forth or in other words, for record 12345 in column A, group 1,2,3 in
column B gets repeated twice.

Is there a formula that would help me derive that? Pleasseee help, have
been struggling with this since last two days and finally need to pick
your excel brains on this.

Thank You.
Parekh


--
Mparekh
------------------------------------------------------------------------
Mparekh's Profile: http://www.excelforum.com/member.php...o&userid=14999
View this thread: http://www.excelforum.com/showthread...hreadid=495089