COUNTIF & Multi-Selection下拉菜单——计数多个条目

MJayMay
MJayMay
编辑12/09/19 公式与函数

我的数据输入表有几个列是多选择下拉菜单。对于我的Metrics总结页面,当用户选择了多个选项时,我就在使用COUNTIF。

“多重选择”下拉菜单中的选项示例:

  • 苹果
  • 葡萄
  • 香蕉
  • 其他

我需要指导,当选择多个选项时,如何构建标准,如苹果和梨。我想要的苹果和梨是一个单独的计数,而不是计算Apple或Pear在范围内被单独使用的所有时间。

使用所示的数据集,我应该得到以下总数:

  • 苹果- 1(不是4,这是范围内的总数)
  • 梨- 1(不是3,这是范围内的总数)
  • 葡萄- 2
  • 其他- 1
  • 苹果梨- 2个
  • 苹果香蕉- 1个

Multi-Select.JPG

答案

帮助文章资源欧宝体育app官方888

Hi @chelsi.johnson<\/a> <\/p>

I hope you're well and safe!<\/p>

Try something like this.<\/p>

=COUNTIFS(Resolution:Resolution, CONTAINS(\"Duplicate\", @cell))<\/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","log":{"dateUpdated":"2022-09-22 17:44:54","updateUser":{"userID":152723,"name":"chelsi.johnson","url":"https:\/\/community.smartsheet.com\/profile\/chelsi.johnson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wx9nv0OzvvM!c5lk5xPUwzs!ncykvroFsEa","dateLastActive":"2022-09-22T19:03:55+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":95792,"type":"question","name":"Two Dates, one independent and one dependent in one cell?","excerpt":"Does anyone know how or if I could create a dependent date based on an independent date in the same cell? I don't think this would work and may have to create a different column dependent on the independent date. The scenario is say meeting A is the independent date, Meeting B is a prep for Meeting A, which will take place…","categoryID":322,"dateInserted":"2022-09-22T15:33:54+00:00","dateUpdated":null,"dateLastComment":"2022-09-22T17:11:06+00:00","insertUserID":152722,"insertUser":{"userID":152722,"name":"kgibson","url":"https:\/\/community.smartsheet.com\/profile\/kgibson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-22T18:33:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":136737,"lastUser":{"userID":136737,"name":"Toufong Vang","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Toufong%20Vang","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/n65S9PRP4PA0M.png","dateLastActive":"2022-09-22T19:20:48+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":21,"score":null,"hot":3327728100,"url":"https:\/\/community.smartsheet.com\/discussion\/95792\/two-dates-one-independent-and-one-dependent-in-one-cell","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95792\/two-dates-one-independent-and-one-dependent-in-one-cell","format":"Rich","lastPost":{"discussionID":95792,"commentID":344454,"name":"Re: Two Dates, one independent and one dependent in one cell?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/344454#Comment_344454","dateInserted":"2022-09-22T17:11:06+00:00","insertUserID":136737,"insertUser":{"userID":136737,"name":"Toufong Vang","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Toufong%20Vang","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/n65S9PRP4PA0M.png","dateLastActive":"2022-09-22T19:20:48+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":"2022-09-22T18:33:28+00:00","dateAnswered":"2022-09-22T17:11:06+00:00","acceptedAnswers":[{"commentID":344454,"body":"

Hi, @kgibson<\/a> <\/p>

If I understood you correctly, then the simplest approach would be to subtract 7 days from the meeting date. For example, the date of the prep meeting, Meeting B<\/strong>, would be = [Meeting A]@row - 7<\/code> . The assumption being that Meeting A<\/strong> is exclusively a date column type.<\/p>

Hope this helped.<\/p>

Cheers!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-22 18:33:28","updateUser":{"userID":152722,"name":"kgibson","url":"https:\/\/community.smartsheet.com\/profile\/kgibson","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-22T18:33:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":95783,"type":"question","name":"CountIfs Invalid Ref","excerpt":"I cannot for the life of me get this CountIfs function to work. Referencing another sheet. Plz help! =COUNTIFS({FY23 PWP Meets Objective:Meets Objective}, \"No\", {FY23 PWP PHC:PHC}, \"FFH\") Screenshot of my reference sheet columns and values.","categoryID":322,"dateInserted":"2022-09-22T14:29:13+00:00","dateUpdated":null,"dateLastComment":"2022-09-22T16:44:10+00:00","insertUserID":152716,"insertUser":{"userID":152716,"name":"Casey A","url":"https:\/\/community.smartsheet.com\/profile\/Casey%20A","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!3MVb_0AahWQ!3LPaf7goDDw!HtxADOtzLHP","dateLastActive":"2022-09-22T17:12:38+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":152716,"lastUser":{"userID":152716,"name":"Casey A","url":"https:\/\/community.smartsheet.com\/profile\/Casey%20A","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!3MVb_0AahWQ!3LPaf7goDDw!HtxADOtzLHP","dateLastActive":"2022-09-22T17:12:38+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":25,"score":null,"hot":3327723203,"url":"https:\/\/community.smartsheet.com\/discussion\/95783\/countifs-invalid-ref","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95783\/countifs-invalid-ref","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":95783,"commentID":344450,"name":"Re: CountIfs Invalid Ref","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/344450#Comment_344450","dateInserted":"2022-09-22T16:44:10+00:00","insertUserID":152716,"insertUser":{"userID":152716,"name":"Casey A","url":"https:\/\/community.smartsheet.com\/profile\/Casey%20A","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!3MVb_0AahWQ!3LPaf7goDDw!HtxADOtzLHP","dateLastActive":"2022-09-22T17:12:38+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\/TUEY7CQIT200\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-22T16:42:52+00:00","dateAnswered":"2022-09-22T15:46:26+00:00","acceptedAnswers":[{"commentID":344434,"body":"

@Casey A<\/a> I have never seen crosslink references that look like that. I don't think you have the info in the swirly brackets right - usually it would just be {sheetname rangenumber} It looks like you are using syntax similar to what you would use if you were referencing a range in the same sheet. <\/p>

I recommend rebuilding those sheet range references. Start from scratch and let the tool create the syntax for you.<\/p>

dm<\/p>"},{"commentID":344450,"body":"

Thanks @Dale Murphy<\/a>, the reference select tool worked this time (was an issue with my view) and this worked: =COUNTIFS({FY23 HCCN Master Work Plan Range 1}, \"No\", {FY23 HCCN Master Work Plan Range 2}, \"FFH\"). Appreciated.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-22 16:42:52","updateUser":{"userID":152716,"name":"Casey A","url":"https:\/\/community.smartsheet.com\/profile\/Casey%20A","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!3MVb_0AahWQ!3LPaf7goDDw!HtxADOtzLHP","dateLastActive":"2022-09-22T17:12:38+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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"}]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">