Split names for Excel

Separate first and last names in Excel without building a formula. Paste a name or a list to get clean columns, including middle names, titles, and suffixes when present. Copy the results back or download a spreadsheet.

1 / 100

One person per line. You can paste a column from Excel.

Try

How to separate first and last names in Excel

  1. Copy the full names from one Excel column, leaving out the column heading. Paste them above, one person per line.
  2. Select Split names. Review the first and last name columns beside the original input. Middle names, prefixes, and suffixes get their own columns when present.
  3. Select Copy for Excel, then paste into empty cells in your worksheet. Download Excel saves the same results as a new spreadsheet.

The name splitter keeps the original row order and duplicate entries, so you can line the results up with your existing records. It also handles surname-first entries such as GARCIA, MARIA.

Excel formulas for simple two-word names

If every row follows the same First Last pattern, you can split first and last names in Excel with formulas. For Ada Lovelace in A2, these formulas return Ada and Lovelace in Excel for Microsoft 365 or Excel 2024.

Excel formulas for a two-word name in A2
ColumnFormulaResult
First name=TEXTBEFORE(TRIM(A2)," ")Ada
Last name=TEXTAFTER(TRIM(A2)," ")Lovelace

Fill the formulas down for the remaining rows. They split at the first space, so use them only for the two-word pattern shown. Middle names, titles, compound surnames, or one-word names need a different rule or a review of the split.

Separate names without a formula

In desktop Excel, select the column and choose Data > Text to Columns > Delimited. Choose Space for consistently two-word names, or Comma for a list written Last, First. Preview the result and choose an empty destination before finishing.

Text to Columns splits at a separator. Choosing Space puts every word in a separate column, including a middle name or the words in a surname. Use the tool above for lists with mixed patterns, then check the returned parts against the original names.

Middle names and surnames with more than one word

For DR. JOHN A. SMITH JR., the result can separate Dr, John, A., Smith, and Jr into their own fields. Common surname particles, apostrophes, and hyphens can stay with the name they belong to. A single-word name leaves the last-name field empty.

Name order and surname boundaries are not always clear from the text alone. Check names with several possible interpretations before updating your contacts.

Build a name splitter for Excel

The Name API returns first, middle, and last names with optional prefixes and suffixes. Keep the original rows and export each returned part in its own column.

  1. Read one full name per line and preserve the original values.
  2. Look up distinct names with bounded concurrency.
  3. Write separate columns, leaving unknown parts empty and failures distinct.

Installation steps are included in each example. Set PARSEAPI_KEY on your server. Swift and Kotlin use an app key restricted to your app ID.

// npm install @parseapi/sdk@1.14.0
import { parseAPI } from '@parseapi/sdk';

// Set PARSEAPI_KEY on your server.
const parse = parseAPI();

async function mapLimit(inputs, work, concurrency = 6) {
  const output = new Array(inputs.length);
  let cursor = 0;
  await Promise.all(Array.from({ length: Math.min(concurrency, inputs.length) }, async () => {
    while (cursor < inputs.length) {
      const index = cursor++;
      output[index] = await work(inputs[index]);
    }
  }));
  return output;
}

const pasted = 'Ada Lovelace\nGARCIA, MARIA\nDR. JOHN A. SMITH JR.';
const inputs = pasted.split(/\r?\n/).map(value => value.trim()).filter(Boolean);
if (!inputs.length || inputs.length > 100) throw new Error('Use 1 to 100 rows.');
const unique = [...new Set(inputs)];
const checked = await mapLimit(unique, async input => {
  try {
    const row = await parse.name(input);
    return typeof row.valid === 'boolean' ? row : null;
  }
  catch { return null; }
});
const byInput = new Map(unique.map((input, index) => [input, checked[index]]));
console.table(inputs.map(input => {
  const row = byInput.get(input), valid = row?.valid === true;
  return { input, prefix: valid ? row.prefix : null,
    first: valid ? row.first : null, middle: valid ? row.middle : null,
    last: valid ? row.last : null, suffix: valid ? row.suffix : null,
    status: row === null ? 'Lookup failed' : valid ? 'Split' : 'Needs review' };
}));
// Review ambiguous name boundaries before replacing the original records.

Name API documentation

How do I separate first and last names in Excel?

Copy your full-name column without its heading, paste the names above, and select Split names. Use Copy for Excel to paste the resulting columns into empty cells, or Download Excel for a new file. Keep the original names alongside the results so you can review each split.

What Excel formula splits a first and last name?

For a two-word name in A2, use =TEXTBEFORE(TRIM(A2)," ") for the first name and =TEXTAFTER(TRIM(A2)," ") for the last name. These functions are available in Excel for Microsoft 365 and Excel 2024. The formulas assume exactly First Last. They need adapting for middle names, titles, or compound surnames.

How do I separate names written Last, First?

Paste the comma-separated name as it is. GARCIA, MARIA returns Maria as the first name and Garcia as the last name. In Excel's Text to Columns wizard, choose Comma as the delimiter. The surname stays in the first resulting column, so label the columns to match that order.

Can I split first, middle, and last names into three columns?

Yes. A middle-name column appears when at least one result has a middle name or initial. Prefixes such as Dr and suffixes such as Jr get separate columns too. Splitting every space in Excel can also produce three columns, but a three-word name may contain a compound surname rather than a middle name. Review those rows.

How can I extract just the last name in Excel?

Split the names, then use the Last name column from the copied results or downloaded file. For a consistent two-word First Last list, TEXTAFTER can return the text after the space. Taking only the last word from a longer name can cut off part of a compound surname or return a suffix instead.

Can I separate names in Google Sheets?

Yes. Copy your full-name column from Sheets, split it here, then paste the output into empty columns. In Sheets itself, =SPLIT(A2," ") separates the text at each space. That gives you one column per word, so review names with middle names or compound surnames. See the Google Sheets SPLIT guide.

What about compound surnames or one-word names?

A one-word name is returned in the First name column with an empty Last name. Recognized surname particles can stay together, but a name's intended order or surname boundary may still be ambiguous. Check those results against the original record or the person's stated name before replacing it.

Can I split more than 100 names?

A paste run splits the first 100 nonempty lines. Duplicate entries stay in their original order, and lookups that could not finish can be retried separately. Use Bulk for a larger file.