Excel formula to separate first and last name into two columns - ExcelXYZ

Excel Formula to Separate First and Last Name Into Two Columns

When you download customer leads, webinar sign-ups, or employee rosters into Excel, full names are often crammed into a single column like Ananya Sharma or Vikram Patel. Separating first name and last name into two clean columns makes mail merges, personalized emails, and CRM imports effortless.

Here are the fastest, cleanest Excel formulas to separate first and last names into two columns—working across both older Excel versions and Excel 365.

Method 1: Classic Excel Formula (Works in Every Version)

Assume your full names begin in cell A2. Using TRIM protects your formula if cells have accidental leading or double spaces.

First Name Formula (Column B)

=IFERROR(LEFT(TRIM(A2), FIND(" ", TRIM(A2))-1), TRIM(A2))

How it works: FIND(" ", TRIM(A2)) locates the space between words, and LEFT extracts everything before that space. If a cell holds only a single name (no space), IFERROR returns that single name cleanly.

Last Name Formula (Column C)

=IFERROR(RIGHT(TRIM(A2), LEN(TRIM(A2)) - FIND(" ", TRIM(A2))), "")

How it works: It subtracts the space position from the total character length (LEN) and pulls everything after the space using RIGHT.

Method 2: What If Names Are Formatted as “Last Name, First Name”?

Many HR and banking exports write names as Sharma, Ananya (with a comma). To separate them properly:

  • Last Name (Before Comma): =TRIM(LEFT(A2, FIND(",", A2)-1))
  • First Name (After Comma): =TRIM(MID(A2, FIND(",", A2)+1, LEN(A2)))

Method 3: One-Formula Split in Excel 365 (TEXTSPLIT)

If you use Microsoft 365 or Excel on the Web, a single dynamic formula splits first and last names across two columns automatically:

=TEXTSPLIT(TRIM(A2), " ")

How to Replace Formulas With Permanent Values

Before deleting the original Full Name column, convert your formula columns into static text:

  1. Select the First Name and Last Name columns and press Ctrl + C.
  2. Right-click the selection → click Paste Values (123) (or press Ctrl + Alt + V → V → Enter).

Have Middle Names Too?

If some rows contain 3-word names, check our How to Extract Middle Name and Surname in Excel guide and our complete Split First, Middle & Last Name in Excel tutorial. Need bulk list cleanup? See our Data Entry & Excel/CSV Cleaning Service.

Frequently Asked Questions

How do I segregate first and last name in Excel without a formula?

Select your column, go to Data → Text to Columns → Delimited → Space → Finish, or type the first two examples manually and press Ctrl + E (Flash Fill).

Do these formulas work in Google Sheets?

Yes, Method 1 (LEFT, RIGHT, LEN, FIND, TRIM) works identically in Google Sheets, and Google Sheets also supports =SPLIT(TRIM(A2), " ").

1 comment

    […] read Excel Formula to Separate First and Last Name Into Two Columns and Split First, Middle & Last Name Using Formula and Flash Fill. Need help cleaning large […]

Leave a Reply