Library › Data AI › Finance and accounting
Write a lookup formula for vendor payment terms
- For Finance and accounting
- You practice Setting limits and rules
- Time about 5 minutes
- Level Beginner
About this exercise
Accounts payable needs payment terms next to each invoice. Ask for one Excel formula for C2 in a single code block, with at most 25 words outside it. It should look up the vendor ID from the Vendors tab, ignore stray spaces in the invoice's vendor ID, and show Not found when there is no match. Your team uses Excel 365.
Common mistakes when you ask AI for this
- Ignoring stray spaces. The AI looks up A2 directly, so 'V-205 ' misses. Try: Add: "Look up TRIM(A2)."
- Showing #N/A. The AI leaves the error for missing vendors. Try: Add: "If there is no match, show Not found."
- Approximate match. VLOOKUP without FALSE returns wrong rows. Try: Add: "Exact match only."
- 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
- Mentions TRIM
- Asks for exact match
- Handles missing
- Names the ranges
- 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)