ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HELP! with long function (https://www.excelbanter.com/excel-worksheet-functions/162528-help-long-function.html)

spoe

HELP! with long function
 
I need to write a function with the following parameters for a work
spreadsheet.

If A:4:A29 is between the dates 07/01/2007 and 07/31/2007, add cells D4:D29
for those dates.

Can anyone help, please, please?

--
Spoe

Bernard Liengme

HELP! with long function
 
=SUMPRODUCT(--(MONTH(A4:A29)=7), D4:D29)
For more details on SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email


"spoe" wrote in message
...
I need to write a function with the following parameters for a work
spreadsheet.

If A:4:A29 is between the dates 07/01/2007 and 07/31/2007, add cells
D4:D29
for those dates.

Can anyone help, please, please?

--
Spoe




Teethless mama

HELP! with long function
 
=SUMPRODUCT(--(MONTH(A4:A29)=7),--(YEAR(A4:A29)=2007),D4:D29)


"spoe" wrote:

I need to write a function with the following parameters for a work
spreadsheet.

If A:4:A29 is between the dates 07/01/2007 and 07/31/2007, add cells D4:D29
for those dates.

Can anyone help, please, please?

--
Spoe


Bernard Liengme

HELP! with long function
 
Good point, I forgot to check year (data could be multi-years)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Teethless mama" wrote in message
...
=SUMPRODUCT(--(MONTH(A4:A29)=7),--(YEAR(A4:A29)=2007),D4:D29)


"spoe" wrote:

I need to write a function with the following parameters for a work
spreadsheet.

If A:4:A29 is between the dates 07/01/2007 and 07/31/2007, add cells
D4:D29
for those dates.

Can anyone help, please, please?

--
Spoe




T. Valko

HELP! with long function
 
Take your pick:

=SUMIF(A4:A29,"="&DATE(2007,7,1),D4:D29)-SUMIF(A4:A29,""&DATE(2007,7,31),D4:D29)

A1 = 7/1/2007
B1 = 7/31/2007

=SUMIF(A4:A29,"="&A1,D4:D29)-SUMIF(A4:A29,""&B1,D4:D29)

=SUMPRODUCT(--(TEXT(A4:A29,"m/yyyy")="7/2007"),D4:D29)

--
Biff
Microsoft Excel MVP


"spoe" wrote in message
...
I need to write a function with the following parameters for a work
spreadsheet.

If A:4:A29 is between the dates 07/01/2007 and 07/31/2007, add cells
D4:D29
for those dates.

Can anyone help, please, please?

--
Spoe





All times are GMT +1. The time now is 11:15 PM.

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