Thread: Range Formula
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Range Formula

I assume that what you want is those cells which are greater than or equal
to 50000 AND less than or equal to 100000.
Hence you want to count the cells greater than or equal to 50000, but from
those you do NOT want to include those greater than 100000, hence the
subtraction.
--
David Biddulph

"Jay" wrote in message
...
Biff,

That worked, but can you explain why. I'm having problems wrapping my
head
around it. To me that formula is say count cells greater than or equal to
50000 and cells greater that or equal to 100000. Any insight you could
provide is greatly appreciated.

"T. Valko" wrote:

Try it like this:

=COUNTIF(Y2:Y268, "=50000")-COUNTIF(Y2:Y268, "100000")


--
Biff
Microsoft Excel MVP


"Jay" wrote in message
...
I'm trying to count the number of cells which contain values within a
given
range. For example, I want to count all the cell in a column which
contain a
value between 50,000 and 100,000. I've tried using the Countif formula
given
as an example by microsoft but the results are wrong. The formula
looks
like
this:

countif(y2:y268, "=50000")-countif(y2:y268, "<=100000")

Does anyone know why I'm getting the wrong results and is there another
way
to do this? Thanks