#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Countif & Sumif

how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif & Sumif

For count:
=SUM(COUNTIF(A:A,{"100","=200"})*{1,-1})

For sum:
=SUM(SUMIF(A:A,{"100","=200"})*{1,-1})


"JulesHR" wrote:

how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Countif & Sumif

Jules,

=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"200")
=COUNTIF(Rangewithnumbers,"100")-COUNTIF(Rangewithnumbers,"200")

Though you may want:

=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"200")
=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"=200")
=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"=200")

boundaries issues....

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Countif & Sumif

Ok, I get it thanks. Now what I want to do is add all the values in the range
i.e. if there was a number of 150 then 50 would be counted in the range of
100 to 200.

Does that make sense?

"Bernie Deitrick" wrote:

Jules,

=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"200")
=COUNTIF(Rangewithnumbers,"100")-COUNTIF(Rangewithnumbers,"200")

Though you may want:

=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"200")
=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"=200")
=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"=200")

boundaries issues....

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Countif & Sumif

Would your desired result for 125 be 25 or 75? 150 is 50 greater than 100, and 50 less than 200,
so I'm not sure what you want...

Either

=Number - LowerLimit

or

=UpperLimit - Number

will give you the answer you want.

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
Ok, I get it thanks. Now what I want to do is add all the values in the range
i.e. if there was a number of 150 then 50 would be counted in the range of
100 to 200.

Does that make sense?

"Bernie Deitrick" wrote:

Jules,

=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"200")
=COUNTIF(Rangewithnumbers,"100")-COUNTIF(Rangewithnumbers,"200")

Though you may want:

=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"200")
=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"=200")
=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"=200")

boundaries issues....

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Countif & Sumif

Ok, I get it thanks. Now what I want to do is add all the values in the range
i.e. if there was a number of 150 then 50 would be counted in the range of
100 to 200, or if 125 was the number then 25 would be counted.

Does that make sense?


"Teethless mama" wrote:

For count:
=SUM(COUNTIF(A:A,{"100","=200"})*{1,-1})

For sum:
=SUM(SUMIF(A:A,{"100","=200"})*{1,-1})


"JulesHR" wrote:

how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Countif & Sumif

for 125 it should count 25. The formula you gave in you last post, where
would they be entered? I don't follow.

"Bernie Deitrick" wrote:

Would your desired result for 125 be 25 or 75? 150 is 50 greater than 100, and 50 less than 200,
so I'm not sure what you want...

Either

=Number - LowerLimit

or

=UpperLimit - Number

will give you the answer you want.

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
Ok, I get it thanks. Now what I want to do is add all the values in the range
i.e. if there was a number of 150 then 50 would be counted in the range of
100 to 200.

Does that make sense?

"Bernie Deitrick" wrote:

Jules,

=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"200")
=COUNTIF(Rangewithnumbers,"100")-COUNTIF(Rangewithnumbers,"200")

Though you may want:

=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"200")
=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"=200")
=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"=200")

boundaries issues....

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Countif & Sumif

Jules,

Let's say that you enter the 125 into cell A2. In another cell, use the formula

=A2-100

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
for 125 it should count 25. The formula you gave in you last post, where
would they be entered? I don't follow.

"Bernie Deitrick" wrote:

Would your desired result for 125 be 25 or 75? 150 is 50 greater than 100, and 50 less than
200,
so I'm not sure what you want...

Either

=Number - LowerLimit

or

=UpperLimit - Number

will give you the answer you want.

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
Ok, I get it thanks. Now what I want to do is add all the values in the range
i.e. if there was a number of 150 then 50 would be counted in the range of
100 to 200.

Does that make sense?

"Bernie Deitrick" wrote:

Jules,

=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"200")
=COUNTIF(Rangewithnumbers,"100")-COUNTIF(Rangewithnumbers,"200")

Though you may want:

=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"200")
=SUMIF(Rangewithnumbers,"100")-SUMIF(Rangewithnumbers,"=200")
=SUMIF(Rangewithnumbers,"=100")-SUMIF(Rangewithnumbers,"=200")

boundaries issues....

HTH,
Bernie
MS Excel MVP


"JulesHR" wrote in message
...
how do i doa formula that will count or sum a bunch of numbers that are
between a particular range. i.e. 100 but < 200 ?








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
SUMIF/COUNTIF Tatebana Excel Discussion (Misc queries) 3 February 16th 07 01:50 PM
COUNTIF or SUMIF or ?? croakingtoad Excel Worksheet Functions 2 November 28th 05 03:05 PM
Countif and sumif Visual Excel Discussion (Misc queries) 19 August 10th 05 05:59 PM
{} SumIf and CountIf SS Excel Worksheet Functions 5 May 24th 05 09:19 PM
Countif, Sumif reno Excel Worksheet Functions 2 February 12th 05 02:31 AM


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

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"