View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default COUNTIF Function with mulitple criteria?

Your description was fine.
I guess what you need to hear is that COUNTIF won't work exactly the way you
want it to. I wish it could use multiple criteria (like what you
posted)....but it can't.

The responses you got represent some of the ways that Excel CAN deliver the
values you're looking for.

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

XL2002, WinXP


"Corey" wrote:

I don't think I'm phrasing this in the most effective way. When you
begin to type a COUNTIF statement, the formula pops up with something
as follows:

=COUNTIF([Range],[Criteria])

I'm wanting to test for a range as part of my criteria. Something
like:

=COUNTIF(B59:B83,"19" & "<30")

To me, that would imply that for each cell between B59 and B83, add
one to the count for any cells that contain some number from 20-29.

It doesn't work though in my spreadsheet. I hope that makes my goal
more understandable. Thanks for all of your help!

On Jan 27, 4:50 pm, Ron Coderre
wrote:
As long as your ranges are always groups of 10 as you posted

Then..with
A1:A100 containing your list of numbers

Try this:
C1: 0
C2: 10
C3: 20
etc

E1: =SUMPRODUCT(--(INT($A$1:$A$100/10)*10=C1))
Copy that formula down

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP

"Corey" wrote:
I'm trying to set up some countif statements that will count the
number of cells within a given range that contain number within a
given range.


Ex. One column has a list of random numbers from 0-100. The next
column will count the number of numbers that fall into a given range.
How many of the cells within the first column contain numbers between
0 and 9? 10 and 19? So on and so forth...


Any help on this would be greatly appreciated.