Swap “Last, First” to “First Last”

Excel Formulas › Text

All versionsMID

Convert “Smith, Jane” into “Jane Smith” (or vice versa). Split at the comma and reassemble the two parts in the order you want.


Quick formula: turn “Last, First” in A2 into “First Last”:
=TRIM(MID(A2, FIND(",", A2) + 1, 100)) & " " & LEFT(A2, FIND(",", A2) - 1)
Take the part after the comma (first name), a space, then the part before it (last name).

Functions used (tap for the full reference guide):

The example

“Smith, Jane” reordered to “Jane Smith”.

AB
1Last, FirstFirst Last
2Smith, JaneJane Smith

The formula

Reassemble around the comma:

=TRIM(MID(A2, FIND(",",A2)+1, 100)) & " " & LEFT(A2, FIND(",",A2)-1) // "Smith, Jane" -> "Jane Smith"

How it works

Find the comma, take each side, reorder:

  1. FIND(",", A2) locates the comma.
  2. LEFT(A2, position-1) is the last name (before the comma).
  3. MID(A2, position+1, 100) is the first name (after it); TRIM removes the leading space.
  4. Concatenate first + space + last for “First Last.” In 365, TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,",") is cleaner.

Going the other way (“First Last” to “Last, First”) splits on the space instead: =lastWord & ", " & firstWords. REGEXREPLACE can do either swap in one shot in current Excel 365.

Try it: interactive demo

Live demo

Type “Last, First”.

Result:

Variations

365 version

Clean:

=TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,",")

First Last to Last, First

Reverse:

=lastWord&", "&firstName

REGEXREPLACE (365)

One shot:

=REGEXREPLACE(A2,"(\w+), (\w+)","$2 $1")

Pitfalls & errors

No comma = error. FIND fails if there’s no comma; wrap with IFERROR or validate the format.

Middle names. “Smith, Jane Q” puts “Jane Q” as the first part — usually fine, but be aware.

Extra spaces. TRIM the after-comma part to drop the leading space.

Practice workbook

📊
Download the free Swap "Last, First" to "First Last" practice workbook
A name-swap sheet with the 365, reverse, and REGEXREPLACE variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I switch "Last, First" to "First Last" in Excel?
Use =TRIM(MID(A2, FIND(",",A2)+1, 100)) & " " & LEFT(A2, FIND(",",A2)-1). It takes the text after the comma, a space, then the text before it.
What's the Excel 365 way?
=TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,",") — or REGEXREPLACE(A2,"(\w+), (\w+)","$2 $1").
What if there is no comma?
FIND errors. Wrap the formula in IFERROR or validate that entries contain a comma first.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Extract name · REGEXREPLACE · Split text

Function references: MID · FIND