#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sumif formula

How do you write a sumif formula using a range for the criteria. For example:
=sumif(a20:a1000,b13:b14,c20:c1000) which does not seem to work. My
spreadsheet has a series of dates in column a with corresponding values
column c and I want to sum column c for a particular range of dates defined
by b13 and b14. A typical range would be a month. My spreadsheet will have
dates and values and I want to determine sums for certain months.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumif formula

One way...

B13 = lower date boundary
B14 = upper date boundary

=SUMPRODUCT(--(A20:A1000=B13),--(A20:A1000<=B14),C20:C1000)

--
Biff
Microsoft Excel MVP


"Ron0210" wrote in message
...
How do you write a sumif formula using a range for the criteria. For
example:
=sumif(a20:a1000,b13:b14,c20:c1000) which does not seem to work. My
spreadsheet has a series of dates in column a with corresponding values
column c and I want to sum column c for a particular range of dates
defined
by b13 and b14. A typical range would be a month. My spreadsheet will
have
dates and values and I want to determine sums for certain months.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sumif formula

If you want to sum based on a date range:

b13 = lower boundary date
b14 = upper boundary date

=SUMIF(a20:a1000,"="&b13,c20:c1000)-SUMIF(a20:a1000,"=<"&b14,c20:c1000)

Note that the boundary dates are included in the sum.
Format as General or Number

Credit to: --
Biff
Microsoft Excel MVP


"Ron0210" wrote:

How do you write a sumif formula using a range for the criteria. For example:
=sumif(a20:a1000,b13:b14,c20:c1000) which does not seem to work. My
spreadsheet has a series of dates in column a with corresponding values
column c and I want to sum column c for a particular range of dates defined
by b13 and b14. A typical range would be a month. My spreadsheet will have
dates and values and I want to determine sums for certain months.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumif formula

=SUMIF(a20:a1000,"="&b13,c20:c1000)-SUMIF(a20:a1000,"=<"&b14,c20:c1000)

The comparison operator in the 2nd SUMIF should be "greater than":

=SUMIF(A20:A1000,"="&B13,C20:C1000)-SUMIF(A20:A1000,""&B14,C20:C1000)

--
Biff
Microsoft Excel MVP


"DMcDConsult" wrote in message
...
If you want to sum based on a date range:

b13 = lower boundary date
b14 = upper boundary date

=SUMIF(a20:a1000,"="&b13,c20:c1000)-SUMIF(a20:a1000,"=<"&b14,c20:c1000)

Note that the boundary dates are included in the sum.
Format as General or Number

Credit to: --
Biff
Microsoft Excel MVP


"Ron0210" wrote:

How do you write a sumif formula using a range for the criteria. For
example:
=sumif(a20:a1000,b13:b14,c20:c1000) which does not seem to work. My
spreadsheet has a series of dates in column a with corresponding values
column c and I want to sum column c for a particular range of dates
defined
by b13 and b14. A typical range would be a month. My spreadsheet will
have
dates and values and I want to determine sums for certain months.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumif formula

The comparison operator in the 2nd SUMIF should be "greater than".

Either will work but the "greater than" comparison seems more intuitive (at
least, to me!).

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
=SUMIF(a20:a1000,"="&b13,c20:c1000)-SUMIF(a20:a1000,"=<"&b14,c20:c1000)


The comparison operator in the 2nd SUMIF should be "greater than":

=SUMIF(A20:A1000,"="&B13,C20:C1000)-SUMIF(A20:A1000,""&B14,C20:C1000)

--
Biff
Microsoft Excel MVP


"DMcDConsult" wrote in message
...
If you want to sum based on a date range:

b13 = lower boundary date
b14 = upper boundary date

=SUMIF(a20:a1000,"="&b13,c20:c1000)-SUMIF(a20:a1000,"=<"&b14,c20:c1000)

Note that the boundary dates are included in the sum.
Format as General or Number

Credit to: --
Biff
Microsoft Excel MVP


"Ron0210" wrote:

How do you write a sumif formula using a range for the criteria. For
example:
=sumif(a20:a1000,b13:b14,c20:c1000) which does not seem to work. My
spreadsheet has a series of dates in column a with corresponding values
column c and I want to sum column c for a particular range of dates
defined
by b13 and b14. A typical range would be a month. My spreadsheet will
have
dates and values and I want to determine sums for certain months.





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 Formula JKVA Excel Worksheet Functions 7 December 2nd 09 05:59 PM
Formula Help -- SUMIF Evan Excel Discussion (Misc queries) 4 May 13th 09 08:47 PM
Nesting a sumproduct formula within a sumif formula. jerrymcm Excel Discussion (Misc queries) 2 October 3rd 07 03:35 PM
multiply formula where 1 cell has a (sumif) formula as a result kcip Excel Worksheet Functions 1 May 3rd 07 07:41 AM
Is there a MAXIF formula similar to the SUMIF formula? tlc Excel Discussion (Misc queries) 2 March 13th 06 08:07 PM


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