FormulaCraft

How to extract the middle name from a full name in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=IFERROR(MID(A2, FIND(" ", A2) + 1, FIND(" ", A2, FIND(" ", A2) + 1) - FIND(" ", A2) - 1), "No Middle Name")

Verified example

Computed by a real spreadsheet engine on the sample data below.

Full NameMiddle Name
John Michael Doe
Jane Smith
Alice Betty Carol Davis

=IFERROR(MID(A2, FIND(" ", A2) + 1, FIND(" ", A2, FIND(" ", A2) + 1) - FIND(" ", A2) - 1), "No Middle Name")Michael

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Enter your full names in column A starting from cell A2.
  2. 2In cell B2, input the formula provided for Excel or Google Sheets.
  3. 3Drag the formula down to apply it to other cells in column B.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What if the full name does not have a middle name?

The formula will return 'No Middle Name'. You can customize this message as needed.

Can this formula handle names with multiple middle names?

No, this formula extracts only the first middle name. For multiple middle names, a more complex formula would be required.

Does this work with names that include suffixes like Jr. or Sr.?

Yes, as long as the middle name appears before any suffixes and is separated by spaces.

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: