😫 The Pain Point
Customer list has one column: “Nguyen Van An”. Marketing tool needs: First Name “An” (to say “Hi An”). Excel formulas for string splitting are painful when name lengths vary (2 words vs 4 words).
🚀 Agentic Solution
Name Parser: Understands the structure of names (First word = Last Name, Last word = First Name).
Key Features:
- Smart Split: Function handles generic name structures.
- Middle Name: Captures everything in between as Middle Name.
⚔️ Phase 1: Commander (Quick Fix)
For a quick split.
Prompt:
“I have a ‘Full Name’ column in Excel. Split it into ‘Last Name’ (First word) and ‘First Name’ (Last word). Everything else goes to ‘Middle Name’. Save as new file.”
Result: Cleaned attributes.
🏗️ Phase 2: Architect (Permanent Tool)
For CRM Admins.
Engineering Prompt:
**Role:** Python Data Developer
**Task:** Create a "Name Splitter App".
**Requirements:**
1. **GUI:**
* Select Excel File.
* Select Name Column.
* "Split" button.
2. **Logic:**
* For each name: `parts = name.split()`.
* `First Name` = `parts[-1]`.
* `Last Name` = `parts[0]`.
* `Middle Name` = `parts[1:-1]`.
* Handle edge cases (1 word names).
3. **Deliverables:** `name_split.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Python Indexing:
parts[-1]is the “Pythonic” way to get the last element. It’s much more readable and robust than Excel’sRIGHT(A1, LEN(A1)-FIND(...)).
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Select Excel -> Split.