View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jennifer Jennifer is offline
external usenet poster
 
Posts: 385
Default Counting Cells with Multiple Range Criteria (Excel 2003)

Luke - this is returning an error when I enter it in exactly like you have
it. When I change the "--" to "-", I get a returned value of 1, so it's
still not pulling it correctly.

"Luke M" wrote:

=SUMPRODUCT(--(A2:A100C1),--(A2:A100<D1),--(B2:B100C1),--(B2:B100<D1))

Note that unless you are using XL 2007, you can't callout the entire column
within SUMPRODUCT.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Jennifer" wrote:

I'm trying to count the number of rows that matches multiple criteria in
multiple ranges. As an example, I want to count the number of rows where
both Column A and Column B have a date between 01-01-05 and 12-31-05. Whe

Column A Column B
01-02-05 12-20-05
01-06-05 02-20-06
05-06-09 03-07-05
01-02-06 01-09-06

So, in this instance, I want it to count only row 1 because both columns
match the criteria.

I've tried a couple of different Countif statements, but I can never get it
to count using the multiple criteria and ranges. Please assist.

Things I've tried:
=Countif(and(A:A,B:B), ""&C1))+countif(and(A:A,B:B), "<"&D1) - - where C1
is equal to 01-01-05 and D1 is 12-31-05