Changing First Name Last Name Contact to Last Name, First Name

RiseUpPNW
RiseUpPNW ✭✭
edited 07/17/24 in Formulas and Functions

We have a commonly used Contact Column with names that are formatted First Name Last Name. We occasionally need to provide a list of these contacts in the format of Last Name, First Name. I've attempted to search for how to do this and have come across a few formulas I think are in the right direction, but because I have limited understanding of how these formulas actually work (and am mostly copying and pasting with a little tweaking) I'm unsure why my formula is not exactly working. I'd love any help and insight into what is wrong! Thank you! I'm using this one….and provided a screenshot of my results. =RIGHT(Contact@row, FIND(" ", Contact@row)) + ", " + LEFT(Contact@row, FIND(" ", Contact@row))

Answers

  • Protonsponge
    Protonsponge ✭✭✭✭✭✭
    edited 07/17/24

    Hello @RiseUpPNW,

    I think the following formula is going to be what you are looking for.

    To get the first name (text on the RIGHT) you can use LEN to count the number of characters in the text string and then subtract the characters up to the space from the total length and that should give you the desired result.

    =RIGHT(Contact@row, LEN(Contact@row) - FIND(" ", Contact@row)) + ", " + LEFT(Contact@row, FIND(" ", Contact@row) - 1)

    All seems to be working in the demo below 😀

    I hope that is helpful to you in someway,

    Protonspounge

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!