← All how-to recipes

How to flip "Last, First" into "First Last"

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Reorder comma-style names from exports and directories into natural order.

The formula

AppFormulaNotes
Excel (desktop)=MID(A2,FIND(",",A2)+2,100)&" "&LEFT(A2,FIND(",",A2)-1)Assumes "Last, First" with one comma-space. 365: =TEXTAFTER(A2,", ")&" "&TEXTBEFORE(A2,",").
Google Sheets=MID(A2,FIND(",",A2)+2,100)&" "&LEFT(A2,FIND(",",A2)-1)Identical.
LibreOffice Calc=MID(A2,FIND(",",A2)+2,100)&" "&LEFT(A2,FIND(",",A2)-1)Identical.

How it works

FIND locates the comma; MID takes everything two characters past it (skipping the comma and space) while LEFT takes everything before it, and & reassembles them in natural order: "Lovelace, Ada" → "Ada Lovelace". If some entries lack the space after the comma, use +1 with a TRIM wrapper; suffixes like "Jr." travel with whichever part they were typed in.

Verified, not just documented

We ran =MID(A2,FIND(",",A2)+2,100)&" "&LEFT(A2,FIND(",",A2)-1) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned Ada Lovelace — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned Ada Lovelace for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

MID · FIND · LEFT — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons