Library › Data AI › Office and admin
Write a formula that cleans messy product names
- For Office and admin
- You practice Setting limits and rules
- Time about 5 minutes
- Level Beginner
About this exercise
Your product list has stray spaces and mixed capitals. Ask for one Excel formula for B2 in a single code block, then one line starting 'Example:' showing one row before and after, under 15 words outside the code. It should trim extra spaces, replace non-breaking spaces from web copy, and use Proper Case.
Common mistakes when you ask AI for this
- Using TRIM alone. TRIM leaves the hidden non-breaking spaces from the website copy. Try: Add: "SUBSTITUTE CHAR(160) with a normal space before TRIM."
- Wrong order or case. The AI applies PROPER first or leaves capitals alone. Try: Add: "Wrap it all in PROPER(TRIM(...))."
- Extra tools and chatter. The AI suggests Power Query and explains each function. Try: Add: "One formula in one code block, then an Example: line. Nothing else."
- Leaving the format to chance. The AI picks its own length and layout unless told the exact shape. Try: Add: "Put the code in exactly 1 code block. Keep the writing outside the code under 15 words."
What a strong prompt includes
- Names CHAR(160)
- Names the functions
- Rules out extra tools
- Asks for an example line
- Limits the output
Related exercises
- Accept the buyer's counteroffer on three stated conditions (Sales AI · Sales and customer success)
- Accrue goods received but not invoiced at PO price (Finance AI · Accountants)
- Acknowledge a cancellation request without a save attempt (Customer Support & Success AI · Customer success managers)
- Acknowledge an accessibility bug without a promised date (Customer Support & Success AI · Customer support teams)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)