COUNTIF & Multi-Selection Dropdown -- Count multiple entries
My data input sheet has several columns that are Multi-select dropdowns. For my Metrics summary page, I am struggling with COUNTIF when the user has selected multiple options.
Example of options in the Multi-selection dropdown:
- Apple
- Pear
- Grapes
- Banana
- Other
I need guidance on how to structure the criteria for when multiple options are chosen, such as Apple & Pear. I wantApple & Pearto be a distinct count, not count all the times Apple or Pear are used individually in the range.
Using the data set shown, I should get the following totals:
- Apple - 1(Not 4, which is the total within the range)
- Pear - 1(Not 3, which is the total within the range)
- Grapes - 2
- Other - 1
- Apple Pear - 2
- Apple Banana - 1
Answers
-
Paul Newcome ✭✭✭✭✭✭
Try incorporating the HAS function. It looks for an exact match.
=COUNTIFS([Multi Select Column]:[Multi Select Column],HAS(@cell, "text to search for"))
thinkspi.com
-
kolfinna ✭✭✭✭
Hey there,
I'm trying to use a similar formula within my sheet summary to count the number of Elementary tutors out of a given list. So far I have:
=COUNTM([Age Group of Students]:[Age Group of Students], AND(HAS("Elementary")))
But when I run that, it returns 10 as the answer--however, only 2 rows include that text.
What am I missing?
-
Paul Newcome ✭✭✭✭✭✭
COUNTM is designed to count the number of selections made. To count on a specific text you are going to want to use a COUNTIFS similar to...
=COUNTIFS([Age Group of Students]:[Age Group of Students], CONTAINS("Elementary"@cell))
thinkspi.com
-
kolfinna ✭✭✭✭
There it is. Thanks so much!
-
Paul Newcome ✭✭✭✭✭✭
-
MJayMay ✭
What syntax do you use when there are multiple selections? From the example above - Apple Pear?
I can find/count single entries easily using CONTAINS, but have yet to find a way to have it identify/count distinct multiple combinations. I need to understand how you reference Apple Pear in the formula below.
= COUNTIFS([Test - Fruit]:[Test - Fruit], CONTAINS("Apple Pear")@cell)
-
Paul Newcome ✭✭✭✭✭✭
@MJayMayI am not sure exactly what you are looking for. Are you looking for cells that contain both Apple and Pear with other selections possibly made in the same cell, cells that contain either Apple or Pear, or cells that contain strictly Apple and Pear with no other selections made?
thinkspi.com
-
MJayMay ✭
@Paul Newcome- Cells that strictly contain Apple and Pear with no other selections made
-
Paul Newcome ✭✭✭✭✭✭
Ok. The delimiter for multi-select columns is a line break which can be written as CHAR(10).
So instead of searching for "Apple Pear", you are going to want to search for "Apple" + CAR(10) + "Pear".
=COUNTIFS([Test - Fruit]:[Test - Fruit], @cell ="Apple" + CAR(10) + "Pear")
thinkspi.com
-
The team has elected to go to 1h increments in preference to the variable--that makes matters much tidier in relation to using an mcount method to depend all picks within the session availability cell.
-
The group has elected to visit 1h increments in preference to the variable--that makes topics a good deal tidier in relation to usingHuntington tutortechnique to rely all alternatives within the session availability mobile.
-
Jim G ✭
Thanks!! It worked for me!️
-
Paul Newcome ✭✭✭✭✭✭
-
Pam Dunn ✭✭✭✭✭
@Paul NewcomeI have a similar situation. I have a dropdown of 11 choices, the person can choose multiple choices in a cell/row. I want to count individually the choices submitted by week. If more than one choice appears in a cell my formula is only counting the one that matches by @row name.=COUNTIFS({Action}, [Action Required]@row, {Wksub}, 39).可能存在或任何组合的数量choices in Action Required in a cell on the main sheet
-
Paul Newcome ✭✭✭✭✭✭
@Pam DunnYou need to use the HAS function as outlined above.
thinkspi.com
Help Article Resources
Categories
Double check your cross sheet references. Make sure they are all single columns by clicking on the appropriate column header.<\/p>
<\/p>
When doing this, give the sheet a little time to load before selecting the column. Sometimes moving too fast allows you to select a column header before the sheet fully loads in the creator window. Then when the sheet does finally completely load in, the selection automatically reverts to the home cell (top right corner). This happens to me quite a bit when I am in a hurry.<\/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":106940,"type":"question","name":"IF cell CONTAINS one\/two\/three different values, return corresponding values","excerpt":"Hello community, I am attempting to return single or multiple values depending on a multiple dropdown column. My dropdown column contains criteria \"Consolidation\", \"Reduction\", \"Termination\", \"New\" Currently the formula works for single values with the following formula =IF([Type of Project]@row = \"Consolidation\", \"🝢\",…","snippet":"Hello community, I am attempting to return single or multiple values depending on a multiple dropdown column. My dropdown column contains criteria \"Consolidation\", \"Reduction\",…","categoryID":322,"dateInserted":"2023-06-27T09:24:42+00:00","dateUpdated":null,"dateLastComment":"2023-06-27T12:11:45+00:00","insertUserID":143463,"insertUser":{"userID":143463,"name":"Sam Swain","url":"https:\/\/community.smartsheet.com\/profile\/Sam%20Swain","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-27T20:08:44+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":151203,"lastUser":{"userID":151203,"name":"Nick Korna","url":"https:\/\/community.smartsheet.com\/profile\/Nick%20Korna","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-27T12:11:22+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":57,"score":null,"hot":3375727587,"url":"https:\/\/community.smartsheet.com\/discussion\/106940\/if-cell-contains-one-two-three-different-values-return-corresponding-values","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106940\/if-cell-contains-one-two-three-different-values-return-corresponding-values","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106940,"commentID":382505,"name":"Re: IF cell CONTAINS one\/two\/three different values, return corresponding values","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382505#Comment_382505","dateInserted":"2023-06-27T12:11:45+00:00","insertUserID":151203,"insertUser":{"userID":151203,"name":"Nick Korna","url":"https:\/\/community.smartsheet.com\/profile\/Nick%20Korna","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-27T12:11:22+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\/Q6RJIERQGF1Y\/screenshot-2023-06-27-at-10-22-29.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Screenshot 2023-06-27 at 10.22.29.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-27T10:17:00+00:00","dateAnswered":"2023-06-27T10:12:21+00:00","acceptedAnswers":[{"commentID":382490,"body":"