A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

count number of occurances between 2 values



 
 
Thread Tools Display Modes
  #1  
Old June 12th, 2009, 01:17 AM posted to microsoft.public.excel.worksheet.functions
PeterS
external usenet poster
 
Posts: 38
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  
Old June 12th, 2009, 01:36 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
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  
Old June 12th, 2009, 01:40 AM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default count number of occurances between 2 values

Try this: =SUMPRODUCT((A1:A41000)*(A1:A42000))

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  
Old June 12th, 2009, 02:17 AM posted to microsoft.public.excel.worksheet.functions
smartin
external usenet poster
 
Posts: 780
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")
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:49 PM.


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