Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jeremy via OfficeKB.com
 
Posts: n/a
Default sumif when criteria is a range

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to <10 ).

Thanks.


--
Message posted via http://www.officekb.com
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=SUMPRODUCT(--(rng=0),--(rng<10), rng)

another:

=COUNTIF(rng,"=0") - COUNTIF(rng, "=10")

a third

=COUNTIF(rng, "<10") - COUNTIF(rng, "<0")



In article ,
"jeremy via OfficeKB.com" wrote:

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to <10 ).

Thanks.

  #3   Report Post  
RagDyeR
 
Posts: n/a
Default

The Sumproduct formula that you quoted in your earlier post will do the same
job for this by just adding an additional argument:

=SUMPRODUCT(($W$9:$W$272=0)*($W$9:$W$272<10)*$W$9 :$W$272)

OR

=SUMIF($W$9:$W$272,"0")-SUMIF($W$9:$W$272,"=10")

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"jeremy via OfficeKB.com" wrote in message
...
I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to <10 ).

Thanks.


--
Message posted via http://www.officekb.com


  #4   Report Post  
jeremy via OfficeKB.com
 
Posts: n/a
Default

Sorry, I forgot to specify that I want to sum a second column if the first
meets the criteria range...

Eg. =SUMIF($BE$9:$BE$272, 0=<X<10, ($BF$9:$BF$272))

Of course, 0=<X<10 doesn't work.....

Thanks....


JE McGimpsey wrote:
One way:

=SUMPRODUCT(--(rng=0),--(rng<10), rng)

another:

=COUNTIF(rng,"=0") - COUNTIF(rng, "=10")

a third

=COUNTIF(rng, "<10") - COUNTIF(rng, "<0")

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to <10 ).

Thanks.



--
Message posted via http://www.officekb.com
  #5   Report Post  
RagDyeR
 
Posts: n/a
Default

John,

Countif ?
Confusing the OP's 2 posts?<g
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

"JE McGimpsey" wrote in message
...
One way:

=SUMPRODUCT(--(rng=0),--(rng<10), rng)

another:

=COUNTIF(rng,"=0") - COUNTIF(rng, "=10")

a third

=COUNTIF(rng, "<10") - COUNTIF(rng, "<0")



In article ,
"jeremy via OfficeKB.com" wrote:

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to

<10 ).

Thanks.





  #6   Report Post  
RagDyeR
 
Posts: n/a
Default

Again, you can use your original formula and just change the range that you
wish to total:

=SUMPRODUCT(($BE$9:$BE$272=0)*($BE$9:$BE$272<10)* $BF$9:$BF$272)

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"jeremy via OfficeKB.com" wrote in message
...
Sorry, I forgot to specify that I want to sum a second column if the first
meets the criteria range...

Eg. =SUMIF($BE$9:$BE$272, 0=<X<10, ($BF$9:$BF$272))

Of course, 0=<X<10 doesn't work.....

Thanks....


JE McGimpsey wrote:
One way:

=SUMPRODUCT(--(rng=0),--(rng<10), rng)

another:

=COUNTIF(rng,"=0") - COUNTIF(rng, "=10")

a third

=COUNTIF(rng, "<10") - COUNTIF(rng, "<0")

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to

<10 ).

Thanks.



--
Message posted via http://www.officekb.com


  #7   Report Post  
JE McGimpsey
 
Posts: n/a
Default

In article ,
"RagDyeR" wrote:

Countif ?


Yup - should have been SUMIF()
  #8   Report Post  
jeremy via OfficeKB.com
 
Posts: n/a
Default

thanks--that was brillant...

RagDyeR wrote:
The Sumproduct formula that you quoted in your earlier post will do the same
job for this by just adding an additional argument:

=SUMPRODUCT(($W$9:$W$272=0)*($W$9:$W$272<10)*$W$ 9:$W$272)

OR

=SUMIF($W$9:$W$272,"0")-SUMIF($W$9:$W$272,"=10")

I'm still an excel newbie--I searched the archives but couldn't find the
answer...

How do I use sumif function when the criteria is a range (eg. =0 to <10 ).

Thanks.



--
Message posted via http://www.officekb.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
SUMIF with AND for range and criteria davidm_ba Excel Worksheet Functions 3 August 2nd 05 01:31 PM
SUMIF using two columns in both Range and Criteria Gordon Excel Discussion (Misc queries) 5 June 29th 05 06:56 PM
SUMIF using two columns in both Range and Criteria Gordon Excel Worksheet Functions 5 June 29th 05 06:56 PM
SUMIF with only one criteria cell within range Stan Excel Discussion (Misc queries) 5 December 16th 04 10:12 PM
SUMIF multiple criteria in 1 range Mike@Q Excel Worksheet Functions 5 November 26th 04 03:55 PM


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