📊

Phone Number Fixer

Standardize formatting of phone numbers (e.g., converting +84, 016... to 09...) for entire datasets.

Excel ⭐ Beginner ⏱️ 3 minutes

😫 The Pain Point

Customers input phones in every format imaginable: +84-90..., 090 123..., (090) 123.... SMS marketing tools reject anything that isn’t a clean 10-digit number 0901234567.

🚀 Agentic Solution

The Normalizer: Strips junk characters and unifies formatting.

Key Features:

  • Prefix Logic: Changes +84 to 0.
  • Validation: Checks if the number has the correct length (10 digits).

⚔️ Phase 1: Commander (Quick Fix)

For a quick cleanup.

Prompt:

“I have a ‘Phone’ column. Remove all non-digit characters. If it starts with ‘84’, replace with ‘0’. Check if length is 10. If not, mark as Invalid.”

Result: Cleaned numbers.

🏗️ Phase 2: Architect (Permanent Tool)

For Telesales.

Engineering Prompt:

**Role:** Python Data Cleaner
**Task:** Create a "Phone Number Standardizer".
**Requirements:**
1.  **GUI:** Input Excel -> Select Column -> Process.
2.  **Logic:**
    *   `re.sub(r'\D', '', phone)` (Remove non-digits).
    *   Normalize prefix (Country code rules).
    *   Validate length.
    *   Output statistics (Valid vs Invalid count).
3.  **Deliverables:** `phone_fixer.py`, `run.bat` (Windows), `run.sh` (Mac).

🧠 Prompt Decoding

  • Regex \D: This simple regex means “Anything that is NOT a Digit”. Replacing it with empty string removes spaces, dashes, parentheses instantly.

🛠️ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Select File -> Fix.

Related Workflows

Explore other categories

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.