Writes a Google Apps Script or Excel VBA macro to automate a repetitive spreadsheet task, with input validation, error handling, undo-safe design, and no hardcoded secrets. Use when someone says "write a macro", "automate this in Google Sheets", "Apps Script for X", "VBA to do Y", or describes clicking the same cells repeatedly.