Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Inserting quotation marks into a string

Topic Labels: Formulas
514 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello -

I’m looking for help creating a formula that will insert quotation marks around names in a string that are separated by commas. The number of names in the string will vary. For example the string Jane Doe, John Smith would become “Jane Doe”, “John Smith”.

Is there a formula that I can use to do this?

1 Reply 1

Welcome to the Airtable community!

If the comma will always be followed by a single space, you can try this formula.

IF(
  FIND( ', ', {text field}),
  '"' & SUBSTITUTE({text field}, ', ', '", "') & '"',
  {text field}
)

However, this will only work if the initial string is actually a string, and not an array (such as from a lookup or linked record). It also won’t work if there are multiple spaces or no space after the comma.