Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

How would I split text separated by commas into new cells?

Example, in one cell I have the text "Boston, MA, USA"

How do I split that to have Boston in one column, MA in the second, and USA in the third, all on the same row?

Answers

  • ✭✭✭✭✭✭

    Let's say that your text "Boston, MA, USA" is in a column called "Location" and that you want to separate the text into three columns called City, State, and Country. The formulas that work for me are as follows:

    City: =LEFT(Location@row, FIND(", ", Location@row) - 1)

    State: =MID(Location@row, FIND(", ", Location@row) + 1, FIND(", ", Location@row, FIND(", ", Location@row) + 1) - FIND(", ", Location@row) - 1)

    Country: =RIGHT(Location@row, LEN(Location@row) - FIND(", ", Location@row, FIND(", ", Location@row) + 1) - 1)

    Does this help?

  • ✭✭✭

    Thank you Kelly. I will test that. How would you edit that in case the data came across as ['Boston','MA','USA']? I just learned thats likely how it will come across.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2