Formula to Check Duplicates on a Multi-Select Drop Down

To evaluate each value within a multi-value cell is what has me stumped.

'CountIf' exceeding 1 is the key for single values. I thought about using 'contains'.

I'm curious if anyone has figured this out.

Best Answer

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    Answer ✓

    Thanks for thinking about this with me Jackie.

    Referencing a multi-select cell with multiple values in a formula converts all of the values to a single string.

    It's an edge case. The API is the ticket on this one .

Answers

  • Have you tried the CountIFS formula? it allows for several variables.


    If you are looking for duplicates for just a single column, you could try applying a filter or sorting the column.

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    edited 10/22/20

    Hi Jackie,

    Yes, the countif function, which I understand works for single value cases was my first thought. How can we do it formulaically for multiple values in one cell in a multi-select dropdown column?

    Evaluating each value in the cell rather than all of the contents of the cell as one value.

    -Jeremiah

  • There is a "Countifs" formula with an "s" at the end. Here is a link to the formula:https://help.smartsheet.com/function/countifs?frame=0&nav=1

    It takes the range, and if it meets multiple criteria, then it will count it.

    For example, this formula is handy if you are looking for all of the new assets assigned to a certain employee. So the variable (rows) would have to have to contain "new" and the "employee name" in another column.


    If you are looking to count a sum of variables. For example you want to count all assets that are "new" and "Used" but not "broken", I just did a test and you can layer the "=countif" formula to get a count of all the variables that meet the first condition added to the variables that meet the second condition.

    Example: =COUNTIF([column2]:[column2], "new") + COUNTIF([column2]:[column2], "used")

    So if there are 5 "new" and 6 "used" you will get a total of 11!

    Is this something that you are looking for? If not, can you provide me a little more information and how your sheet is set up for me to see if I can help?

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    edited 10/22/20

    I see. Rather than adding multiple criteria, which the CountifS solves I am trying to look at each value within the cell and evaluate it individually.

    Maybe a better question is how do we access single values within a multiselect dropdown cell?

    I'm asking about finding the Duplicate 'A' in this case:

    image.png

    I've published the sheet在这里

    This is a better example of the challenge:

    image.png

    There is a duplicate 'A'.

  • I think I found something! I didn't know about this formula: "HAS" I kept the formula counting the "A"s in the Check Duplicates column.

    Here is the formula:=COUNTIF([Multiple Criteria]:[Multiple Criteria], HAS(@cell, "A"))

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭

    Yes. We can search them all for "A" by hard coding A as the criterion.

    The trick is to replace the statically written "A" criterion with the values of the multiselect.

    The real question: How do we access and evaluate each value in an multi-select cell with a formula?

  • So are you assigning a separate value to each "criterion" for example: A=1, H=2? or are you wanting to to specifically find the amount of duplicates within a column?

    Can you provide me with an example of what you want your end result to be?

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    Answer ✓

    Thanks for thinking about this with me Jackie.

    Referencing a multi-select cell with multiple values in a formula converts all of the values to a single string.

    It's an edge case. The API is the ticket on this one .

  • To make sure this isn't going over my head, you are wanting the formula that checks a cell, and if the cell has multiple valuables (drop down select), you would like them to be combined in a way that they become a single line of text versus two separate selections?

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    edited 10/22/20

    My goal is to determine if each value in each multi-value cell is unique among all of the values in all the multi-value cells in the column.

  • I have a feeling like our brains work on different wavelengths and we are learning how to speak each other's language. So I appreciate your patience! My competitive nature is causing me to "need" to figure this out.

    So you are wanting a "trigger" that says whether things have a match or are unique, when compared to all of the values within the cell, and if it is unique to create to create a single string of values?

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

  • JeremiahHorstick
    JeremiahHorstick ✭✭✭✭✭✭
    edited 10/22/20

    Lol. Yes

    Using a formula in Smartsheet the isolated, multiple values in a multi-select cell are evaluated as a single string. Combining them into a single string value, loosing their individuality making it impossible to evaluate each value without some intense regular expressions, if it's even possible to ascertain a delimiter. This one is probably going to remain un-solved for a minute.

  • I ended up trying something. I made all of the valuables into a single string, then I made a formula column where it counts the number of occurrences for each of the variables that are duplicates for the multi-select cell at that row.

    If there is a "1" it is "unique" if it is larger than "1" it has duplicates. With the numbers, you could then have a trigger "check box" that marks things as unique. You could also highlight using conditional formatting for those that are unique.

    Jackie Ziemke,Marketing Director

    ruralMED管理资源欧宝体育app官方888

Hi, <\/p>

Add a \"Created By\" column in your sheet and turn on \"Required smartsheet login to access your form\" in your form setting. So that whoever fills out the form, their email id will be automatically captured in \"created by\" column. This will replace your \"Requestor Name\" column. <\/p>

Thank you!<\/p>


<\/p>

\n
\n \n \"Screen<\/img><\/a>\n <\/div>\n<\/div>\n
\n
\n \n \"Screen<\/img><\/a>\n <\/div>\n<\/div>\n


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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"},{"tagID":247,"urlcode":"contacts","name":"Contacts"},{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":448,"urlcode":"workflows-in-smartsheet","name":"Workflows in Smartsheet"},{"tagID":527,"urlcode":"columns","name":"columns"}]},{"discussionID":109475,"type":"question","name":"JOIN() Formula Result - Producing Apostrophe in Copied Cell Data","excerpt":"The issue involves the usage of the JOIN() formula within SmartSheet, which is resulting in the inclusion of an unwanted apostrophe when the formula's output is copied to another sheet. The JOIN() function is designed to concatenate values, but in this scenario, the copied data is displaying an apostrophe that is not…","snippet":"The issue involves the usage of the JOIN() formula within SmartSheet, which is resulting in the inclusion of an unwanted apostrophe when the formula's output is copied to another…","categoryID":321,"dateInserted":"2023-08-25T16:49:03+00:00","dateUpdated":"2023-08-25T16:52:43+00:00","dateLastComment":"2023-08-25T22:09:31+00:00","insertUserID":124290,"insertUser":{"userID":124290,"name":"Adriane Price","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Adriane%20Price","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!BmjXAS9m9aY!oUjUqI9WkTY!3brbJb9YCMB","dateLastActive":"2023-08-25T22:08:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":124290,"lastUserID":124290,"lastUser":{"userID":124290,"name":"Adriane Price","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Adriane%20Price","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!BmjXAS9m9aY!oUjUqI9WkTY!3brbJb9YCMB","dateLastActive":"2023-08-25T22:08:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":19,"score":null,"hot":3385984114,"url":"https:\/\/community.smartsheet.com\/discussion\/109475\/join-formula-result-producing-apostrophe-in-copied-cell-data","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109475\/join-formula-result-producing-apostrophe-in-copied-cell-data","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109475,"commentID":392674,"name":"Re: JOIN() Formula Result - Producing Apostrophe in Copied Cell Data","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392674#Comment_392674","dateInserted":"2023-08-25T22:09:31+00:00","insertUserID":124290,"insertUser":{"userID":124290,"name":"Adriane Price","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Adriane%20Price","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!BmjXAS9m9aY!oUjUqI9WkTY!3brbJb9YCMB","dateLastActive":"2023-08-25T22:08:33+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":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-25T22:09:33+00:00","dateAnswered":"2023-08-25T22:09:31+00:00","acceptedAnswers":[{"commentID":392674,"body":"

Fixed, needed to add \"Value\" before the formula to remove the apostrophe.<\/p>


<\/p>

=VALUE(IFERROR(JOIN(DISTINCT(COLLECT([Customer PO Amount (USD)]@row:[Customer PO Amount (Local Currency)]@row, [Customer PO Amount (USD)]@row:[Customer PO Amount (Local Currency)]@row, <>\"//www.santa-greenland.com/community/discussion/comment/\"))), \" \"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":109460,"type":"question","name":"IF \/ OR formula then Check a Box","excerpt":"I need a formula that IF a specific column has either 1 of 2 specific choices, then a BOX in another column is checked: =IF(([Study Status]@row = \"Active\/ Open to Accrual\", 1) OR([Study Status]@row = \"In Start-Up\", 1))","snippet":"I need a formula that IF a specific column has either 1 of 2 specific choices, then a BOX in another column is checked: =IF(([Study Status]@row = \"Active\/ Open to Accrual\", 1)…","categoryID":321,"dateInserted":"2023-08-25T13:30:39+00:00","dateUpdated":null,"dateLastComment":"2023-08-25T16:21:27+00:00","insertUserID":9250,"insertUser":{"userID":9250,"name":"Susan Swisher","url":"https:\/\/community.smartsheet.com\/profile\/Susan%20Swisher","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-25T16:23:49+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":161714,"lastUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-08-27T02:16:35+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":9,"countViews":48,"score":null,"hot":3385956126,"url":"https:\/\/community.smartsheet.com\/discussion\/109460\/if-or-formula-then-check-a-box","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109460\/if-or-formula-then-check-a-box","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109460,"commentID":392616,"name":"Re: IF \/ OR formula then Check a Box","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392616#Comment_392616","dateInserted":"2023-08-25T16:21:27+00:00","insertUserID":161714,"insertUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-08-27T02:16:35+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":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-25T15:13:03+00:00","dateAnswered":"2023-08-25T14:14:39+00:00","acceptedAnswers":[{"commentID":392575,"body":"

Give this a try:<\/p>

=IF(OR([Study Status]@row = \"Active\/Open to Accrual\", [Study Status]@row = \"In Start-Up\"), 1)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=321&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":4992,"limit":3},"title":"Trending in Smartsheet Basics","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Smartsheet Basics