Skip to content

Instantly share code, notes, and snippets.

@twhitt14
Last active October 29, 2020 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twhitt14/10bff5fb66f340b635382059364d513f to your computer and use it in GitHub Desktop.
Save twhitt14/10bff5fb66f340b635382059364d513f to your computer and use it in GitHub Desktop.
Take a plain old text array like "This, that, the other" and turn it into "["This", "that", "the other"]". Also displays nothing if the source cell is blank, rather than showing an error.

=IF(NOT(EQ({Source_Cell_ID},"")), CONCATENATE("[", TEXTJOIN(", ", true, ARRAYFORMULA(char(34)&TRIM(SPLIT({Source_Cell_ID},","))&char(34))), "]"), "")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment