Library › Coding AI › Finance and accounting
Fix a currency lookup that returns wrong rates
Practice: Catching mistakes and made-up facts. About 5 minutes.
About this exercise
The FX rate formula in Invoices column D returns wrong rates and some #N/A errors. Last week the Rates table moved to columns D:E of the Rates sheet (codes in D, rates in E, rows 2-12), so the fix must point there. The controller wants errors to stay visible, so don't wrap it in IFERROR or IFNA. Give the fixed formula for D2 in one code block, then exactly 2 numbered lines naming what was wrong, under 40 words outside the code.
Common mistakes when you ask AI for this
- Not mentioning the move. The AI can't know the rates table moved, so it fixes a formula that still points at the old columns. Try: Add: "The Rates table is now in columns D:E, rows 2-12."
- Accepting hidden errors. The AI loves to wrap fixes in IFERROR, which hides problems the controller wants to see. Try: Add: "Don't use IFERROR or IFNA; errors must stay visible."
- Not asking for the causes. The AI either fixes it silently or writes paragraphs about VLOOKUP. Try: Add: "Then exactly 2 numbered lines naming what was wrong."
- Getting a menu of options. The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself. Try: Add: "Give one formula only, in one code block, no alternatives."
- Getting a tutorial. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 12 words. Nothing else."
What a strong prompt includes
- Mentions where the table moved
- Keeps errors visible
- Asks for the causes as a list
- Asks for one answer only
- Limits the explanation
Related exercises
- Add a cron line that matches the others in a crontab (Coding AI · Product managers)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add labels to a signup form without rewriting the page (Coding AI · High school students)