Ten minutes. That is how long it should take to stop a spreadsheet accepting garbage in the first place. Instead most teams spend an hour every week fixing what someone typed on a phone. These seven Claude prompts for data validation rules write the rules for you: what each column accepts, what message appears when it does not, and which formula catches the rows that slipped in before the rule existed.
Quick checklist
- — Each column has one accepted format, in writing.
- — The error message tells the person what to type instead.
- — Rules block entry, not just highlight it.
- — Historical rows are audited separately from new entry.
- — Cross-field rules exist where two columns must agree.
- — Someone owns the rule list when the sheet changes.
The prompts
1. Rule inventory for the whole sheet
Here are my columns and what they hold: [column list with examples]. For each one, propose a validation rule in [spreadsheet tool], the error message to show, and whether to block or warn.
What it does: Builds the full rule set in one pass instead of column by column over weeks.
How to use: Replace [column list with examples] and [spreadsheet tool]; drop rules nobody will maintain.
2. Number limits for a quantity column
Write a validation rule for column [column name] that only accepts whole numbers between [minimum] and [maximum]. Include a clear input message and a custom error.
What it does: Stops negatives, typos, and pasted units from entering a numeric column.
How to use: Replace [column name], [minimum], and [maximum]; decide whether blanks are allowed.
3. Text length and pattern rule
My [column name] column should hold values like [example value]. Write a validation rule that checks the pattern, and a formula that flags existing rows that break it.
What it does: Catches near-miss entries that look right at a glance.
How to use: Replace [column name] and [example value]; test with three bad values before applying.
4. Date window for entry
Write a rule for column [date column] that only accepts dates between [start date] and [end date], and warns when the date is in the future.
What it does: Keeps planning sheets from accepting dates outside the period they cover.
How to use: Replace [date column], [start date], and [end date]; update the window each period.
5. Cross-field consistency rule
In my sheet, [column A] must always be filled when [column B] is not blank. Write a custom validation formula for that, and explain where to apply it.
What it does: Enforces the relationship between two columns that single-cell rules cannot see.
How to use: Replace [column A] and [column B]; apply the rule to the whole column, not a range that stops growing.
6. Error message people will actually read
Rewrite these validation error messages so a new hire understands them: [paste current messages]. Each one should say what is wrong and what to enter instead, in under 15 words.
What it does: Cuts the support messages that arrive because the error only said “invalid input”.
How to use: Paste [current messages]; keep the tone neutral, not scolding.
7. Audit rows that predate the rules
Write a formula that lists every row in [sheet name] where [column name] breaks this rule: [rule description]. Return the row numbers so I can review them in order.
What it does: Finds the bad data that was already there before validation existed.
How to use: Replace [sheet name], [column name], and [rule description]; fix or delete each flagged row by hand.
How to score your own output
- Type a deliberately wrong value into each column and see whether the sheet stops you.
- Read every error message as if you were on your first day. It should tell you what to do next.
- Add a new row at the bottom. The rules should still apply there.
Keep going
- Browse the Excel & Spreadsheets prompt library
- Gemini prompts for Gantt charts in spreadsheets
- ChatGPT prompts for conditional formatting
- ChatGPT prompts for sales pages
More free prompts for Excel & Spreadsheets are waiting in the GuPrompt library.