Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default count number of occurances between 2 values

I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, 1000 <2000) doesn't work
for me
A
1000
4502
1203
2308

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default count number of occurances between 2 values

between 1000 and 2000.

Just so we understand...*between will exclude* from the count both 1000 and
2000.

=COUNTIF(A1:A4,"1000")-COUNTIF(A1:A4,"=2000")

--
Biff
Microsoft Excel MVP


"Peters" wrote in message
...
I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, 1000 <2000) doesn't work
for me
A
1000
4502
1203
2308



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default count number of occurances between 2 values

Try this: =SUMPRODUCT((A1:A41000)*(A1:A4<2000))

Success? Express it here, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Peters" wrote:
I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, 1000 <2000) doesn't work
for me
A
1000
4502
1203
2308

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default count number of occurances between 2 values

Peters wrote:
I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, 1000 <2000) doesn't work
for me
A
1000
4502
1203
2308


Try
=COUNTIF(A1:A4,"1000")-COUNTIF(A1:A4,"=2000")

N.B. "Between" usually implies an inclusive test, i.e., "1000 is between
1000 and 2000" is a true statement. If that is the case for you, try
this instead:
=COUNTIF(A1:A4,"=1000")-COUNTIF(A1:A4,"2000")
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
Count the number of occurances in a cell bobbroda Excel Worksheet Functions 2 June 1st 09 04:10 PM
Count occurances of equal values in two col. - array within SUMPRO John_J Excel Worksheet Functions 5 September 30th 08 02:19 PM
Count Number of Duplicate Occurances Scott Halper Excel Worksheet Functions 7 March 30th 07 03:42 PM
Count number of possible occurances bi-weekly (Can this be done)? caj Excel Discussion (Misc queries) 2 February 15th 07 07:56 PM
Count occurances of multiple values BaseballFan Excel Worksheet Functions 2 February 17th 05 08:31 AM


All times are GMT +1. The time now is 03:22 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"