Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
don
 
Posts: n/a
Default Countif for numbers between x and y

If I have a column of numbers from -100 to + 100 how can I count the
number of rows containing numbers between 40 and 50.

=COUNTIF(J$4:J$1058,AND("<50,40"))


Doesn't work. I get zero.

Thanks
Don

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

=SUMPRODUCT(--(J4:J105840),--(J4:J1058<50))


--
Regards,

Peo Sjoblom


"don" wrote in message
...
If I have a column of numbers from -100 to + 100 how can I count the
number of rows containing numbers between 40 and 50.

=COUNTIF(J$4:J$1058,AND("<50,40"))


Doesn't work. I get zero.

Thanks
Don


  #3   Report Post  
don
 
Posts: n/a
Default

thanks Peo,
Can you expand this so the 40 portion is in a cell and can be
easily changed?
I tried a couple of versions and referring to a cell didn't seem to
work.

Thanks
Don


On Wed, 4 May 2005 20:36:21 -0700, "Peo Sjoblom"
wrote:

=SUMPRODUCT(--(J4:J105840),--(J4:J1058<50))


  #4   Report Post  
Ragdyer
 
Posts: n/a
Default

Try this, with value in J1, and < value in J2:

=SUMPRODUCT((J4:J1058J1)*(J4:J1058<J2))
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"don" wrote in message
...
thanks Peo,
Can you expand this so the 40 portion is in a cell and can be
easily changed?
I tried a couple of versions and referring to a cell didn't seem to
work.

Thanks
Don


On Wed, 4 May 2005 20:36:21 -0700, "Peo Sjoblom"
wrote:

=SUMPRODUCT(--(J4:J105840),--(J4:J1058<50))



  #5   Report Post  
bj
 
Posts: n/a
Default

also you can try
=countif(J$4:J$1058,"<=50")-countif(J$4:J$1058,"<40")
play with the less than/less than or equals as needed.

"don" wrote:

If I have a column of numbers from -100 to + 100 how can I count the
number of rows containing numbers between 40 and 50.

=COUNTIF(J$4:J$1058,AND("<50,40"))


Doesn't work. I get zero.

Thanks
Don


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 COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 03:55 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 16th 04 12:06 AM
countif, again Liz G Excel Worksheet Functions 2 November 2nd 04 12:20 AM


All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"