Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default countif in a value range?

I would like to do a count if a value is within a range like
=COUNTIF(E3:E150,"<=89 and =80")

But that doesn't work
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default countif in a value range?

You have to do it in two parts... count the values less than or equal to
your maximum value and subtract the count of the values **less than**
(hence, no equal sign) than your minimum value...

=COUNTIF(E3:E150,"<=89")-COUNTIF(E3:E150,"<80")

Rick


"pokdbz" wrote in message
...
I would like to do a count if a value is within a range like
=COUNTIF(E3:E150,"<=89 and =80")

But that doesn't work


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default countif in a value range?

Try one of these:

=SUM(COUNTIF(E3:E150,{"<=89","<80"})*{1,-1})
or
=SUMPRODUCT((E3:E150=80)*(E3:E150<=89))

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"pokdbz" wrote in message
...
I would like to do a count if a value is within a range like
=COUNTIF(E3:E150,"<=89 and =80")

But that doesn't work



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif in a value range?

Just to be different:

=INDEX(FREQUENCY(E3:E150,{89,79}),)

--
Biff
Microsoft Excel MVP


"pokdbz" wrote in message
...
I would like to do a count if a value is within a range like
=COUNTIF(E3:E150,"<=89 and =80")

But that doesn't work



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default countif in a value range?

I considered that approach....but...
If decimals can be in the list, it needs tweaking.
Values between 79 and 80, exclusive, trip it up.
(eg 79.5)

Perhaps:
=INDEX(FREQUENCY(E3:E150,{89,79.9999999999999}),)

--------------------------
Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"T. Valko" wrote in message
...
Just to be different:

=INDEX(FREQUENCY(E3:E150,{89,79}),)

--
Biff
Microsoft Excel MVP


"pokdbz" wrote in message
...
I would like to do a count if a value is within a range like
=COUNTIF(E3:E150,"<=89 and =80")

But that doesn't work





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
Countif(len(Range)4) Cortez Excel Discussion (Misc queries) 2 July 16th 07 10:07 PM
Countif between a range? Keeprogoal Excel Discussion (Misc queries) 2 June 21st 06 11:52 PM
Countif between a range? Keeprogoal Excel Worksheet Functions 1 June 21st 06 11:14 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF and range? Hardy Excel Discussion (Misc queries) 6 July 22nd 05 06:29 PM


All times are GMT +1. The time now is 04:03 PM.

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"