IF FIND RIGHT String
Hello,
I’ve been searching all over the Smartsheet community since last week and was hoping someone could offer some assistance. I have a long Status value that I need to auto populate a shorter value in another column. I really just need a contains formula but I haven't seen that as an option here.
I could do this for the first half of the status because that was the beginning of the status (LEFT). But for the second half I’m having a lot of trouble as it begins on the Right and not the Left.
My formula for the Left status is:
=IF(FIND("FUNC", Status2), "Functional", IF(FIND("FS", Status2), "Fast Formula", IF(FIND("CS", Status2), "Continuation Services", IF(FIND("REP", Status2), "Report", IF(FIND("CON", Status2), "Conversion", IF(FIND("INT", Status2), "Interface"))))))
Some of the status values are:
FUNC - 5 - Go Live
FUNC - 3 - Prototype
CON - 7 - Completed
CS – Closed
I need it to give me the Right part string after the number and hyphen ie:
Go Live
Prototype
Completed
Closed
I tried using the same algorithm as the Left formula but its UNPARSEABLE.
=IF(FIND("Go Live", Status2), "Go Live", IF(FIND("Prototype", Status2), "Prototype", IF(FIND(“Completed", Status2), "Completed", IF(FIND("Closed", Status2), "Closed"))))
Any help or guidance would be greatly appreciated!
Thanks,
Lu
Comments
-
Mike Wilday ✭✭✭✭✭✭
I tested it out... the Find function is returning a value of where it finds the word you are looking for. If you add the >0 to your IF statement after find you will be able to get the results you are looking for. Try this...
=IF(FIND("Go Live", Status2)>0, "Go Live", IF(FIND("Prototype", Status2)>0, "Prototype", IF(FIND(“Completed", Status2)>0, "Completed", IF(FIND("Closed", Status2)>0, "Closed"))))
The Find formula returns the position that it finds the characters you are looking for. Because you were finding the leftmost characters with a value of 0 in your original formula I imagined it gave you the results you were looking for.
-
lumorrow ✭
-
Mike Wilday ✭✭✭✭✭✭
What error were you getting?
You had some extra ending parenthesis in there that would have caused an issue. I always paste my formulas into Notepad++ which will highlight your open and closing parentheses. Also, you can delete all the closing parentheses at the end of your formula and Smartsheet will add them for you.
Try this one.
=如果(找到(“播种”CON - 0, Status2) > 0,“播种”,IF(FIND("CON - 0 - Not In SOW", Status2)>0, "Not In SOW", IF(FIND(“CON - 1 - TEST File Preparation", Status2)>0, "TEST File Preparation", IF(FIND(“CON - 2 - TEST Conversion", Status2)>0, "TEST Conversion", IF(FIND(“CON - 3 - TEST Validation", Status2)>0, "TEST Validation", IF(FIND(“CON - 4 - PROD File Preparation", Status2)>0, "PROD File Preparation", IF(FIND(“CON - 5 - PROD Conversion", Status2)>0, "PROD Conversion", IF(FIND(“CON - 6 - PROD Validation", Status2)>0, "PROD Validation", IF(FIND(“CON - 7 - Completed", Status2)>0, "Completed", IF(FIND(“CON - 7 - Not Approved", Status2)>0, "Not Approved", IF(FIND(“CS - Closed", Status2)>0, "Closed", IF(FIND(“CS - In Development", Status2)>0, "In Development", IF(FIND(“CS - In Progress", Status2)>0, "In Progress", IF(FIND(“CS - On Hold", Status2)>0, "On Hold", IF(FIND(“CS - Open", Status2)>0, "Open", IF(FIND(“CS - Resolved", Status2)>0, "Resolved", IF(FIND(“CS - Waiting on Customer", Status2)>0, "Waiting on Customer", IF(FIND(“CS - Waiting on Third Party", Status2)>0, "Waiting on Third Party", IF(FIND(“FUNC - 0 - In SOW", Status2)>0, "In SOW", IF(FIND(“FUNC - 0 - Not in SOW", Status2)>0, "Not in SOW", IF(FIND(“FUNC - 1 - Kick Off", Status2)>0, "Kick Off", IF(FIND(“FUNC - 2 - Workshop", Status2)>0, "Workshop", IF(FIND(“FUNC - 3 - Prototype", Status2)>0, "Prototype", IF(FIND(“FUNC - 4 - Acceptance", Status2)>0, "Acceptance", IF(FIND(“FUNC - 5 - Go Live", Status2)>0, "Go Live", IF(FIND(“FUNC - 6 - Post Go Live", Status2)>0, "Post Go Live", IF(FIND(“FUNC - 7 - Closed", Status2)>0, "Closed", IF(FIND(“INT - 0 - In SOW", Status2)>0, "In SOW", IF(FIND(“INT - 0 - Not in SOW", Status2)>0, "Not in SOW", IF(FIND(“INT - 1 - Requirement", Status2)>0, "Requirement", IF(FIND(“INT - 2 - Development", Status2)>0, "Development", IF(FIND(“INT - 3 - Functional Testing", Status2)>0, "Functional Testing", IF(FIND(“INT - 4 - Customer Testing", Status2)>0, "Customer Testing", IF(FIND(“INT - 5 - Vendor Testing", Status2)>0, "Vendor Testing", IF(FIND(“INT - 6 - Production Migration", Status2)>0, "Production Migration", IF(FIND(“INT - 7 - Production Support", Status2)>0, "Production Support", IF(FIND(“INT - 8 - Completed", Status2)>0, "Completed", IF(FIND(“INT - 8 - Not Approved", Status2)>0, "Not Approved", IF(FIND(“FF - 0 - In SOW", Status2)>0, "In SOW", IF(FIND(“FF - 0 - Not in SOW", Status2)>0, "Not in SOW", IF(FIND(“FF - 1 - Requirement", Status2)>0, "Requirement", IF(FIND(“FF - 2 - Development", Status2)>0, "Development"))))))))))))))))))))))))))))))))))))))))))
-
lumorrow ✭
Thanks for the Notepad++ tip I just installed, however I'm still getting #UNPARSEABLE as my error message. I'm not sure if maybe I should go another route in identifying the value. Is there a nested Right function that I could try instead?
-
Mike Wilday ✭✭✭✭✭✭
I can see another major issue as well.. some of your quotes are smart quotes, usually caused by word processors. Look carefully at the text and you'll see the slanted quotes on some of them. Copy and paste that into Notepad++ and then replace all quotes with " straight quotes. That might also be the issue.
-
lumorrow ✭
OMG Mike! I literally just screamed! (good thing I'm home) lol THANK YOU SOOOOO MUCH! You have no idea!
All the Best,
Lu
-
Mike Wilday ✭✭✭✭✭✭
Was that the issue?
Sounds like you got it to work! Glad I could help you out!
Help Article Resources
Categories
=DATEONLY(Created@row) + IF(AND(FIND(\"P\", Created@row)> 0, VALUE(MID(Created@row, FIND(\" \", Created@row) + 1, FIND(\":\", Created@row) - (FIND(\" \", Created@row) + 1))) >= 4, VALUE(MID(Created@row, FIND(\" \", Created@row) + 1, FIND(\":\", Created@row) - (FIND(\" \", Created@row) + 1))) < 12), 1, 0)<\/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":227,"urlcode":"api-and-developers","name":"API and Developers"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"},{"tagID":277,"urlcode":"Integrations","name":"Integrations"},{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":369,"urlcode":"bridge-by-smartsheet","name":"Bridge"}]},{"discussionID":108222,"type":"question","name":"Parent Status based on Children Statuses - Need help refining this formula","excerpt":"Hey Smartsheet Community! I have a beast of a formula that has probably gotten a bit away from me, but I need help refining this so it meets certain criteria per our stakeholders vision. Here's the formula: =IF(COUNT(CHILDREN()) = COUNTIF(CHILDREN(), \"Complete\"), \"Complete\", IF(COUNT(CHILDREN()) = AND(COUNTIF(CHILDREN(),…","snippet":"Hey Smartsheet Community! I have a beast of a formula that has probably gotten a bit away from me, but I need help refining this so it meets certain criteria per our stakeholders…","categoryID":322,"dateInserted":"2023-07-27T20:58:59+00:00","dateUpdated":null,"dateLastComment":"2023-07-28T15:08:32+00:00","insertUserID":146258,"insertUser":{"userID":146258,"name":"dhall","url":"https:\/\/community.smartsheet.com\/profile\/dhall","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T15:09:28+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-07-28T15:08:41+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":33,"score":null,"hot":3381050851,"url":"https:\/\/community.smartsheet.com\/discussion\/108222\/parent-status-based-on-children-statuses-need-help-refining-this-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108222\/parent-status-based-on-children-statuses-need-help-refining-this-formula","format":"Rich","tagIDs":[219,254],"lastPost":{"discussionID":108222,"commentID":387807,"name":"Re: Parent Status based on Children Statuses - Need help refining this formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387807#Comment_387807","dateInserted":"2023-07-28T15:08:32+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-07-28T15:08:41+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":"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\/P3FFJGV2II8T\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-28T12:21:14+00:00","dateAnswered":"2023-07-28T00:26:52+00:00","acceptedAnswers":[{"commentID":387717,"body":"
Give this a try:<\/p>
=IF(COUNT(CHILDREN()) = COUNTIFS(CHILDREN(), @cell = \"Canceled\"), \"Canceled\", IF(COUNT(CHILDREN()) = COUNTIFS(CHILDREN(), OR(@cell = \"Complete\", @cell = \"Canceled\", @cell = \"On Hold\")), \"Complete\", IF(COUNT(CHILDREN()) = COUNTIFS(CHILDREN(), @cell = \"Not Started\"), \"Not Started\", IF(COUNTIFS(CHLDREN(), @cell = \"Upcoming\")> 0, \"Upcoming\", \"In Progress\"))))<\/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":219,"urlcode":"Sheets","name":"Sheets"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":108217,"type":"question","name":"\"Review status\" based on multiple checkboxes","excerpt":"Hello! I need help trying to figure out formulas that triggers the review status to green or red based on how many checkboxes that represent each month of the year are checked off. The boxes that are checked off would be based off on the frequency column which is semi-annually, annually, bi-weekly, daily, quarterly,…","snippet":"Hello! I need help trying to figure out formulas that triggers the review status to green or red based on how many checkboxes that represent each month of the year are checked…","categoryID":322,"dateInserted":"2023-07-27T20:20:30+00:00","dateUpdated":null,"dateLastComment":"2023-07-28T15:16:42+00:00","insertUserID":164178,"insertUser":{"userID":164178,"name":"cware10","url":"https:\/\/community.smartsheet.com\/profile\/cware10","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!AmDrR3_JMno!ejC0B2rXGOU!0QaX9eQMbnZ","dateLastActive":"2023-07-28T15:16:02+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164178,"lastUser":{"userID":164178,"name":"cware10","url":"https:\/\/community.smartsheet.com\/profile\/cware10","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!AmDrR3_JMno!ejC0B2rXGOU!0QaX9eQMbnZ","dateLastActive":"2023-07-28T15:16:02+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":32,"score":null,"hot":3381049032,"url":"https:\/\/community.smartsheet.com\/discussion\/108217\/review-status-based-on-multiple-checkboxes","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108217\/review-status-based-on-multiple-checkboxes","format":"Rich","tagIDs":[219,238,254,440],"lastPost":{"discussionID":108217,"commentID":387813,"name":"Re: \"Review status\" based on multiple checkboxes","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387813#Comment_387813","dateInserted":"2023-07-28T15:16:42+00:00","insertUserID":164178,"insertUser":{"userID":164178,"name":"cware10","url":"https:\/\/community.smartsheet.com\/profile\/cware10","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!AmDrR3_JMno!ejC0B2rXGOU!0QaX9eQMbnZ","dateLastActive":"2023-07-28T15:16:02+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":"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\/68S9XTNSOICR\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-28T15:15:59+00:00","dateAnswered":"2023-07-28T15:06:10+00:00","acceptedAnswers":[{"commentID":387806,"body":"
My suggestion would be to use an IF\/AND\/COUNTIFS combo for all of them then.<\/p>
COUNTIFS(Jan@row:Dec@row, @cell = 1)<\/p>
<\/p>
The above will tell you how many boxes are checked. You can combine this in an IF statement with an AND function to say that IF the Frequency@row = \"x\" AND the COUNTIFS() = #, \"Green\".<\/p>
<\/p>
=IF(AND(Frequency@row = \"Monthly\", COUNTIFS(Jan@row:Dec@row, @cell = 1) = 12)<\/strong>, \"Green\", \"Red\")<\/p> Then we can write out multiple AND functions using the same logic (frequency and count) and combine them with an OR function.<\/p> =IF(OR(AND(.....), AND(.....), AND(.....)), \"Green\", \"Red\")<\/p> You should be able to use copy\/paste to maintain consistency in your AND functions and just update the actual frequency and required count for each.<\/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":219,"urlcode":"Sheets","name":"Sheets"},{"tagID":238,"urlcode":"Finance","name":"Finance"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"},{"tagID":440,"urlcode":"project-management","name":"Project Management"}]}],"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":[]}">
<\/p>
<\/p>