#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default please your help

How can I use as a criteria dates between a start and end dates in sumif
function.
I wand to sum B cells if dates in A are between 1/1/2009 and 31/3/2009.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default please your help

"BIRNET" wrote:
How can I use as a criteria dates between a start and end dates in sumif
function.
I wand to sum B cells if dates in A are between 1/1/2009 and 31/3/2009.


Well, you would write SUMIF(A1:A100,"1/1/2009",B1:B100) -
SUMIF(A1:A100,"=3/31/2009",B1:B100).

(Change to "=1/1/2009" and "3/31/2009" if you want to include data for the
start and end dates.)

But I don't know if that is considered "good practice"; generally not.
Moreover, it only works for constant dates.

I would do:

=SUMPRODUCT((A1:A100DATE(2009,1,1))*(A1:A100<DATE (2009,3,31)),B1:B100)

If the start and end dates are in C1 and C2 respectively:

=SUMPRODUCT((A1:A100C1)*(A1:A100<C2),B1:B100)

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



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