Arte SheetsLearn. Try. Understand.

Text

Switch "Last, First" names to "First Last" (and back)

Flip HR and payroll comma-formatted names ("Rivera, Elena M.") into natural "Elena M. Rivera" order while leaving non-comma names untouched.

Swap around the comma without breaking already-clean rows

HR exports often list employees as "Rivera, Elena M." while CRM imports expect "Elena M. Rivera"—and mixed columns contain both styles side by side.

Testing ISNUMBER(FIND(",", A2)) first leaves already-normal names untouched. When a comma is present, TRIM(TEXTAFTER(A2, ",")) & " " & TRIM(TEXTBEFORE(A2, ",")) places the given name(s) and middle initial in front of the surname.

RawName (A)To "First Last"To "Last, First"
Rivera, Elena M.Elena M. RiveraRivera, Elena M.
Marcus VanceMarcus Vance (unchanged)Vance, Marcus

Convert "Last, First" to "First Last" and vice versa

To convert "First Middle Last" into "Last, First Middle", split on the LAST space using instance_num = -1.

=IF(ISNUMBER(FIND(",", A2)), TRIM(TEXTAFTER(A2, ",")) & " " & TRIM(TEXTBEFORE(A2, ",")), TRIM(A2))

Convert "First Middle Last" into "Last, First Middle"

instance_num = -1 keeps middle initials attached to the first name ("Vance, Marcus J.").

=IF(ISNUMBER(FIND(",", A2)), TRIM(A2), IF(ISNUMBER(FIND(" ", TRIM(A2))), TEXTAFTER(TRIM(A2), " ", -1) & ", " & TEXTBEFORE(TRIM(A2), " ", -1), TRIM(A2)))

Inputs and interpretation

These are chosen formatting conventions, not universal rules for personal names. The reverse formula assumes the last space-separated token is the surname and cannot infer compound surnames, suffixes, or culturally different name order. Use structured given/family-name fields where possible. Require at most one separator comma; a single-word name is retained.

Try the example

Use the original values or change them to test your understanding.

Further reading