text to columns

Hello. I'm looking to split out the following string to provide just the supervisor name and I've yet to figure out the formula.. thoughts on how I do that in a helper column? Thanks

Supervisor | Approved by Little, Paul on 12/4/23 @ 11:42 AM |

Tags:

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    FIND outputs a number based on where specific text is found within a string.

    Using your example in the original post,

    FIND("by", [Column Name]@row)

    will output the number 23. Adding 3 to that gives us 26. We use 26 as the starting point in the MID function. So technically it could be written as

    =MID([Column Name]@row, 23 + 3, 38 - (23 + 3))

    =MID([Column Name]@row, 26, 38 - 26)

    =MID([Column Name]@row, 26, 12)

    But hardcoding numbers in is very rigid and does not allow for any flexibility at all. So we use the FIND function to dynamically output those two numbers for the MID function so that if there are additional characters that come before the "by" or the name isn't exactly 12 characters long, it will still work as long as the name is preceded by "by" and followed by "on".

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!