#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jc jc is offline
external usenet poster
 
Posts: 164
Default SUMIF Criteria

I'm trying to use the SUMIF function with criteria that value must be 30 and
<=60. How would I code that with this function?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 171
Default SUMIF Criteria

Use two sumif functions... one adds up everything over 30, the other
everything over 60. Subtract to get those in (30-60]
=sumif(range,"30",sum_range) - sumif(range,"60",sum_range)

"JC" wrote:

I'm trying to use the SUMIF function with criteria that value must be 30 and
<=60. How would I code that with this function?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default SUMIF Criteria

For example, in A1 thru A5:

29
30
40
60
61

=SUMPRODUCT(A1:A5*(A1:A530)*(A1:A5<=60))
displays 100

--
Gary''s Student - gsnu200784


"JC" wrote:

I'm trying to use the SUMIF function with criteria that value must be 30 and
<=60. How would I code that with this function?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default SUMIF Criteria

Try using sumproduct. suppose your data was in A1:A100 you would write the
formula

=Sumproduct((A1:A10030)*(A1:A100<=60)*A1:A100)

"JC" wrote:

I'm trying to use the SUMIF function with criteria that value must be 30 and
<=60. How would I code that with this function?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 411
Default SUMIF Criteria

If your data is in Column A, would this formula work for you?

=IF(AND(SUM(A1330),SUM(A13<=60)),SUM(A13),0)

Dan


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default SUMIF Criteria

What value do the 3 uses of the SUM() function add to your formula, Dan?
What does that formula do that you wouldn't get from
=IF(AND(A1330,A13<=60),A13,0) ?
[You may perhaps like to look at Excel help for the SUM function, to remind
yourself that SUM takes a list of arguments and SUMs them. If you give the
SUM function only one argument, as in each of your 3 cases, the SUM is
trivial.]

Additionally, neither formula actually addresses the OP's requirement for a
SUMIF function, as you haven't actually done a SUM, and you've addressed
only one cell. Hence the SUMPRODUCT solution, or subtracting one SUMIF from
another, would seem more appropriate.
--
David Biddulph

"dan dungan" wrote in message
...
If your data is in Column A, would this formula work for you?

=IF(AND(SUM(A1330),SUM(A13<=60)),SUM(A13),0)

Dan



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 criteria help Shannan Excel Worksheet Functions 3 May 30th 07 08:01 PM
Sumif with 2 criteria Mike Excel Discussion (Misc queries) 4 May 16th 06 09:21 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF Criteria Brent Martin Excel Discussion (Misc queries) 6 January 7th 05 05:17 AM
sumif with 2 criteria Jamie Excel Worksheet Functions 2 November 11th 04 04:48 PM


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