Back to cookbook

AI Prompt to Audit Google Sheets Formulas for Errors Using Google Workspace's MCP Server

0 views Published

Make this prompt yours

Share

This prompt turns an AI assistant into a spreadsheet auditor that can read a live Google Sheet through Google Workspace's MCP server and systematically check every formula for errors, broken references, and inconsistent logic. It's built for operations analysts, finance teams, startup founders, and anyone who inherited a spreadsheet with formulas they didn't write and don't fully trust.

Instead of manually clicking through hundreds of cells, the model uses the MCP connection to pull actual cell contents, formula strings, and sheet structure, then flags issues like #REF! errors, formulas that silently reference the wrong row after a sort, mismatched ranges in a SUMIF or VLOOKUP, and columns where some rows use a formula while others contain a hardcoded number. The output is a structured list of problems tied to specific cell addresses, not a vague summary.

Because the assistant is reading the sheet directly rather than guessing from a pasted screenshot, the audit catches drift between what a formula was supposed to do and what it actually computes today. Once the audit prompt itself is built, running it through Intelligence Score is a useful sanity check before relying on it for a sheet that drives real financial or operational decisions.

Prompt template

Make this prompt yours

prompt-template
365 tokens
ROLE You are a meticulous spreadsheet auditor with deep expertise in Google Sheets formulas, functions, and data integrity, connected to the live sheet via an MCP server. CONTEXT Spreadsheet name: [SPREADSHEET NAME] Tab/sheet to audit: [TAB NAME] Purpose of this sheet: [WHAT THE SHEET IS USED FOR, e.g. "monthly revenue forecast shared with the finance team"] Known manual-override columns (do not flag as errors): [LIST OF COLUMNS OR "NONE"] Date or version this sheet was last fully reviewed: [DATE OR "NEVER"] TASK Using the MCP connection, read every formula in the specified tab and identify: 1. Broken references (#REF!, #VALUE!, #N/A, #DIV/0! and similar error values) 2. Formulas that reference a range which no longer matches the data (e.g. a SUM or VLOOKUP range that stops short of new rows) 3. Inconsistent logic within a column, where some rows use a formula and others contain a different formula or a hardcoded value with no explanation 4. Circular references or formulas that indirectly depend on their own output CONSTRAINTS - Do not flag the manual-override columns listed above as errors - Quote the exact formula text and cell address for every issue found - Do not rewrite or change any formulas in the sheet; only report findings - If a formula's intent is ambiguous, say so explicitly rather than guessing what it was supposed to do OUTPUT FORMAT Return a table with these columns: Cell Address | Formula Found | Issue Type | Explanation | Suggested Fix (if obvious) Follow the table with a short summary: total issues found, how many are broken references vs. logic inconsistencies, and which columns need the most attention.

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
344 tokens
ROLE You are a meticulous spreadsheet auditor with deep expertise in Google Sheets formulas, functions, and data integrity, connected to the live sheet via an MCP server. CONTEXT Spreadsheet name: Q4 Revenue Forecast Tab/sheet to audit: Monthly Breakdown Purpose of this sheet: monthly revenue forecast shared with the finance team and leadership Known manual-override columns (do not flag as errors): Column F (Manual Adjustments) Date or version this sheet was last fully reviewed: NEVER TASK Using the MCP connection, read every formula in the specified tab and identify: 1. Broken references (#REF!, #VALUE!, #N/A, #DIV/0! and similar error values) 2. Formulas that reference a range which no longer matches the data (e.g. a SUM or VLOOKUP range that stops short of new rows) 3. Inconsistent logic within a column, where some rows use a formula and others contain a different formula or a hardcoded value with no explanation 4. Circular references or formulas that indirectly depend on their own output CONSTRAINTS - Do not flag the manual-override columns listed above as errors - Quote the exact formula text and cell address for every issue found - Do not rewrite or change any formulas in the sheet; only report findings - If a formula's intent is ambiguous, say so explicitly rather than guessing what it was supposed to do OUTPUT FORMAT Return a table with these columns: Cell Address | Formula Found | Issue Type | Explanation | Suggested Fix (if obvious) Follow the table with a short summary: total issues found, how many are broken references vs. logic inconsistencies, and which columns need the most attention.

When to use it

  • Before presenting a shared financial model, budget, or forecast sheet at a meeting
  • After inheriting a spreadsheet built by a former employee or contractor with no documentation
  • When a sheet has been copied, filtered, or sorted multiple times and formulas may now point to the wrong rows
  • Before connecting a Google Sheet to a dashboard, Zapier workflow, or another tool that will treat its numbers as reliable

Best practices

  • Give the assistant the exact sheet name and tab, not just "my spreadsheet," so the MCP server pulls the right range
  • Ask for findings grouped by cell address and severity (broken formula vs. questionable logic) instead of one long paragraph
  • Re-run the audit after any bulk edit, sort, or column insert, since those are the most common causes of silently broken references
  • Have the assistant quote the actual formula text it flagged, not just a description, so you can verify the issue yourself before fixing it

Common mistakes

  • Asking for a general "review" instead of specifying which error types matter most (references vs. logic vs. formatting)
  • Not telling the assistant which columns are intentionally manual overrides, causing it to flag correct hardcoded values as errors
  • Trusting the audit on a sheet with hidden or filtered rows without asking the assistant to confirm it checked those too
  • Applying suggested formula fixes directly without first checking whether the referenced range still makes sense for the current data

FAQs

Can an AI model actually read my Google Sheet's formulas, not just the displayed values?

Yes, but only through a live connection like an MCP server that exposes the sheet's underlying data, including formula strings and cell references. Without that connection, a model can only see whatever text or values you paste in, which hides the actual formula logic and makes a real audit impossible.

What's the difference between asking ChatGPT to "check my spreadsheet" and using a structured audit prompt like this?

A vague request like "check my spreadsheet" usually gets a generic, high-level response because the model has no instructions on what counts as an error or how to report findings. A structured prompt tells it exactly which error types to look for, which columns to leave alone, and what format to return results in, which produces an actionable, cell-by-cell report instead of a summary.

Will this prompt work with Claude or Gemini instead of ChatGPT?

Yes. The prompt itself is model-agnostic; what matters is that whichever model you use has an active MCP connection (or equivalent live data access) to the actual Google Sheet. The role, context, constraints, and output format in the template work the same way across ChatGPT, Claude, and Gemini.

Which Cuelara tool can help me check this audit prompt's quality before relying on it?

Intelligence Score - it grades a prompt's clarity and specificity on a 0-100 scale and suggests improvements, which is useful here since a vague audit prompt on a financial sheet can miss issues that actually matter.

Found this prompt useful? Share it.

Share

More in Data Analysis

Data Analysis

AI Prompt to Perform Root Cause Analysis on a Sudden Metric Drop

This root cause analysis prompt helps analysts, product managers, and founders figure out why a key metric — signups, conversion rate, reven…

ROLE: You are a data analyst helping investigate a sudden change in a business metric.

CONTEXT:
- Metric: [METRIC NAME, e.g. "trial-to-paid conversion rate"]
- Normal value: [BASELINE VALUE OR RANGE]
- New value: [CURRENT VALUE]
- Time window of the drop: [START DATE] to [END DATE]
- Relevant data available: [PASTE NUMBERS, A TABLE, OR DESCRIBE THE CHARTS YOU HAVE]
- Known changes around this time: [LIST ANY DEPLOYS, CAMPAIGNS, PRICING CHANGES, OR "none known"]
- Audience for this analysis: [e.g. "engineering team", "founder", "board update"]

TASK:
1. List the most plausible causes for this drop, ordered from most to least likely given the data provided.
2. For each cause, state what evidence in the data supports or weakens it.
3. For each cause, specify the exact additional data or check that would confirm or rule it out.
4. Flag if the drop could simply be normal variance, and explain what would show that.
5. End with a short, plain-language summary suitable for the stated audience.

CONSTRAINTS:
- Do not state a cause as confirmed unless the provided data directly supports it — use "likely," "possible," or "unconfirmed" language for anything else.
- Do not invent data points that were not provided.
- Keep the hypothesis list to a maximum of 5 items.

OUTPUT FORMAT:
A numbered list of hypotheses (most to least likely), each with: supporting/weakening evidence, and the next check to run. Followed by a short summary paragraph.

Make this prompt yours

Data Analysis

AI Prompt to Build a Data Dictionary From a Spreadsheet or Database Table

This data dictionary prompt asks ChatGPT, Claude, or Gemini to turn a raw spreadsheet or database table into a clear reference document: eve…

You are a data analyst creating a data dictionary for a dataset so other people can understand and use it correctly.

Context:
- Source: [e.g., spreadsheet export, PostgreSQL table, CSV file]
- Table or sheet name: [NAME]
- Audience: [e.g., BI analysts, a new engineer, external partner]

Data sample (paste column headers plus 10-20 real rows below):
[PASTE SAMPLE DATA HERE]

Task:
For each column in the sample, produce:
1. Column name as it appears in the source.
2. Inferred data type (string, integer, decimal, date, boolean, categorical, etc.).
3. A one-sentence description of what the column represents, based only on the sample data.
4. Notes on anything unusual: nulls, mixed formats, inconsistent units, likely key or foreign key, or values that look like placeholders.
5. A confidence level (High, Medium, Low) for how certain you are about the description.

Constraints:
- Do not state a description as certain if the sample doesn't clearly support it; use Medium or Low confidence instead.
- Call out any columns that look like duplicates of each other or likely primary/foreign keys in a separate summary section.
- Keep descriptions to one sentence each.

Output format:
A single Markdown table with columns: Column Name | Data Type | Description | Notes | Confidence, followed by a short 'Keys and Relationships' summary section.

Make this prompt yours

Data Analysis

AI Prompt to Query and Analyze Supabase Data via Supabase's MCP Server

This prompt is for teams running Claude or ChatGPT with Supabase's MCP server connected, so the model can read a live Postgres database dire…

You are a data analyst with read-only access to a Postgres database through an MCP database connection. Follow these rules for every request:

ROLE
- Act as a careful analyst who verifies before concluding.

CONTEXT
- Database: [DATABASE NAME]
- Relevant tables: [TABLE NAMES, e.g. users, subscriptions, events]
- Business question: [QUESTION, e.g. how many trial users converted to paid in the last 30 days]

CONSTRAINTS
- Only run read-only SELECT queries. Never run INSERT, UPDATE, DELETE, or DDL statements.
- Before answering, list the exact query or queries you plan to run and wait for confirmation if any query touches more than [ROW LIMIT] rows.
- If a referenced table or column does not exist, say so explicitly instead of guessing a substitute.
- Show a sample of up to 5 returned rows alongside any aggregate numbers.

OUTPUT FORMAT
1. Queries run (as SQL)
2. Row counts and sample data
3. Plain-language answer to the business question
4. Any caveats about data quality or missing values

Task: [SPECIFIC ANALYSIS REQUEST]

Make this prompt yours