ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUMIF USING DATES (https://www.excelbanter.com/excel-discussion-misc-queries/3234-sumif-using-dates.html)

RayG

SUMIF USING DATES
 
HI,

I need to sum a colum of numbers in cells M5:M33 if it is between the dates
1/1/05 and 1/31/05 dates are in cells C5:C33.
In other words in January.

THANKS

Aladin Akyurek

=SUMIF($M$5:$M$33,"="&A5)-SUMIF($M$5:$M$33,""&B5)

where A5 houses 1/1/05 and B5 either 1/31/05 or the formula:

=DATE(YEAR(A5),MONTH(A5)+1,0)


RayG wrote:
HI,

I need to sum a colum of numbers in cells M5:M33 if it is between the dates
1/1/05 and 1/31/05 dates are in cells C5:C33.
In other words in January.

THANKS


Aladin Akyurek

Correction...

=SUMIF($C$5:$C$33,"="&A5,$M$5:$M$33)-SUMIF($C$5:$C$33,""&B5,$M$5:$M$33)

where A5 houses 1/1/05 and B5 either 1/31/05 or the formula:

=DATE(YEAR(A5),MONTH(A5)+1,0)

Aladin Akyurek wrote:
=SUMIF($M$5:$M$33,"="&A5)-SUMIF($M$5:$M$33,""&B5)

where A5 houses 1/1/05 and B5 either 1/31/05 or the formula:

=DATE(YEAR(A5),MONTH(A5)+1,0)


RayG wrote:

HI,

I need to sum a colum of numbers in cells M5:M33 if it is between the
dates 1/1/05 and 1/31/05 dates are in cells C5:C33.
In other words in January.

THANKS


Don Guillett

try
=sumproduct((month(c5:c33)=1)*m5:m33)

--
Don Guillett
SalesAid Software

"RayG" wrote in message
...
HI,

I need to sum a colum of numbers in cells M5:M33 if it is between the

dates
1/1/05 and 1/31/05 dates are in cells C5:C33.
In other words in January.

THANKS




Paulw2k

Use

=SUMPRODUCT((MONTH(C5:C33)=1)*(M5:M33))





"RayG" wrote in message
...
HI,

I need to sum a colum of numbers in cells M5:M33 if it is between the
dates
1/1/05 and 1/31/05 dates are in cells C5:C33.
In other words in January.

THANKS





All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com