Re: Countif problem?

From: Ron Rosenfeld (ronrosenfeld_at_nospam.org)
Date: 08/13/04


Date: Fri, 13 Aug 2004 07:10:20 -0400

On Fri, 13 Aug 2004 03:11:01 -0700, "David" <David@discussions.microsoft.com>
wrote:

>Greetings, and tia for your help.
>
>The example below illustrates my problem:
>
>I would like a formula to count how many customer/product combinations for
>each record. In the example below, for instance, there are 3 records for
>customer 101 and product 'c'. The formula result for each occurance would be
>3. I'm trying variations on the countif array formula but no joy so far. I
>know you guys will crack this while I'm still floundering around.
>
>Customer product formula result
>101 c 3
>102 a 2
>100 a 1
>101 c 3
>100 b 1
>101 c 3
>102 a 2
>101 e 1

If your data is in A1:B8, enter the following formula in C1 and drag/copy it
down to C8.

=SUMPRODUCT(($A$1:$A$8=A1)*($B$1:$B$8=B1))

Alter your references according to your actual data, but note that the entire
column is an absolute reference, and the Customer and Product is a relative
reference.

--ron