JOIN(COLLECT formula

This discussion was created from comments split from: Join Collect formula for multiple values.

Best Answers

  • Stephanie Allison
    Stephanie Allison ✭✭✭
    Answer βœ“

    I'm trying to do something very similar and not having any luck. I need the Job Titles(s)(Formula) column in sheet 1 to populate the Job Title from sheet 2 based on the traveler/employee name. This isn't difficult when there is a 1 to 1 relationship. But we have trips with multiple travelers and I cannot get this to work. I've tried:

    =JOIN(COLLECT({Employee List Job Title}, {Employee List Employee Name}, CONTAINS(@cell, [Traveler(s) Name, If known (select)]@row)), ",") brings back a blank cell for all rows, even those with only one traveler.

    =IFERROR(INDEX(COLLECT({Employee List Job Title}, {Employee List Employee Name}, [Traveler(s) Name, If known (select)]@row), 1), "No Match Found") brings back correct information for trips with one employee. Multiple employees come back as "No Match Found".


    Any assistance would be greatly appreciated.


    Sheet 1

    image.png

    Sheet 2

    image.png


  • Paul Newcome
    Paul Newcome Community Champion
    Answer βœ“

    Yes. CONTAINS doesn't play well with Contact type columns. The HAS function will be needed, but you will need to flip the two pieces of it around I believe.


    =JOIN(COLLECT({Employee List Job Title}, {Employee List Employee Name}, HAS([Traveler(s) Name, If known (select)]@row, @cell)), ", ")

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!