Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RFJ RFJ is offline
external usenet poster
 
Posts: 25
Default Conditional count across 2 columns

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



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Conditional count across 2 columns

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


"RFJ" wrote:

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




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Conditional count across 2 columns

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!
================================================== ===


"RFJ" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Conditional count across 2 columns

If you have XL2007 then try this:

=COUNTIFS(Place,"A",Customer,1)


"RFJ" wrote:

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




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
Please help me with a Conditional Count... SisterDell Excel Discussion (Misc queries) 4 March 22nd 07 05:03 PM
Conditional Count 2 Columns rileym Excel Worksheet Functions 1 August 23rd 06 03:54 AM
Conditional count of rows dependent on multiple columns Edwin Castro Excel Worksheet Functions 1 January 11th 06 12:16 AM
Conditional Count Ralph Excel Worksheet Functions 2 December 1st 05 06:27 PM
conditional count Karen Excel Worksheet Functions 1 August 11th 05 11:53 PM


All times are GMT +1. The time now is 07:38 AM.

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"