Custom Serial Numbers

Hi there!

I want to be able to assign a unique serial number to each newly populated row. One of the columns, "Type", determines the first letter of the serial number for the respective row - the prefix - and the suffix is a three digit number (starting at 001) that increments by 1 determined by the prefix. For example:

Screen Shot 2022-09-13 at 9.29.19 PM.png

In each of these, selecting the validated inputs via dropdown should determine the first letter of the "REF ID" and this formula determines the remaining number:

=LEFT([email protected]) +“-”+RIGHT(1000 + COUNTIFS(Type$1:[email protected],[email protected]), 3)

And this works beautifully, so long as the rows aren't re-sorted or filtered. The problem is that the unique IDs assigned by this method don't stay assigned to their original rows as the absolute reference moves with the sort, and consequently these IDs don't stay consistent to a row. And there doesn't seem to be an automation path that assigns a calculated value to a cell.

It's often discussed on here, but I hadn't seen a post that called out the problem of Filter / Sort.

Would welcome input. Thanks!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册template!
Try omitting the \"*100\" at the end of your formula. Convert the column to show the number as a percentage. <\/p>
\n
\n \n \"Screenshot<\/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":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":107015,"type":"question","name":"Coiuntifs Formula Help Needed","excerpt":"Hi! Can anyone please assist with the correct Formula? i'm trying to count how many rows are on a sheet(Reference Sheet) the criterea for the rows are as follows: =countifs STATUS Column is \"Discharged\" or \"ACTIVE\" , Discharged\/Nonadmit Column is Greater than 05\/19\/2023 and Date activated column is less than 05\/27\/2023 I…","snippet":"Hi! Can anyone please assist with the correct Formula? i'm trying to count how many rows are on a sheet(Reference Sheet) the criterea for the rows are as follows: =countifs STATUS…","categoryID":322,"dateInserted":"2023-06-28T13:59:55+00:00","dateUpdated":null,"dateLastComment":"2023-06-28T14:35:02+00:00","insertUserID":162885,"insertUser":{"userID":162885,"name":"Ymandel","title":"President","url":"https:\/\/community.smartsheet.com\/profile\/Ymandel","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-28T15:49:55+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":162885,"lastUser":{"userID":162885,"name":"Ymandel","title":"President","url":"https:\/\/community.smartsheet.com\/profile\/Ymandel","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-28T15:49:55+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":27,"score":null,"hot":3375925497,"url":"https:\/\/community.smartsheet.com\/discussion\/107015\/coiuntifs-formula-help-needed","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107015\/coiuntifs-formula-help-needed","format":"Rich","lastPost":{"discussionID":107015,"commentID":382847,"name":"Re: Coiuntifs Formula Help Needed","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382847#Comment_382847","dateInserted":"2023-06-28T14:35:02+00:00","insertUserID":162885,"insertUser":{"userID":162885,"name":"Ymandel","title":"President","url":"https:\/\/community.smartsheet.com\/profile\/Ymandel","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-28T15:49:55+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-28T14:22:57+00:00","dateAnswered":"2023-06-28T14:10:08+00:00","acceptedAnswers":[{"commentID":382838,"body":"

@Ymandel<\/a> See if this version works:<\/p>

=COUNTIFS([Discharged Date]:[Discharged Date], >DATE(2023, 5, 26), [Date Activated]:[Date Activated], <=(DATE(2023, 6, 2)), [Status]:[Status], OR(@cell = \"Active\", @cell = \"Discharged\"))<\/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":107013,"type":"question","name":"#Incorrect Argument Set","excerpt":"Good Morning, I've been trying to figure this formula out but I can't seem to get it. I need to sum any amount in the computed count column, match it with the AP tech for a specific month. I've tried swapping the columns around but nothing seems to work. What am I missing? =SUMIFS({011-AP Archive AP Tech}, [Primary…","snippet":"Good Morning, I've been trying to figure this formula out but I can't seem to get it. I need to sum any amount in the computed count column, match it with the AP tech for a…","categoryID":322,"dateInserted":"2023-06-28T13:44:50+00:00","dateUpdated":null,"dateLastComment":"2023-06-28T14:41:30+00:00","insertUserID":156010,"insertUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-28T14:41:41+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":156010,"lastUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-28T14:41:41+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":17,"score":null,"hot":3375923780,"url":"https:\/\/community.smartsheet.com\/discussion\/107013\/incorrect-argument-set","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107013\/incorrect-argument-set","format":"Rich","lastPost":{"discussionID":107013,"commentID":382850,"name":"Re: #Incorrect Argument Set","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382850#Comment_382850","dateInserted":"2023-06-28T14:41:30+00:00","insertUserID":156010,"insertUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-28T14:41:41+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-28T14:41:39+00:00","dateAnswered":"2023-06-28T14:41:30+00:00","acceptedAnswers":[{"commentID":382850,"body":"

with a little more work - I got it!!<\/p>

=SUMIFS({011-AP Archive Computed Count}, {011-AP Archive AP Tech}, [Primary Column]118, {011-AP Archive Month}, 3)<\/p>

I swear I tried this earlier!! But I did confirm that it is adding up correctly!!<\/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