Can index+match be used to add values together?

I'm in the process of creating a series of sheets to track weights submitted by a variety of people. The people are going to be categorized by 'team', and I already have an index+match formula that takes their submissions and automatically organizes them to like a main row per person, each value going into the column for the week it was submitted.

In the same row, they're going to have that identifying value for their 'team', and I'd like to create a formula that will add the submitted weights by people on that team together for whatever week, so I can then track the total percentage difference from submission to submission.

I know I can probably do it differently, by doing a simple addition formula and selecting those cells, but I'd like to be able to assign a team to a person and the formula automatically knows to add that person's submission to the total for that team.

Another question is should I do this in a separate sheet?

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    Basically SUMIFS will look through the entire range but only pull rows to add that have the matching criteria.


    So if I wanted to add up all entries in {Column1} where {Column2} is "John Smith" but exclude entries that are not "John Smith", that's exactly what SUMIFS is designed for. I would reference all of {Column1}, but the built in range/criteria sets would only add up the numbers where {Column2} is "John Smith".


    It looks to me like you are trying to sum the numbers in {Wk1} but only for rows where {TN} is equal to TeamName@row. In that case, you would use a SUMIFS like so:

    =SUMIFS({Wk1}, {TN}, @cell = TeamName@row)


    This will only grab the numbers from the {Wk1} range where {TN} is matching your criteria.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
If your column title contains a space, it must be surrounded with square brackets. This should fix it.<\/p>

=COUNTIFS(PNS@row, 1) + COUNTIFS(EIP@row, 1) + COUNTIFS(Facilities@row, 1) + COUNTIFS([Patient Care Experience]@row, 1)<\/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":109375,"type":"question","name":"Calculate number of days and years from start date","excerpt":"I need to see how long staff have been with us, their tenure. I need this for any given dates, meaning \"today\". I have the start date, how do I get the days from that in years and days? Example: Start date is 06\/01\/2020, today is 08\/23\/2023 so the Tenure should be 3 years, 2 months, 22 days. I would take 3.2","snippet":"I need to see how long staff have been with us, their tenure. I need this for any given dates, meaning \"today\". I have the start date, how do I get the days from that in years and…","categoryID":322,"dateInserted":"2023-08-24T01:42:08+00:00","dateUpdated":null,"dateLastComment":"2023-08-24T15:05:11+00:00","insertUserID":82351,"insertUser":{"userID":82351,"name":"Leann Gibson","url":"https:\/\/community.smartsheet.com\/profile\/Leann%20Gibson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-04\/7e\/c6\/n7ec6db531603daaefab20990ddcfdd53.jpg","dateLastActive":"2023-08-24T17:16:24+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":82351,"lastUser":{"userID":82351,"name":"Leann Gibson","url":"https:\/\/community.smartsheet.com\/profile\/Leann%20Gibson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-04\/7e\/c6\/n7ec6db531603daaefab20990ddcfdd53.jpg","dateLastActive":"2023-08-24T17:16:24+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":44,"score":null,"hot":3385732039,"url":"https:\/\/community.smartsheet.com\/discussion\/109375\/calculate-number-of-days-and-years-from-start-date","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109375\/calculate-number-of-days-and-years-from-start-date","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109375,"commentID":392349,"name":"Re: Calculate number of days and years from start date","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392349#Comment_392349","dateInserted":"2023-08-24T15:05:11+00:00","insertUserID":82351,"insertUser":{"userID":82351,"name":"Leann Gibson","url":"https:\/\/community.smartsheet.com\/profile\/Leann%20Gibson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-04\/7e\/c6\/n7ec6db531603daaefab20990ddcfdd53.jpg","dateLastActive":"2023-08-24T17:16:24+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-24T15:05:21+00:00","dateAnswered":"2023-08-24T15:05:11+00:00","acceptedAnswers":[{"commentID":392349,"body":"

That worked perfectly, thank you!!<\/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":109369,"type":"question","name":"INDEXING and Validating","excerpt":"I have a perplexing question, that I am sure someone knows and I am missing here. I am working on a sheet to gather data from a form. However, this form will get quite lengthily and may span multiple years. With that said this is where I am stumped. =INDEX(COLLECT({Test Sheet 1 Range 1}, {Test Sheet 1 Range 1}, <> \"//www.santa-greenland.com/community/discussion/101953/\"),…","snippet":"I have a perplexing question, that I am sure someone knows and I am missing here. I am working on a sheet to gather data from a form. However, this form will get quite lengthily…","categoryID":322,"dateInserted":"2023-08-23T21:21:49+00:00","dateUpdated":null,"dateLastComment":"2023-08-24T14:04:04+00:00","insertUserID":163519,"insertUser":{"userID":163519,"name":"Frank Hammond","title":"Mr.","url":"https:\/\/community.smartsheet.com\/profile\/Frank%20Hammond","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nWVKDFTEFOKBN.png","dateLastActive":"2023-08-24T15:23:34+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":163506,"lastUser":{"userID":163506,"name":"JamesB","title":"IT Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/JamesB","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nEQMY42MFGXWS.png","dateLastActive":"2023-08-24T18:14:37+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":48,"score":null,"hot":3385713353,"url":"https:\/\/community.smartsheet.com\/discussion\/109369\/indexing-and-validating","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109369\/indexing-and-validating","format":"Rich","lastPost":{"discussionID":109369,"commentID":392314,"name":"Re: INDEXING and Validating","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392314#Comment_392314","dateInserted":"2023-08-24T14:04:04+00:00","insertUserID":163506,"insertUser":{"userID":163506,"name":"JamesB","title":"IT Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/JamesB","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nEQMY42MFGXWS.png","dateLastActive":"2023-08-24T18:14:37+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-23T21:50:04+00:00","dateAnswered":"2023-08-23T21:43:36+00:00","acceptedAnswers":[{"commentID":392246,"body":"

@Frank Hammond<\/a> <\/p>

Your formula is close, looks like you just need commas between your criterion range and criterion.<\/p>

=INDEX(COLLECT({Test Sheet 1 Range 1}, {Test Sheet 1 Range 2}, = 9, {Test Sheet 1 Range 3}, = 2023), Index@row)<\/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