I'm stuck trying to write a custom function that encodes a list of email addresses. I have a list of email address in a field, each one on a new line, like this:
I need to convert it into this format:
where each email address is surrounded by quote marks and has a comma separator between each email address (but not after the last email address).
I've created a custom function called ConvertEmails (text) with this formula:
Case ( ValueCount ( text ) > 0 ;
"\"" & GetValue ( text ; 1 ) & "\"" &", "& ConvertEmails ( RightWords ( text ; ValueCount ( text ) - 1 ) ) ;
which currently outputs this:
I'm stuck at this point and hope someone more experienced with recursive custom functions can show me what I'm missing here.