Creating a Sum formula that is based on Month selection to Sum YTD

%3CLINGO-SUB%20id%3D%22lingo-sub-2637430%22%20slang%3D%22en-US%22%3ECreating%20a%20Sum%20formula%20that%20is%20based%20on%20Month%20selection%20to%20Sum%20YTD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2637430%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20a%20sum%20formula%20where%20the%20user%20can%20select%20a%20month%20and%20the%20sum%20would%20add%20only%20those%20amounts%20from%20January%20to%20that%20selected%20month.%26nbsp%3B%20For%20example%2C%20if%20the%20user%20types%20in%20April%2C%20the%20sum%20would%20only%20add%20the%20info%20from%20January%20thru%20April%2C%20and%20exclude%20May%20thru%20December.%26nbsp%3B%20Any%20suggestions%3F%26nbsp%3B%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2637430%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2637551%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20Sum%20formula%20that%20is%20based%20on%20Month%20selection%20to%20Sum%20YTD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2637551%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1126215%22%20target%3D%22_blank%22%3E%40Neal007%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DSUM(IF(INT(MONTH(A2%3AA15))%3D2%2CB2%3AB15))%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EComplete%20this%20formula%20with%20Ctrl%20%2B%20Shift%20%2B%20Enter%20because%20it%20is%20a%20matrix%20function.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EExample%20in%20the%20inserted%20Excel%20file.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20Community%20members%20reading%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am trying to create a sum formula where the user can select a month and the sum would add only those amounts from January to that selected month.  For example, if the user types in April, the sum would only add the info from January thru April, and exclude May thru December.  Any suggestions?  Thanks.

2 Replies

@Neal007 

=SUM(IF(INT(MONTH(A2:A15))=2,B2:B15))

Complete this formula with Ctrl + Shift + Enter because it is a matrix function.

Example in the inserted Excel file.

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

Nilolino, thank you for the suggestion. I will try it.