Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KG
 
Posts: n/a
Default Counting if numbers fall within a specified range

For a range of cells containing percentages, how can I use COUNTIF to count
those cells whose values fall between 90% and 110% ?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You could count the number = .9 and subtract the ones 1.10
=countif(a1:a10,"=.9") - countif(a1:a10,"1.1")

Or you could count the ones that are trapped between those numbers:
=SUMPRODUCT(--(A1:A10=0.9),--(A1:A10<1.1))

=sumproduct() likes to work with numbers. The -- converts trues and falses to
1's and 0's.





KG wrote:

For a range of cells containing percentages, how can I use COUNTIF to count
those cells whose values fall between 90% and 110% ?


--

Dave Peterson
  #3   Report Post  
Alan
 
Posts: n/a
Default

One way,
=SUMPRODUCT((A1:A100=0.9)*(A1:A100<=1.1))
Regards,
Alan.
"KG" wrote in message
...
For a range of cells containing percentages, how can I use COUNTIF to
count
those cells whose values fall between 90% and 110% ?



  #4   Report Post  
Cutter
 
Posts: n/a
Default


Assuming you want to exclude values that equal 90 and 110, try this:

=COUNTIF(A1:A100,"90)-COUNTIF(A1:A100,"109")

Change the range A1:A100 to suit your needs


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=466499

  #5   Report Post  
KG
 
Posts: n/a
Default

Thank you. I'll try both methods

"Dave Peterson" wrote:

You could count the number = .9 and subtract the ones 1.10
=countif(a1:a10,"=.9") - countif(a1:a10,"1.1")

Or you could count the ones that are trapped between those numbers:
=SUMPRODUCT(--(A1:A10=0.9),--(A1:A10<1.1))

=sumproduct() likes to work with numbers. The -- converts trues and falses to
1's and 0's.





KG wrote:

For a range of cells containing percentages, how can I use COUNTIF to count
those cells whose values fall between 90% and 110% ?


--

Dave Peterson

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 comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM
Counting Numbers in an Interval Leslie Coover Excel Worksheet Functions 3 August 4th 05 06:04 AM
Find Median of Positive numbers only in Range MichaelC Excel Worksheet Functions 4 June 24th 05 03:06 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 01:22 PM.

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"