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
Nov 22, 2020 02:07 PM
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?
Nov 22, 2020 03:15 PM
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.