Sum Received Quantity Based on two criterions.

Good Morning All,

I am working on creating a formula that will sum my "Received Quantity" column when two criterions are met within a DIFFERENT data sheet. These would be criterion from two separate columns needing to be met so that I can get a total sum of those items together. I was just wondering if this would lean more towards a =SUM formula or maybe =COUNTIF/=COUNTIFS formula. Thank you for any help you all can give me.

Best Answer

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓

    @Matthew RThis info was perfect. Ok, here's how you do this:

    =SUMIFS({Received Quantity}, {Commodity Code},[email protected], {Type of Material}, HAS(@cell, "Electropolished"))

    This will sum the values in the Received Quantity column where the Commodity Code equals the Part on the row, and where the multi-select Type of Material column includes the value "Electropolished". (HAS will search for a value inside a multi-select column that matches the given text string exactly.)

    Regards,

    Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US

    链接:Smartsheet Functions Help Pages链接:Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭

    @Matthew R

    How are those criteria in the remote sheet related to the rows you'd want to SUM?

    最复杂的方法this might be to add some kind of indicator column on your main sheet that tells you if the criteria are met in the remote sheet, and use that as the criteria for SUMIF to use.

    The more info you share here (column names, types, of data, how they relate to one another) the better help you'll get.

    Regards,

    Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US

    链接:Smartsheet Functions Help Pages链接:Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • TEST1_LI.jpg
    TEST2_LI.jpg

    Picture one is the metric sheet where I am trying to track my received quantities of my two specified criterion columns from the data sheet in the second picture.

    Picture two is the data sheet where I am collecting my data.

    I am trying to SUM my "Received Quantity" column on my main metric sheet in picture one IF AND ONLY IF my "Commodity Code" column states "9400 FG - HEALTH CARE" and when my "Type Of Material" column states "Electropolished", hopefully this was a little more clear and what I am after. I have a picture of the formula I have started in the first picture as well, you will find it in the "Received Quantity" column in that picture.

    Thank you for your response Jeff and any and all help you can provide!

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓

    @Matthew RThis info was perfect. Ok, here's how you do this:

    =SUMIFS({Received Quantity}, {Commodity Code},[email protected], {Type of Material}, HAS(@cell, "Electropolished"))

    This will sum the values in the Received Quantity column where the Commodity Code equals the Part on the row, and where the multi-select Type of Material column includes the value "Electropolished". (HAS will search for a value inside a multi-select column that matches the given text string exactly.)

    Regards,

    Jeff Reisman,IT Business Analyst & Project Coordinator,Mitsubishi Electric Trane US

    链接:Smartsheet Functions Help Pages链接:Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • That is exactly what I was after in regards to this formula. I plugged in the formula into my sheet and it worked perfectly! Very much appreciate your help!

My suggestion would be to just hide the unwanted columns.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":108465,"type":"question","name":"Auto number column giving duplicated numbers","excerpt":"Hi All, I have an auto number column that I use in a formula to get row# but that auto number column is producing duplicate numbers and therefore messing up the formula. Does anyone know why it is giving duplicate numbers? Thanks.","snippet":"Hi All, I have an auto number column that I use in a formula to get row# but that auto number column is producing duplicate numbers and therefore messing up the formula. Does…","categoryID":321,"dateInserted":"2023-08-03T12:12:56+00:00","dateUpdated":null,"dateLastComment":"2023-08-03T13:29:36+00:00","insertUserID":154030,"insertUser":{"userID":154030,"name":"Carmen W","url":"https:\/\/community.smartsheet.com\/profile\/Carmen%20W","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-03T13:28:19+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":154030,"lastUser":{"userID":154030,"name":"Carmen W","url":"https:\/\/community.smartsheet.com\/profile\/Carmen%20W","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-03T13:28:19+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":22,"score":null,"hot":3382137752,"url":"https:\/\/community.smartsheet.com\/discussion\/108465\/auto-number-column-giving-duplicated-numbers","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108465\/auto-number-column-giving-duplicated-numbers","format":"Rich","lastPost":{"discussionID":108465,"commentID":388692,"name":"Re: Auto number column giving duplicated numbers","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/388692#Comment_388692","dateInserted":"2023-08-03T13:29:36+00:00","insertUserID":154030,"insertUser":{"userID":154030,"name":"Carmen W","url":"https:\/\/community.smartsheet.com\/profile\/Carmen%20W","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-03T13:28:19+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-03T13:29:48+00:00","dateAnswered":"2023-08-03T13:15:41+00:00","acceptedAnswers":[{"commentID":388687,"body":"

I got it. Change the Starting number to the number you want for a new row. Hope this works.<\/p>

\n
\n \n \"Screenshot_20230803-201230.png\"<\/img><\/a>\n <\/div>\n<\/div>\n


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":108418,"type":"question","name":"Row Report from Sheets in Workspace","excerpt":"If I have a set of folders under a workspace with different type sheets. Some will be Project plans, others may be RAID\/CRAID Logs, etc. Is there a way to create a row report of all the RAID\/CRAID Logs only, and separate from a similar row report with all the Project Plan line items?","snippet":"If I have a set of folders under a workspace with different type sheets. Some will be Project plans, others may be RAID\/CRAID Logs, etc. Is there a way to create a row report of…","categoryID":321,"dateInserted":"2023-08-02T14:40:11+00:00","dateUpdated":null,"dateLastComment":"2023-08-02T16:17:51+00:00","insertUserID":159779,"insertUser":{"userID":159779,"name":"BStump","title":"","url":"https:\/\/community.smartsheet.com\/profile\/BStump","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!cujqB1-W9go!xFsrMbvl6Mo!D9rNxJuoFT5","dateLastActive":"2023-08-02T21:15:16+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":126800,"lastUser":{"userID":126800,"name":"Kelly P.","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-02T16:17:14+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":40,"score":null,"hot":3381983282,"url":"https:\/\/community.smartsheet.com\/discussion\/108418\/row-report-from-sheets-in-workspace","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108418\/row-report-from-sheets-in-workspace","format":"Rich","tagIDs":[265],"lastPost":{"discussionID":108418,"commentID":388532,"name":"Re: Row Report from Sheets in Workspace","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/388532#Comment_388532","dateInserted":"2023-08-02T16:17:51+00:00","insertUserID":126800,"insertUser":{"userID":126800,"name":"Kelly P.","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-02T16:17:14+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-02T16:16:11+00:00","dateAnswered":"2023-08-02T16:04:24+00:00","acceptedAnswers":[{"commentID":388524,"body":"

@BStump<\/a> <\/p>

This method does produce separate reports:<\/p>

The Project Plan report will include this filter: \"Sheet Type\" is one of \"Project Plan\" -- this filter will exclude rows coming from the RAID Log (and all other types of sheets) because those other sheets will have a value in their \"Sheet Type\" column that is not \"Project Plan.\" <\/p>

The RAID Log report will include this filter: \"Sheet Type\" is one of \"RAID Log\" -- this filter will exclude rows coming from the Project Plan (and all other types of sheets) because those other sheets will have a value in their \"Sheet Type\" column that is not \"RAID Log.\" <\/p>

Thus, each report will include a filter rule specifying that only rows with its own sheet type can be included.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":265,"urlcode":"Reports","name":"Reports"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=321&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":4910,"limit":3},"title":"Trending in Smartsheet Basics","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Smartsheet Basics