Home › Prompt examples › Data analysis AI prompts: 23 copy-ready examples
Data analysis AI prompts: 23 copy-ready examples
23 prompts from 7 data analysis guides, ready to copy into any AI chat assistant.
Replace the [brackets] with your details. Every prompt comes from one of our full guides, which also covers which tool to use, the steps and the risks. Want a prompt for something else? Use the prompt builder.
Tasks on this page
- AI prompts to analyze a spreadsheet 4
- AI prompts to write an Excel formula 3
- AI prompts to clean messy data 3
- AI prompts to build a dashboard 3
- AI prompts to write data analysis code 3
- AI prompts to set up a scheduled data report 3
- AI prompts to write an Excel macro 4
AI prompts to analyze a spreadsheet
When to use: Upload a CSV/XLSX and ask questions, get charts. Full guide: Analyze a spreadsheet
Here is a spreadsheet of [what it contains]. Before analysing, tell me: the number of rows, each column and its type, missing values, and anything that looks wrong (duplicates, odd dates, text in number columns).
Using this file, answer: [question]. Show the steps or code you used, the exact filters, and the final number. If the data can't answer it, say so.
Compare [period A] with [period B] for [metric]. List the 3 biggest changes, by how much, and which rows drive them. Then suggest one chart that shows it clearly.
Write the Excel or Google Sheets formula (SUMIFS, COUNTIFS or a pivot setup) that reproduces your answer, using my column names, so I can verify it in the original file.
AI prompts to write an Excel formula
When to use: Get or explain formulas for your sheet. Full guide: Excel formula help
In [Excel / Google Sheets], column A has [what], column B has [what], headers in row 1. In column C I want [result]. Example: for row 2 the answer should be [value] because [reason]. Give the formula for C2 and explain it.
Explain this formula step by step in plain English, as if to a beginner, and tell me what happens if a cell it uses is blank: [paste formula]
This formula shows [#N/A / #VALUE! / wrong number] in row [N]. Here is the formula and what's in the cells it uses: [details]. Explain why and give a corrected version.
AI prompts to clean messy data
When to use: Normalize names, dates and duplicates with code execution. Full guide: Clean messy data
Clean the attached file. Rules: dates to YYYY-MM-DD (source dates are [day-first / month-first]); trim spaces; company names in Title Case; flag (don't delete) possible duplicates where [rule]. Report rows in/out and a sample of 10 changed rows.
Before changing anything, profile this file: column types, blanks per column, odd values, likely duplicates and date formats you see. Ask me how to handle each problem.
Write a [Python pandas / Excel Power Query] script that applies these cleaning rules to a file with the same columns: [rules]. Add comments so I can rerun it monthly.
AI prompts to build a dashboard
When to use: Turn data into a dashboard or interactive artifact. Full guide: Build a dashboard
From the attached data, build a simple dashboard answering: [questions]. One chart per question, a one-line takeaway under each, and a table of the exact numbers used.
For each chart, explain the aggregation used, any rows excluded and whether the axis starts at zero. Flag anything that could mislead.
Give me the code or spreadsheet formulas to rebuild this dashboard next month from a file with the same columns.
AI prompts to write data analysis code
When to use: Generate pandas/SQL notebooks you can rerun. Full guide: Write analysis code
Write [pandas / SQL] code to answer: [question]. Data: [columns and types]. Print row counts after each filter or join, and comment each step.
Review this analysis code for mistakes: wrong joins, silently dropped rows, wrong aggregations. Explain each issue in plain English. [code]
Turn this notebook into a script that takes the file path and month as arguments and writes the result to CSV. Add basic checks that fail loudly if columns are missing.
AI prompts to set up a scheduled data report
When to use: Automatically pull data and email a summary on a schedule. Full guide: Scheduled data report
n8n: weekly cron → query DB → AI summary → email team.
n8n: weekly cron → query DB → AI summary → email team. I'm new to this: explain each step in plain words and ask me for anything you need before starting.
n8n: weekly cron → query DB → AI summary → email team. When you finish, list any assumptions you made, anything you're unsure about, and what I should double-check before using the result.
AI prompts to write an Excel macro
When to use: Describe a repetitive spreadsheet chore and get a VBA macro or Google Apps Script, with each step explained. Full guide: Write an Excel macro or Apps Script
Write an Excel VBA macro for this task. Sheet: [name]. Columns: [A: Date, B: Client, ...]. Steps: [describe]. Requirements: add comments to every block, don't delete anything without asking with a message box, and stop with a clear message if the sheet or column isn't found. Then list every line that changes or deletes data.
Write a Google Apps Script for Google Sheets that [task]. Explain how to add it in Extensions > Apps Script, what permissions it will ask for, and how to run it from a custom menu.
My macro stops with this error: [error text] on this line: [line]. Here is the full macro: [paste]. Explain the cause and give a corrected version.
Explain what this macro does, step by step, in plain English, and flag anything risky (deleting, overwriting, sending email, connecting to the internet): [paste]
More prompt examples
All prompt examples · Writing & editing · Coding · Research · IT ops & DevOps · Customer support · Automation & agents · Image & video · Personal productivity · Education & learning · Marketing · Sales · HR & recruiting · Finance & accounting · Legal & compliance · Healthcare admin · Cybersecurity · Product & design · Personal life & home · Travel · Content creation · Small business
See also: Best AI tools for data analysis