Need help with Sum by month
I am working on creating a summary sheet to show totals by the monthly forecast. Not sure how to connect the data correctly to this sheet.
Source smartsheet
Thanks in advance
Best Answer
-
Mike TV ✭✭✭✭✭✭
Thanks. Here's an example of how to do this from one sheet to another.
First, you're going to want to add a column on sheet 2 which takes the date and lets us know what month it falls in. Like so:
Month formula:
=MONTH([SAP ETA]@row)
Then on the first sheet you can fill it out like so. Since you're using parent/child rows, you'll want to use cell formulas instead of column formulas. That means each time you add a new Customer Account you'll want to either copy-paste the formula from the cell above or drag it down with the little box in the corner of the cell above. Here's sheet 1 finished:
The cell formula will look something like this for January:
=SUMIFS({Quantity (kg) Sheet 2}, {Plant Sheet 2}, =[Account Name]@row, {Month Sheet 2}, =1)
For the following months, you just change the number at the end to coincide with the number month. 2 for February, 3 for March, 4 for April, etc.
Then in the January for the Customer Accounts row, you can use a formula =SUM(CHILDREN()) to get a grand total of all of the accounts for January.
Answers
-
Mike TV ✭✭✭✭✭✭
Where would the data go on the first sheet? It looks like the first sheet has a monetary value (dollars $) and the second sheet has a weight in kilos. I'm not sure how you'd like to match things up onto the first sheet without some additional information.
-
@Mike TVYes, good catch. This should be in kilos. I have fixed the sheet at my end.
-
Mike TV ✭✭✭✭✭✭
Thanks. Here's an example of how to do this from one sheet to another.
First, you're going to want to add a column on sheet 2 which takes the date and lets us know what month it falls in. Like so:
Month formula:
=MONTH([SAP ETA]@row)
Then on the first sheet you can fill it out like so. Since you're using parent/child rows, you'll want to use cell formulas instead of column formulas. That means each time you add a new Customer Account you'll want to either copy-paste the formula from the cell above or drag it down with the little box in the corner of the cell above. Here's sheet 1 finished:
The cell formula will look something like this for January:
=SUMIFS({Quantity (kg) Sheet 2}, {Plant Sheet 2}, =[Account Name]@row, {Month Sheet 2}, =1)
For the following months, you just change the number at the end to coincide with the number month. 2 for February, 3 for March, 4 for April, etc.
Then in the January for the Customer Accounts row, you can use a formula =SUM(CHILDREN()) to get a grand total of all of the accounts for January.
-
@Mike TVThanks a lot. It works perfectly :)
Help Article Resources
Categories
I hope you're well and safe!<\/p>
Try something like this.<\/p>
=VLOOKUP([Context ID]@row, {Due Date}, 3,0)<\/p>
Did that work\/help? <\/p>
I hope that helps!<\/p>
Be safe, and have a fantastic week!<\/p>
Best,<\/p>
Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p> ✅Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":104508,"type":"question","name":"Countifs- if cell blank then count by other cell","excerpt":"Hi I currently have following formula counting number of projects with status completed in EU and checking base date monthly: =COUNTIFS({production date}, <=DATE(2023, 1, 31), {base eu kof}, >=DATE(2023, 1, 1), {status}, \"Completed\", {division}, \"EU\") However some projects don't have \"production date\" they've got another…","categoryID":322,"dateInserted":"2023-04-26T16:39:34+00:00","dateUpdated":"2023-04-26T16:40:08+00:00","dateLastComment":"2023-04-27T07:49:11+00:00","insertUserID":149026,"insertUser":{"userID":149026,"name":"Piotr Majkowski","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Piotr%20Majkowski","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxaJ3q-iDbfo9j8AVZRUUgAjzn0TmhSo-FiHYDkr=s96-c","dateLastActive":"2023-04-27T07:49:18+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":149026,"lastUserID":149026,"lastUser":{"userID":149026,"name":"Piotr Majkowski","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Piotr%20Majkowski","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxaJ3q-iDbfo9j8AVZRUUgAjzn0TmhSo-FiHYDkr=s96-c","dateLastActive":"2023-04-27T07:49:18+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3365110725,"url":"https:\/\/community.smartsheet.com\/discussion\/104508\/countifs-if-cell-blank-then-count-by-other-cell","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/104508\/countifs-if-cell-blank-then-count-by-other-cell","format":"Rich","lastPost":{"discussionID":104508,"commentID":373510,"name":"Re: Countifs- if cell blank then count by other cell","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/373510#Comment_373510","dateInserted":"2023-04-27T07:49:11+00:00","insertUserID":149026,"insertUser":{"userID":149026,"name":"Piotr Majkowski","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Piotr%20Majkowski","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxaJ3q-iDbfo9j8AVZRUUgAjzn0TmhSo-FiHYDkr=s96-c","dateLastActive":"2023-04-27T07:49:18+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-04-27T07:49:17+00:00","dateAnswered":"2023-04-27T07:49:11+00:00","acceptedAnswers":[{"commentID":373510,"body":" FIY for anyone struggling with similar problem in the future<\/p> like always sleep helped and i came up with solution that works:<\/p> =COUNTIFS({Production date}, <=DATE(2023, 1, 31), {Production date}, >=DATE(2023, 1, 1), {status}, \"Completed\", {division}, \"EU\") + COUNTIFS({Shipment date}, <=DATE(2023, 1, 31), {Shipment date}, >=DATE(2023, 1, 1), {status}, \"Completed\", {division}, \"EU\", {Production Date}, <>\"//www.santa-greenland.com/community/discussion/91337/\")<\/p> seems to be doing what i wanted. So basically it's gathering all projects with Production date in place and then adding projects without Production date based on the same conditions but by Shipment date<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":104511,"type":"question","name":"Help with IF, AND, THEN Formulas to change status column","excerpt":"I am stuck! I've tried multiple variations of this formula but can't seem to get anything to work. I'm looking to have the status column changed automatically based on two other columns; \"Date Required\" column which is a date and a \"No Follow Up Required\" column which is a checkbox. Here's what I'm looking for the formula…","categoryID":322,"dateInserted":"2023-04-26T17:10:50+00:00","dateUpdated":"2023-04-26T17:11:46+00:00","dateLastComment":"2023-04-26T17:53:59+00:00","insertUserID":160908,"insertUser":{"userID":160908,"name":"JayF","url":"https:\/\/community.smartsheet.com\/profile\/JayF","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-04-26T21:57:25+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":160908,"lastUserID":157684,"lastUser":{"userID":157684,"name":"ShelbyWarren","title":"Systems & Processes Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/ShelbyWarren","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ZsElWRv5fWo!urkpJ-Oilro!MkuJ6upsrhT","dateLastActive":"2023-04-27T15:01:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":38,"score":null,"hot":3365063089,"url":"https:\/\/community.smartsheet.com\/discussion\/104511\/help-with-if-and-then-formulas-to-change-status-column","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/104511\/help-with-if-and-then-formulas-to-change-status-column","format":"Rich","lastPost":{"discussionID":104511,"commentID":373396,"name":"Re: Help with IF, AND, THEN Formulas to change status column","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/373396#Comment_373396","dateInserted":"2023-04-26T17:53:59+00:00","insertUserID":157684,"insertUser":{"userID":157684,"name":"ShelbyWarren","title":"Systems & Processes Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/ShelbyWarren","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ZsElWRv5fWo!urkpJ-Oilro!MkuJ6upsrhT","dateLastActive":"2023-04-27T15:01:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-04-26T17:48:23+00:00","dateAnswered":"2023-04-26T17:39:13+00:00","acceptedAnswers":[{"commentID":373389,"body":"