ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sumproduct (https://www.excelbanter.com/excel-discussion-misc-queries/121996-sumproduct.html)

RGlade

sumproduct
 
I am using this function: =sumproduct((month(B5:B412)=1*D5:D412)

I can't get this function to work with Feburary, March....ect.

Basically I want "if B5:B412's date is January then add the cells in D5:D412
with the sum the D cells "answer" in cell E2"
Same with February, only answer in F2
Same with March, only answer in G2

What am I doing wrong?



Elkar

sumproduct
 
You're very close, just missing a couple parenthesis.

=SUMPRODUCT((MONTH(B5:B412)=1)*(D5:D412))

HTH,
Elkar


"RGlade" wrote:

I am using this function: =sumproduct((month(B5:B412)=1*D5:D412)

I can't get this function to work with Feburary, March....ect.

Basically I want "if B5:B412's date is January then add the cells in D5:D412
with the sum the D cells "answer" in cell E2"
Same with February, only answer in F2
Same with March, only answer in G2

What am I doing wrong?



RGlade

sumproduct
 
Thank you very much. It worked.

"Elkar" wrote:

You're very close, just missing a couple parenthesis.

=SUMPRODUCT((MONTH(B5:B412)=1)*(D5:D412))

HTH,
Elkar


"RGlade" wrote:

I am using this function: =sumproduct((month(B5:B412)=1*D5:D412)

I can't get this function to work with Feburary, March....ect.

Basically I want "if B5:B412's date is January then add the cells in D5:D412
with the sum the D cells "answer" in cell E2"
Same with February, only answer in F2
Same with March, only answer in G2

What am I doing wrong?




All times are GMT +1. The time now is 10:45 PM.

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