Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default How to count a range of number to a given parameter or criteria.

Hi,

I have a range (A1:A20) that contains numbers and I want to know how many
fall between 0 and 1, 1 and 2, 3 and 4, and greater than 4. I did the countif
function but it does not let me use more than 1 criteria. Can someone let me
know.

--
Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default How to count a range of number to a given parameter or criteria.

Although COUNTIF only lets you use one criteria, you could have
something like this:

=COUNTIF(A1:A20,"1")-COUNTIF(A1:A20,"=2")

to get a count of the numbers above 1 and less than or equal to 2.
Vary the 1 and 2 for other ranges.

Hope this helps.

Pete

On Oct 26, 8:37 pm, Saul wrote:
Hi,

I have a range (A1:A20) that contains numbers and I want to know how many
fall between 0 and 1, 1 and 2, 3 and 4, and greater than 4. I did the countif
function but it does not let me use more than 1 criteria. Can someone let me
know.

--
Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default How to count a range of number to a given parameter or criteria.

You could use SUMPRODUCT.

If you truely mean "fal between" the two numbers without including the two
numbers, then:

=SUMPRODUCT(--(A1:A200),--(A1:A20<1))

However, if you want to include the two numbers (example: 0 and 1), then:

=SUMPRODUCT(--(A1:A20=0),--(A1:A20<=1))

HTH,
Paul

--

"Saul" wrote in message
...
Hi,

I have a range (A1:A20) that contains numbers and I want to know how many
fall between 0 and 1, 1 and 2, 3 and 4, and greater than 4. I did the
countif
function but it does not let me use more than 1 criteria. Can someone let
me
know.

--
Thank you.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How to count a range of number to a given parameter or criteria.

=COUNTIF(A1:A20,"0")-COUNTIF(A1:A20,"1")

etc.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Saul" wrote in message
...
Hi,

I have a range (A1:A20) that contains numbers and I want to know how many
fall between 0 and 1, 1 and 2, 3 and 4, and greater than 4. I did the
countif
function but it does not let me use more than 1 criteria. Can someone let
me
know.

--
Thank you.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How to count a range of number to a given parameter or criteria.

Another way

=SUM(COUNTIF(A1:A20,""&{0;1})*{1;-1})


--


Regards,


Peo Sjoblom


"Saul" wrote in message
...
Hi,

I have a range (A1:A20) that contains numbers and I want to know how many
fall between 0 and 1, 1 and 2, 3 and 4, and greater than 4. I did the
countif
function but it does not let me use more than 1 criteria. Can someone let
me
know.

--
Thank you.



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 unique numbers in a range with a given criteria Nelson Excel Discussion (Misc queries) 4 February 9th 07 01:28 PM
count criteria within a set range in excel Allan from Melbourne Excel Discussion (Misc queries) 3 August 1st 06 03:11 PM
I Need to Count Number of Entries Based on Two Criteria Jones Excel Worksheet Functions 3 July 14th 05 10:34 PM
how can i count a number that meets a criteria? oakm Excel Worksheet Functions 2 March 11th 05 06:13 AM
How do I count data in range A:A that is dependent upon criteria . h2ocats Excel Worksheet Functions 1 February 21st 05 12:55 PM


All times are GMT +1. The time now is 07:25 AM.

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"