ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Changing a Formula (https://www.excelbanter.com/excel-worksheet-functions/203002-changing-formula.html)

Mark

Changing a Formula
 
I am using the following formula to add up a series of cells by a specific
month. The formula is:
=SUMPRODUCT((MONTH(RBS!A$2:A$1038)=5)*(RBS!N$2:O$1 038))

I now wish to add up the cells by month and year. For example April 08, May
08 etc.

Thank you.

David Biddulph[_2_]

Changing a Formula
 
Include a YEAR() test as well as your MONTH() test.
--
David Biddulph

"Mark" wrote in message
...
I am using the following formula to add up a series of cells by a specific
month. The formula is:
=SUMPRODUCT((MONTH(RBS!A$2:A$1038)=5)*(RBS!N$2:O$1 038))

I now wish to add up the cells by month and year. For example April 08,
May
08 etc.

Thank you.




Pete_UK

Changing a Formula
 
You can do that like this:

=SUMPRODUCT((YEAR(RBS!A$2:A$1038)=2008)*(MONTH(RBS !A$2:A$1038)=4)*(RBS!
N$2:O$1038))

for April 2008.

Hope this helps.

Pete

On Sep 18, 3:07*pm, Mark wrote:
I am using the following formula to add up a series of cells by a specific
month. The formula is:
=SUMPRODUCT((MONTH(RBS!A$2:A$1038)=5)*(RBS!N$2:O$1 038))

I now wish to add up the cells by month and year. For example April 08, May
08 etc.

Thank you.




All times are GMT +1. The time now is 12:22 AM.

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