Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default SumIf( range, criteria, sum_range )

Hi,

i'm using 3 columns in excel 2007

"dates" - "code" - "money"

I use sumIF to get the total of money for each code. This works great.

But I would like to do so between two dates from column "dates".

To sumIF the table between two dates...

How could I do this ?


Thanks,

Andy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default SumIf( range, criteria, sum_range )

It is better to use SUMPRODUCT

=SUMPRODUCT(--(A1:A100=DATEVALUE("1/1/09")),--(A1:A100<DATEVALUE("3/1/09")),C1:C100)

"andré C." wrote:

Hi,

i'm using 3 columns in excel 2007

"dates" - "code" - "money"

I use sumIF to get the total of money for each code. This works great.

But I would like to do so between two dates from column "dates".

To sumIF the table between two dates...

How could I do this ?


Thanks,

Andy

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 73
Default SumIf( range, criteria, sum_range )

Use cells to hold your criteria:

E2 = lower date boundary
F2 = upper date boundary
G2 = some code

Then:

=SUMIFS(Money,Dates,"="&E2,Dates,"<="&F2,Codes,G2 )


--
Biff
Microsoft Excel MVP


"andré C." wrote:

Hi,

i'm using 3 columns in excel 2007

"dates" - "code" - "money"

I use sumIF to get the total of money for each code. This works great.

But I would like to do so between two dates from column "dates".

To sumIF the table between two dates...

How could I do this ?


Thanks,

Andy

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default SumIf( range, criteria, sum_range )

Hi,

I would also consider using reference cell with SUMPRODUCT

=SUMPRODUCT((A1:A100=F1)*(A1:A100<=G1)*C1:C100)

Where F1 contains the start date, G1 the end data column A the dates and
column C the values.

If you are also testing with Code at the same time then

=SUMPRODUCT((A1:A100=F1)*(A1:A100<=G1)*(B1:B100=H 1)*C1:C100)

Where H1 contains the code and B1:B100 the range with codes.


A minor point - its not just better to use SUMPRODUCT rather than SUMIF in
2003 or earlier, you can't do it with SUMIF, so you must resort to another
approach. In 2007 the new SUMIFS (and COUNTIFS, AVERAGEIF) functions allows
multiple criteria.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"andré C." wrote:

Hi,

i'm using 3 columns in excel 2007

"dates" - "code" - "money"

I use sumIF to get the total of money for each code. This works great.

But I would like to do so between two dates from column "dates".

To sumIF the table between two dates...

How could I do this ?


Thanks,

Andy

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 multiple critera range and sum_range DocBrown Excel Worksheet Functions 5 December 21st 08 06:54 AM
SUMIF - Sum_Range is misleading Epinn Excel Worksheet Functions 3 October 29th 06 08:53 AM
SUMIF with the Sum_range across several colums D Excel Worksheet Functions 7 September 25th 06 04:00 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM
SUMIF with multi-column sum_range Kevin B Excel Worksheet Functions 2 November 17th 04 02:17 AM


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