SUM cells in a column >0 based on the month and year of another column

Wellness

New Member
Joined
Oct 20, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello all, I am currently stuck on what is proving to be a complicated formula...I fear Ive been trying to many things to where now my brain is spaghetti lol.

*NOTE* Im using excel via outlook email, I dont actually have excel on my device so I couldnt use the minisheet file. I tried, SORRY =(*

Goals:
* Get J4 to SUM Specific Cells located in Cell range G3:G999999 that are based on the Month and Year of Cells A3:A999999
Example: SUM "Net Gross Totals" of only Month & Year: November, 2023 of all the Months and Years listed in Column A

my brain is fried. PLEASE HELP.
 

Attachments

  • what_formula.png
    what_formula.png
    154.6 KB · Views: 15

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
 
Last edited:
Upvote 1
Solution
Upvote 1
Another way with Power query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
    #"Removed Columns" = Table.RemoveColumns(Source,{"Column1", "Column2", "Column3", "Column4", "Column5"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"Date", type date}}),
    #"Inserted Month Name" = Table.AddColumn(#"Changed Type", "Month Name", each Date.MonthName([Date]), type text),
    #"Inserted Year" = Table.AddColumn(#"Inserted Month Name", "Year", each Date.Year([Date]), Int64.Type),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Inserted Year", {{"Year", type text}}, "en-US"),{"Month Name", "Year"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"DATE.1"),
    #"Grouped Rows" = Table.Group(#"Merged Columns", {"DATE.1"}, {{"Total", each List.Sum([Column6]), type number}})
in
    #"Grouped Rows"
 
Upvote 1
Everyone here who replied THANK YOU and I love you all for your help.

Mr. awoohaw was the first message I read and it was the first solution I tried and it worked like a charm! Thank you sir and sir's! 🥂
 
Upvote 0
Thanks for the feedback. Welcome to the Mr. Excel forum!

Best Wishes!
 
Upvote 1

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top