Text String Question

ConnorForm
ConnorForm ✭✭✭✭
edited 03/20/24 in Formulas and Functions

Hello All,

Quick question I just need this 4-6 digit number before - Retailer in this column but cannot get my formula to work since what I am pulling ranges from 4-6 digits.

For example In my new column trying to create, I would just need 59552 from59552 -Martin Tractor or 178874 from 178874 - BROOKS TRACTOR INCORPORATED






Tags:

Best Answer

  • KPH
    KPH ✭✭✭✭✭✭
    Answer ✓

    Hi @ConnorForm

    If all your cells have a space after the 4-6 digit number then you are in luck. You can determine the length of the text to extract based on the position of the space.

    =LEFT(Retailer@row, FIND(" ", Retailer@row) - 1)

    The FIND will return the position of the space. Subtracting 1 will give the number of characters before the space. Using this as the number of characters part of the LEFT function will return just the characters to the left of the space.

    Like this:


Answers

  • KPH
    KPH ✭✭✭✭✭✭
    Answer ✓

    Hi @ConnorForm

    If all your cells have a space after the 4-6 digit number then you are in luck. You can determine the length of the text to extract based on the position of the space.

    =LEFT(Retailer@row, FIND(" ", Retailer@row) - 1)

    The FIND will return the position of the space. Subtracting 1 will give the number of characters before the space. Using this as the number of characters part of the LEFT function will return just the characters to the left of the space.

    Like this:


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!