SUMIF/SUMIFS based on criteria

Hi!


How do I sum a specific category (Primary Column) with reference to a separate sheet. I keep getting multiple errors:


Annotation.png


Answers

  • Debbie Sawyer
    Debbie Sawyer ✭✭✭✭✭✭

    HI Jessintha

    I'd be happy to help, but would need a little more information about the column that you are wanting to SUM and the condition that needs to meet true inorder for the value to be relevant to the function.

    When you start a function as soon as you have type the =FUNCTIONNAME( bit a helper tool opens up on your screen. To reference another sheet click the blue link in the helper and a linking dialog box opens up enabling you to select the range required.

    If you let us know which columns value you want to add and the condition that needs to be met, I'm sure you'll get your function really quickly :)

    Kind regards

    Debbie SawyerConsultant & Training Manager

    RaFLZADwxPlIdaUSlkVwf4pKuVBIBnNkQjN9U6RSHg8na7ayJNR2BK6IKWyXZ8c2uUWi-gGwDnUQrryXTDiBx8kyRSnEjBqvEnmOJAIGq17AnBPTtcbK5oXRBb2IUcqChOToQtr4

  • Annotation1.png

    Hi Debbie. I'm looking to sum in column c84 by looking up primary column in a separate sheet for said period.

  • Debbie Sawyer
    Debbie Sawyer ✭✭✭✭✭✭

    Thank you

    I'm still not certain which cell you are referring to by c84 - is that [Primary Column]84 or [Column4]84?

    Whichever... try using

    =SUMIFS([Column to SUM]:[Column to SUM],{Start Date Range},>=[Start Date]@row,{End Date Range},<=[End Date]@row)

    Would this work? I'm still not 100% certain on the requirement! sorry

    SUMIFS is the function to use to total values based on more than 1 criteria meeting true. { } surround ranges of cells from other sheets and are entered into a formula from using the Blue Link Reference tool from within the formula helper, [ ] Column names typically have square brackets around them (if they contain a space or end in a number). @row will take the value from the row that the formula result is being entered into.

    I hope these pointers will help you find your resolution.

    Feel free to come back if you think I can help futher.

    Kind regards

    Debbie

  • The formula returned unparseble. I'm trying to Sum Value in Primary Column 84 from another sheet.


    =条件求和({每周商店Visit Update Range 41}:{Weekly Shop Visit Update Range 41},{Weekly Shop Visit Update Range 1},>=[Start Date][email protected],{Weekly Shop Visit Update 31},<=[End Date][email protected], {Weekly Shop Visit Update Range 39}, [Primary Column]84)

  • Debbie Sawyer
    Debbie Sawyer ✭✭✭✭✭✭

    Hi

    The [Start Date][email protected]will be causing an issue. You either need it to be the @row statement OR use a row number like 84...

    Change the references that use both to either the number or the @row...

    i.e. use either:

    =条件求和({每周商店Visit Update Range 41}:{Weekly Shop Visit Update Range 41},{Weekly Shop Visit Update Range 1},>=[Start Date]@row,{Weekly Shop Visit Update 31},<=[End Date]@row, {Weekly Shop Visit Update Range 39}, [Primary Column]84)

    or

    =条件求和({每周商店Visit Update Range 41}:{Weekly Shop Visit Update Range 41},{Weekly Shop Visit Update Range 1},>=[Start Date]@row,{Weekly Shop Visit Update 31},<=[End Date]@row, {Weekly Shop Visit Update Range 39}, [Primary Column]84)

    Do either of these work?

  • hi Debbie

    I tried both and using row number with error #unparseable

    =条件求和({每周商店Visit Update Range 41}:{Weekly Shop Visit Update Range 41},{Weekly Shop Visit Update Range 1},>=[Start Date]84,{Weekly Shop Visit Update 31},<=[End Date]84, {Weekly Shop Visit Update Range 39}, [Primary Column]84)

  • Debbie Sawyer
    Debbie Sawyer ✭✭✭✭✭✭

    Hi@Jessintha内森

    Can you confirm if theBold Italicarea is a range of cells or just one cell...

    =条件求和({每周商店Visit Update Range 41}:{Weekly Shop Visit Update Range 41},{Weekly Shop Visit Update Range 1},>=[Start Date]84,{Weekly Shop Visit Update 31},<=[End Date]84, {Weekly Shop Visit Update Range 39}, [Primary Column]84)

    If it is a range - check your range to ensure that it is set up in the same way as your other 3 ranges in this formula. If it is a cell re-write it like this[Weekly Shop Visit Update]31

    So tricky to trouble shoot when you can't see the sheets! :)

    Good luck

    Kind regards

    Debbie

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册临时late!
@Kris Peeters<\/a> <\/p>

you should be able to use =Countifs([Al Javor]@row:[Lisa Young]@row,\"1 - High\")<\/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":108307,"type":"question","name":"Formula to Average Performance Score for Various Service Categories","excerpt":"I am trying to create a formula that averages the performance score of various service categories. For example, whenever the service category (drop down box) has \"civil engineer\" selected, I want a running formula that averages all the civil engineer ratings. I have tried using the =averageif() formula, but I continue to…","snippet":"I am trying to create a formula that averages the performance score of various service categories. For example, whenever the service category (drop down box) has \"civil engineer\"…","categoryID":322,"dateInserted":"2023-07-31T15:35:13+00:00","dateUpdated":"2023-07-31T15:48:17+00:00","dateLastComment":"2023-07-31T18:57:50+00:00","insertUserID":164346,"insertUser":{"userID":164346,"name":"ullkay95","url":"https:\/\/community.smartsheet.com\/profile\/ullkay95","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!bmtAmxLQVL0!e6DCx07vJ9c!25n9oP55COS","dateLastActive":"2023-07-31T18:59:28+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":164346,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-07-31T19:57:04+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":11,"countViews":34,"score":null,"hot":3381654183,"url":"https:\/\/community.smartsheet.com\/discussion\/108307\/formula-to-average-performance-score-for-various-service-categories","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108307\/formula-to-average-performance-score-for-various-service-categories","format":"Rich","lastPost":{"discussionID":108307,"commentID":388084,"name":"Re: Formula to Average Performance Score for Various Service Categories","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/388084#Comment_388084","dateInserted":"2023-07-31T18:57:50+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-07-31T19:57:04+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":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/2HQ91LNQF3GG\/screenshot-2023-07-31-114610.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Screenshot 2023-07-31 114610.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-31T18:52:12+00:00","dateAnswered":"2023-07-31T18:48:05+00:00","acceptedAnswers":[{"commentID":388078,"body":"

In that case you would use the same syntax but you would reference the column in the sheet using the appropriate column name. <\/p>

[Column name]:[Column name]<\/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":108204,"type":"question","name":"I am trying to return where a contract is in the review process, DOJ review may or may not have date","excerpt":"=IF(Started@row > [To OC&P]@row, \"HSD Contracts\", IF([To OC&P]@row > DOJ@row, \"OC&P\", IF(OR(DOJ@row > [To Contractor]@row, \"DOJ\", IF(DOJ@row = 0, IF([To Contractor]@row > [To OC&P]@row, \"Out for Signature\"), IF([To Contractor]@row > [HSD Signed]@row, \"Out for Signature\", \"//www.santa-greenland.com/community/discussion/66965/\"))))))","snippet":"=IF(Started@row > [To OC&P]@row, \"HSD Contracts\", IF([To OC&P]@row > DOJ@row, \"OC&P\", IF(OR(DOJ@row > [To Contractor]@row, \"DOJ\", IF(DOJ@row = 0, IF([To Contractor]@row > [To…","categoryID":322,"dateInserted":"2023-07-27T17:35:54+00:00","dateUpdated":"2023-07-27T17:36:30+00:00","dateLastComment":"2023-08-01T00:09:58+00:00","insertUserID":164200,"insertUser":{"userID":164200,"name":"mjmitchell","title":"DBO","url":"https:\/\/community.smartsheet.com\/profile\/mjmitchell","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-01T00:06:31+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":164200,"lastUser":{"userID":164200,"name":"mjmitchell","title":"DBO","url":"https:\/\/community.smartsheet.com\/profile\/mjmitchell","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-01T00:06:31+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":48,"score":null,"hot":3381330352,"url":"https:\/\/community.smartsheet.com\/discussion\/108204\/i-am-trying-to-return-where-a-contract-is-in-the-review-process-doj-review-may-or-may-not-have-date","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108204\/i-am-trying-to-return-where-a-contract-is-in-the-review-process-doj-review-may-or-may-not-have-date","format":"Rich","lastPost":{"discussionID":108204,"commentID":388134,"name":"Re: I am trying to return where a contract is in the review process, DOJ review may or may not have date","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/388134#Comment_388134","dateInserted":"2023-08-01T00:09:58+00:00","insertUserID":164200,"insertUser":{"userID":164200,"name":"mjmitchell","title":"DBO","url":"https:\/\/community.smartsheet.com\/profile\/mjmitchell","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-01T00:06:31+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":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-01T00:10:04+00:00","dateAnswered":"2023-08-01T00:09:58+00:00","acceptedAnswers":[{"commentID":388134,"body":"

This took me a few hours to finally figure out and clearly, I have much to learn related to SmartSheet function rules. This is the final formula that worked. Sharing in case others may have a similar need. <\/p>

=IF(AND(ISBLANK(DOJ@row), ISDATE([To Contractor]@row)), \"Out for Signature\", IF(Started@row > [To OC&P]@row, \"HSD Contracts\", IF([To OC&P]@row > DOJ@row, \"OC&P\", IF(DOJ@row > [To Contractor]@row, \"DOJ\", IF([To Contractor]@row > [HSD Signed]@row, \"Out for Signature\", IF(DOJ@row <> [To Contractor]@row, \"Out for Signature\"))))))<\/p>

Once tested, this can be converted to column formula.<\/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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&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":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Formulas and Functions