Conditional count across 2 columns

R

RFJ

I've got a 2000 row worksheet where I want to count the number of occurences
row where two row conditions are satisifed

eg In the example below if I wanted to count where Col 1= A and Col 2 = 1,
then I'd want the answer 2 returned

A 1
B 2
A 3
C 4
A 1

In practice Col 1 has the rangename 'Place' and Col 2 has the rangename
'Customer' - if this helps answering this post

Can someone save my sanity :(

Tx in advance

Rob
 
R

Ron Coderre

Try something like this:

=SUMPRODUCT((Place="A")*(Customer=1))

Where "Place" and "Customer" are defined names referring to equal numbers of
cells.

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
R

RagDyeR

It's wiser to assign 2 cells to "contain" the search criteria, so that they
can be easily changed without changing the formula itself.

Say the criteria for "Place"is entered in D1, and the criteria for
"Customer" is entered in D2.

Then, try this formula:

=Sumproduct((PLace=D1)*(Customer=D2))
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


I've got a 2000 row worksheet where I want to count the number of occurences
row where two row conditions are satisifed

eg In the example below if I wanted to count where Col 1= A and Col 2 = 1,
then I'd want the answer 2 returned

A 1
B 2
A 3
C 4
A 1

In practice Col 1 has the rangename 'Place' and Col 2 has the rangename
'Customer' - if this helps answering this post

Can someone save my sanity :(

Tx in advance

Rob
 
Top