How to add "," between returned results

I'm using the below formula to pull all TR numbers (TRnumber) associated with specific IDs (LIMSID) from my master spreadsheet, but I'm not sure how to add a "," between each TR#. All suggestions appreciated!

Thanks!

=IF(ISBLANK(JOIN(DISTINCT(COLLECT({TRnumber}, {LIMSID}, [LIMS ID]@row)), CHAR(10))), "", JOIN(DISTINCT(COLLECT({TRnumber}, {LIMSID}, [LIMS ID]@row)), CHAR(10)))


Best Answer

  • Brian_Richardson
    Brian_Richardson Overachievers Alumni
    Answer ✓

    Looks like you're already using JOIN to pull them together. Instead of using CHAR(10) put "," instead in the tail end of your JOIN.

    =IF(ISBLANK(JOIN(DISTINCT(COLLECT([TR#]:[TR#], [LIMS IDs]:[LIMS IDs], [LIMS ID]@row)), ",")), "", JOIN(DISTINCT(COLLECT([TR#]:[TR#], [LIMS IDs]:[LIMS IDs], [LIMS ID]@row)), ","))


    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!