SOLVED

Sum by month

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3170215%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3ESum%20by%20month%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3170215%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EHello%2C%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EI%20am%20having%20difficulty%20summing%20the%20table%20by%20months.%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3Eplease%20see%20attached.%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3Ethank%20you%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%5C%26quot%3Blia-inline-image-display-wrapper%22%20lia-image-align-inline%3D%22%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fgxcuf89792%2F%5C%26quot%3Bhttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348468i8E229375E0B75070%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%5C%26quot%3B%22%20role%3D%22%5C%26quot%3Bbutton%5C%26quot%3B%22%20title%3D%22Tony2021_0-1644959963235.png%22%20alt%3D%22%5C%26quot%3BTony2021_0-1644959963235.png%5C%26quot%3B%22%20%2F%3E%26lt%3B%5C%2Fspan%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3170215%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EExcel%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3170258%22%20slang%3D%22en-US%22%3ERe%3A%20Sum%20by%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3170258%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1029845%22%20target%3D%22_blank%22%3E%40Tony2021%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DSUMPRODUCT((MONTH(%24B%242%3A%24I%242)%3DMONTH(B1))*%24B%243%3A%24I%243)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMaybe%20with%20this%20formula.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

Hello, 

 

I am having difficulty summing the table by months. 

please see attached. 

thank you

Tony2021_0-1644959963235.png

 

 

 

4 Replies

@Tony2021 

=SUMPRODUCT((MONTH($B$2:$I$2)=MONTH(B1))*$B$3:$I$3)

Maybe with this formula. 

@Quadruple_Pawn 

nice. that works. 

 

I do have a follow up if you dont mindthough. In my example, I provided the amounts in the rows however in my actual database, the amounts are in 1 column.  I tested it and it seems as though that if in the amounts are in columns then what it returns is some much higher number.

 

I have attached an updated spreadsheet.
Do you have a solution for when the amounts are in columns?

 

Tony2021_0-1644962803300.png

 

best response confirmed by Tony2021 (Super Contributor)
Solution

@Tony2021 

=SUMPRODUCT((MONTH($B$2:$J$2)=MONTH(B$1))*TRANSPOSE($B$10:$B$18))

Maybe with this formula. Enter formula as arrayformula with ctrl+shift+enter if you don't work with Office365 or 2021. 

wow. That worked. thank you very much!