Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Count within a range


Hi Guys

Column 1 is a number between -1 and 30

I need to know the:
Number of occurences between -1 and 5
Number of occurences between 6 and 10
Number of occurences between 11 and 15
Number of occurences between 16 and 30

Any ideas... count if..?




*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Count within a range

=SUMPRODUCT(--(A1:A100=-1),--(A1:A100<-5))

etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darin Kramer" wrote in message
...

Hi Guys

Column 1 is a number between -1 and 30

I need to know the:
Number of occurences between -1 and 5
Number of occurences between 6 and 10
Number of occurences between 11 and 15
Number of occurences between 16 and 30

Any ideas... count if..?




*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count within a range

for a countif solution

=count(A:A)-Countif(A:A,"5")
=countif(A:A,"5")-Countif(A:A,"10")
=Countif(A:A,"10")-Countif(A:A,"15")
=Countif(A:A,"15")

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...

Hi Guys

Column 1 is a number between -1 and 30

I need to know the:
Number of occurences between -1 and 5
Number of occurences between 6 and 10
Number of occurences between 11 and 15
Number of occurences between 16 and 30

Any ideas... count if..?




*** Sent via Developersdex http://www.developersdex.com ***



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Count within a range


Perfect - THanks RP, If I wanted to add a further complication... Say
column 2 was either A, B or C so I Want all the occurences of type A
which are more than -1 and greater than 5 etc... possible...?


Regards

DK

*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Count within a range

Yes it is

=SUMPRODUCT((A1:A100=-1)*(A1:A100<=5)*(B1:B100={"A","B","C"}))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darin Kramer" wrote in message
...

Perfect - THanks RP, If I wanted to add a further complication... Say
column 2 was either A, B or C so I Want all the occurences of type A
which are more than -1 and greater than 5 etc... possible...?


Regards

DK

*** Sent via Developersdex http://www.developersdex.com ***





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count within a range

For just type A as asked it would be:

=SUMPRODUCT((A1:A100=-1)*(A1:A100<=5)*(B1:B100="A"))

or

=SUMPRODUCT((A1:A100=-1),(A1:A100<=5),--(B1:B100="A"))

--
Regards,
Tom Ogilvy


"Bob Phillips" wrote in message
...
Yes it is

=SUMPRODUCT((A1:A100=-1)*(A1:A100<=5)*(B1:B100={"A","B","C"}))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darin Kramer" wrote in message
...

Perfect - THanks RP, If I wanted to add a further complication... Say
column 2 was either A, B or C so I Want all the occurences of type A
which are more than -1 and greater than 5 etc... possible...?


Regards

DK

*** Sent via Developersdex http://www.developersdex.com ***





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Count within a range



Thanks! :)

*** Sent via Developersdex http://www.developersdex.com ***
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 Vaules in a range that appear in another range T Newbery Excel Worksheet Functions 5 February 11th 10 05:08 PM
Multiple Criteria, Count If, Sum Product to get count across range Jonathan Excel Worksheet Functions 5 January 9th 08 11:32 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
count within a range mike allen[_2_] Excel Programming 1 January 5th 05 07:18 PM


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