Websites, apps & code / Coding & debugging
Clean up a messy table
A table from different sources with names, phones and dates all written differently.
Fill in your details
Leave blank to use the example. Names are remembered for other prompts too (stored only on your device).
Prompt
I have a messy table, please help me tidy it. What it looks like (fake examples): Lim Ah Beng | 012 3456789 | 3/4/25; lim ah beng | +60123456789 | 2025-04-03 Wanted result: Names capitalised, phones as 012-345 6789, dates as 2025-04-03, duplicates kept once Tool: Give formulas I can paste. Please: 1. Ask me 3 questions and restate the cleaning rules; start only after I confirm. 2. Do not change the original data; put results in new columns or a new file. 3. List uncertain rows (such as names that may be two people or unreadable dates) for me to decide instead of guessing. 4. Teach me to try 10 rows first and run the full set once they look right. 5. Remind me to back up real customer data and process it only somewhere I trust, never pasting it publicly. Do not ask me to paste passwords, API keys, IC numbers or customer data; if my code contains any, remind me to replace them with [FAKE] values first.
Paste it into ChatGPT, Gemini, Claude or Meta AI.
Test result
What we noticed
The AI asked 3 questions and flagged that 3/4/25 is ambiguous. It gave formulas for columns E to H, showing "to check" for unreadable rows and only flagging same-name rows. The formulas were not run in a real sheet; test on 10 fake rows first.
See what the AI actually wrote
3 questions, then the rules restated:
- Google Sheets or Excel? The formulas differ a little; I use Google Sheets below.
- Is the data in three columns (name, phone, date) in A, B and C, with a heading in row 1?
- Is "3/4/25" 3 April or 4 March? In your examples 3/4/25 and 2025-04-03 look like the same day, so I treat it as day/month/year for now; please confirm.
Cleaning rules (please confirm):
- Names: capitalise each English word (lim ah beng becomes Lim Ah Beng).
- Phones: digits only, formatted as 012-345 6789.
- Dates: 2025-04-03.
- Duplicates: rows with the same phone (after cleaning) are kept once.
Original data stays as it is: results go in columns E, F and G; A, B and C are not changed.
Formulas (row 2, drag down):
- Name (E2):
=PROPER(TRIM(A2)) - Phone (F2): strip non-digits, then re-format:
=LET(d, REGEXREPLACE(B2,"[^0-9]",""), d2, IF(LEFT(d,2)="60", "0"&MID(d,3,20), d), IF(LEN(d2)=10, LEFT(d2,3)&"-"&MID(d2,4,3)&" "&RIGHT(d2,4), "to check"))
- Date (G2): if it is a real date use
=TEXT(C2,"yyyy-mm-dd"); if it is text, "3/4/25" depends on the sheet's locale, so use=IF(ISNUMBER(C2), TEXT(C2,"yyyy-mm-dd"), "to check"), so anything unreadable becomes "to check" instead of a guess. - Duplicate flag (H2):
=IF(COUNTIF($F$2:F2, F2)>1, "duplicate", ""), which only marks. To keep one row, review the "duplicate" rows and handle them by hand, or use Data > Data cleanup > Remove duplicates, but only on a copy.
Rows I cannot judge, listed for you to decide:
- Phones that are not 10 digits: column F shows "to check".
- Unreadable dates: column G shows "to check".
- Same name but different phone: might be two people or one person with a new number; I do not merge them, and flag with
=COUNTIF($E$2:$E$100,E2)>1for you to look at.
Try 10 rows first: make a copy of the whole sheet (File > Make a copy), paste only 10 rows in, check columns E to H match what you expect, and then paste everything.
Reminder: back up real customer data first and process it only on a computer and Google account you trust, never pasting it publicly, and you do not need to paste it to me; fake examples are enough.
AI tools that suit this
- ChatGPT Suggested tool Free plan
The most widely used AI chat, for writing, questions and images
- Claude Suggested tool Free plan
Strong at long documents, editing and code
- Gemini Suggested tool Free plan
Google's AI; generates and edits images, works with Gmail and Docs
Recommendations only, not sponsored. Check each site for what the free plan includes.
This site is made by FullMark Tech
Want your own website, or your shop spreadsheets automated? FullMark Tech builds business websites and custom Excel tools.