Split full names with titles and suffixes into distinct columns

Separate full contact names into prefix, first name, last name, and suffix columns. Use this when manual column splitting misplaces titles like Dr. or Jr.

Text prompt for ChatGPT and Claude

You get: Column formulas, configuration list and what to check

Prompt

Prompt
Act as an Excel data specialist. Write formulas to reliably parse full names that contain optional prefixes (like Dr., Ms., Rev.) and suffixes (like Jr., III, PhD) into separate, distinct columns.

- Provide formulas for four destination columns: Prefix, First Name, Last Name, and Suffix.
- Account for rows that lack prefixes or suffixes without returning #VALUE! or #N/A errors.
- Prioritize modern Excel functions (TEXTSPLIT, LET, TEXTBEFORE, TEXTAFTER) while providing a dependable standard formula setup.
- Specify the exact source cell reference used in your calculations.

Output format:
- Column formulas: The exact formula for Prefix, First Name, Last Name, and Suffix.
- Configuration list: The recognized prefixes and suffixes list used in the logic.
- What to check: Quick manual spot-checks for multi-word last names (such as van der Bilt).

Here are sample names from my list:

Example output

Example for: contact list with entries like Dr. Marcus Vance Jr., Sarah Smith, and Ms. Elena de la Cruz

Column formulas

Assuming full name is in cell A2:

1. Prefix Column (B2):
=IF(OR(LEFT(A2,3)="Dr.",LEFT(A2,3)="Mr.",LEFT(A2,3)="Ms.",LEFT(A2,4)="Mrs."), LEFT(A2, SEARCH(" ", A2)-1), "")

2. Suffix Column (E2):
=IF(OR(RIGHT(A2,3)="Jr.",RIGHT(A2,3)="Sr.",RIGHT(A2,3)="III",RIGHT(A2,3)="PhD"), RIGHT(A2, LEN(A2)-SEARCH("^", SUBSTITUTE(A2, " ", "^", LEN(A2)-LEN(SUBSTITUTE(A2, " ", ""))))), "")

3. Cleaned Core Name (Helper in F2 or wrapped in LET):
=TRIM(SUBSTITUTE(SUBSTITUTE(A2, B2, ""), E2, ""))

4. First Name Column (C2):
=LEFT(F2, SEARCH(" ", F2&" ")-1)

5. Last Name Column (D2):
=TRIM(SUBSTITUTE(F2, C2, ""))

Configuration list
  • Prefixes recognized: Dr., Mr., Ms., Mrs., Rev.
  • Suffixes recognized: Jr., Sr., II, III, IV, PhD, MD, Esq.
What to check
  • Check compound surnames (like Elena de la Cruz): the formula puts "de la Cruz" into Last Name, but verify if middle names exist without prefixes.
  • Check names with punctuation variations (e.g., Jr without a period).
  • Spot-check single-name entries to ensure the Last Name field cleanly displays empty instead of an error.
Written by AI from this prompt. Your results will vary.

Paste 5-10 messy full name examples directly after the prompt in ChatGPT, Claude, or Gemini. Ask the model to convert the logic into a Power Query M script if your dataset exceeds 50,000 rows.

Reuse it: Use in a workflowTurn into a skillAdapt in the builder

Excel & Spreadsheets

Clean phone numbers and postal codes using Excel formulas

Transform irregular contact details into uniform formats for clean CRM imports. Use this whenever raw exports mix dashes, dots, spaces, or leading zeroes.

Excel & Spreadsheets

Parse Unstructured Text into Clean Excel Columns

This prompt generates specific Excel formulas to split messy text strings into organized columns while handling edge cases like missing delimiters.

Excel & Spreadsheets

Strip hidden characters and non-printing breaks in Excel

Remove hard carriage returns, non-breaking spaces, and invisible ASCII artifacts that break lookups. Use this after copying data from web forms or PDFs.

Excel & Spreadsheets

Consolidate separate spreadsheet tabs into a master rollup

Design a dynamic rollup architecture to aggregate multiple project or regional sheets into one live master summary that will not break when rows expand.

Excel & Spreadsheets

Write an Excel or Google Sheets Formula from Plain English

Get a ready-to-paste Excel or Google Sheets formula built for your version and columns, with a step-by-step walkthrough and one test case to check it.

Excel & Spreadsheets

Build a 3D sum formula across multiple monthly tabs

Create a reliable 3D formula to aggregate identical cell references across multiple monthly worksheets into a single summary sheet.