count if formula help

Was hoping to get some tips on the following use case.

I set up a Smartsheet to track all my organization's training accreditations. This includes (student, assigned coach, product course, accreditation level, status, etc.).

I want to create a formula that counts the number of open engagements per coach. This will help me do a better job of spreading the load more evenly across all coaches as new engagements are created. I had no problem using a count if formula to track the number of times a coach's name is listed in a column, but how do I get it to ONLY count occurrences of coaches names in a column for open/active engagements and not closed?

Also, should I create a separate SmartSheet to track this or do it within the same SmartSheet?

Thanks for any tips,

Patrick

Comments

  • steven.reed14881
    steven.reed14881 ✭✭✭✭✭

    Patrick,

    This can be done pretty simply by using the COUNTIFS function. Below is the help text on how to do it.


    Sample Usage





    COUNTIFS(Quantity:Quantity, >25, [Item Name]:[Item Name], "T-Shirt")









    Syntax


    COUNTIFS(range1, criterion1, [range2, criterion2 ...])


    • range1: The group of cells to count.




    • criterion1: The value that determines which cells in the range will be counted; for example: 15, "Hello World!", or >25.


    • range2, criterion2... [optional]: Additional groups of cells and their criteria.

    And I would say if this is the only metric that you are looking to pull from your sheet, just do it in a cell on your sheet. If you plan on deriving a variety of metrics, you might be better off on another sheet.

    Steve

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    I would suggest a separate sheet. It makes it easier when you want to reference entire columns if you don't have to worry about circular references. Try setting up a table like below.

    Coach Count

    约翰F

    Mike F

    Steve F

    .

    In place of the "F", use this:

    =COUNTIFS({Master Sheet Coach Column},[email protected], {Master Sheet Status Column}, OR(@cell= "Open",@cell= "Active"))

    {Master Sheet Coach Column}: Use the appropriate steps to reference another sheet and select the column that holds the Coaches' names.

    [email protected]: Leave as is. Looks at the name of the Coach for whatever row the formula is in.

    {主状态列表}:使用合适的steps to reference another sheet and select the column that holds the Status.

    OR(@cell= "Open",@cell= "Active")): Leave as is. Specifies which status types to count.

    thinkspi.com

  • Excellent, thanks Steve! I figured it out.

    My only issue now is that when users input data or make changes to their accreditations (rows) it appears they can also edit or even delete the formula. Yikes. Is there not a way to lock formulas for users but make it to where they are still allowed to input/edit data in a row?

  • patrick_daniels
    edited 03/06/19

    Thanks Paul! You may have seen my reply to Steve above. Do you have ideas on how to prevent users from editing or deleting formulas? I realize I can lock columns and rows, but I still need my users to input/edit data on rows but NOT to edit/delete formulas I've created.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    The best suggestion I can make is to lock the column. If there is no need for anyone to edit that particular cell in a row, and it is the same cell in every row then locking the column should do the trick.

    I had to share some people as admin to a workspace for various reasons. As a result they are able to edit even locked rows and columns. To help with that, I drilled it into them that if they see a lock anywhere... LEAVE IT ALONE.

    I built in some conditional formatting to immediately bring it to their attention that they accidentally edited a locked cell and they really need to hit the Undo button.

    I then set up some alerts and actions to notify me if they happen to save it after deleting or editing a formula.

    I also save a copy of every sheet as a template in a folder they do not have access to so I can easily pull from there to fix it.

    thinkspi.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
0, \"In Progress\",…","categoryID":322,"dateInserted":"2023-06-14T17:45:32+00:00","dateUpdated":null,"dateLastComment":"2023-06-14T20:47:13+00:00","insertUserID":162256,"insertUser":{"userID":162256,"name":"delaurellc","title":"Senior Consultant","url":"https:\/\/community.smartsheet.com\/profile\/delaurellc","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-14T22:59:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"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-06-15T01:08:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":34,"score":null,"hot":3373542165,"url":"https:\/\/community.smartsheet.com\/discussion\/106441\/child-parent-code-for-schedule-not-working","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106441\/child-parent-code-for-schedule-not-working","format":"Rich","lastPost":{"discussionID":106441,"commentID":380650,"name":"Re: Child Parent code for schedule not working","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380650#Comment_380650","dateInserted":"2023-06-14T20:47:13+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-06-15T01:08:28+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-06-14T19:03:21+00:00","dateAnswered":"2023-06-14T18:03:35+00:00","acceptedAnswers":[{"commentID":380599,"body":"

Nested IF formulas read from left to right and stop on the first true value. So if you have In Progress in one child row and On Hold in another child row, it will register a true value with the In Progress argument, output that, then stop evaluating. If you want On Hold to \"override\" In Progress, you would need to adjust the order in which your IFs are nested.<\/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":106419,"type":"question","name":"SUMIFS not working (referencing another sheet)","excerpt":"I'm struggling with getting a SUMIFS function to work properly that is referencing another sheet. So on my sheet with the function, I have it as: =SUMIFS({Total GL Detail Range 4}, {Total GL Detail Range 5}, Project8, {Total GL Detail Range 3}, Title@row) ...where the \"Total GL Detail\" is the other sheet referenced. Range…","categoryID":322,"dateInserted":"2023-06-14T13:17:37+00:00","dateUpdated":null,"dateLastComment":"2023-06-14T20:49:20+00:00","insertUserID":162357,"insertUser":{"userID":162357,"name":"EBooher","url":"https:\/\/community.smartsheet.com\/profile\/EBooher","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-14T20:58:21+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"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-06-15T01:08:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":15,"countViews":104,"score":null,"hot":3373533417,"url":"https:\/\/community.smartsheet.com\/discussion\/106419\/sumifs-not-working-referencing-another-sheet","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106419\/sumifs-not-working-referencing-another-sheet","format":"Rich","lastPost":{"discussionID":106419,"commentID":380651,"name":"Re: SUMIFS not working (referencing another sheet)","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380651#Comment_380651","dateInserted":"2023-06-14T20:49:20+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-06-15T01:08:28+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-06-14T20:08:57+00:00","dateAnswered":"2023-06-14T18:51:01+00:00","acceptedAnswers":[{"commentID":380616,"body":"

Ok. I just had someone else earlier this week have the same issue. Even after converting all of the IDs to text it still wasn't working. Lets try converting everything on the source sheet to numbers. Take that LEFT formula you have that strips the ID out and wrap it in a VALUE function.<\/p>

=VALUE(LEFT(.......................))<\/p>


<\/p>

Then try the COUNTIFS on the ID again, but instead of referencing the helper cell in the formula sheet that we created, reference the linked cell that houses the numerical value.<\/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":106432,"type":"question","name":"Form drop down selection query","excerpt":"Hi, Is it possible to create a form based off a sheet where you can select an entry already in the primary column which would then allow you to update specific other columns? I would like to have a form where I can select an entry in T Number column, then update Cal Due, In Cal checkbox and comments columns. Is this…","categoryID":322,"dateInserted":"2023-06-14T15:50:22+00:00","dateUpdated":null,"dateLastComment":"2023-06-14T17:40:38+00:00","insertUserID":160222,"insertUser":{"userID":160222,"name":"WillH","url":"https:\/\/community.smartsheet.com\/profile\/WillH","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-14T20:50:23+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":116407,"lastUser":{"userID":116407,"name":"Darren Mullen","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Darren%20Mullen","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/9WIC1TB7AJQT\/nP1GU5H4ITA1P.png","dateLastActive":"2023-06-15T05:02:15+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":57,"score":null,"hot":3373526460,"url":"https:\/\/community.smartsheet.com\/discussion\/106432\/form-drop-down-selection-query","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106432\/form-drop-down-selection-query","format":"Rich","tagIDs":[204],"lastPost":{"discussionID":106432,"commentID":380583,"name":"Re: Form drop down selection query","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380583#Comment_380583","dateInserted":"2023-06-14T17:40:38+00:00","insertUserID":116407,"insertUser":{"userID":116407,"name":"Darren Mullen","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Darren%20Mullen","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/9WIC1TB7AJQT\/nP1GU5H4ITA1P.png","dateLastActive":"2023-06-15T05:02:15+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,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/RUR0T5ZW0YL1\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-14T16:01:15+00:00","dateAnswered":"2023-06-14T15:59:16+00:00","acceptedAnswers":[{"commentID":380524,"body":"

@WillH<\/a> This is not possible using Smartsheet forms. You can:<\/p>

  1. Send an update request for a specific row, which is form-like in appearance <\/li>
  2. Use another solution such as Appsheet (it is really easy to do this in Appsheet by the way). The video below shows selecting an existing row based on a value in the row encoded in an NFC tag. Much more than you are looking to do, but my point is that you can use Appsheet to select the row you want to edit from a dropdown :)<\/li><\/ol>
    \n \n https:\/\/youtu.be\/bmxQhhMONFY\n <\/a>\n<\/div>


    <\/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":204,"urlcode":"Forms","name":"Forms"}]}],"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":9990,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

    Trending in Formulas and Functions