Combine Last Names of Partners but only if different


I am trying to combine the last names of clients if they are related to each other. Some of my clients have different last names from their partner and I would like to be able to see that.

I am using one sheet as a database with the names. One column is the buyers last name and co buyer last name. How do I combine the two but only if the names are different.



  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @Zach Lammie

    We might need to continue to tweak as I was unsure how you wanted the combined names to look. The formula looks for the name found in the 1st column in the second column. If any extra letters are left over, the length of that text string will be more than zero. If the two columns are a perfect match to one another, no letters will be left over.

    =IF(LEN(SUBSTITUTE([Buyers Name]@row, [Co-Buyers Name]@row, "")) > 0, JOIN([Buyers Name]@row:[Co-Buyers Name]@row, CHAR(10)))

    Edit the column names in the formula so they match yours.

    The CHAR(10) is a line break and is part of the formatting that I didn't know what you wanted. If you have formula-column word-wrapped, the CHAR(10) will make the names wrap in your column.

    Does that work for you?


  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @Zach Lammie

    Did this work for you?

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!