40 Prompts for Excel & Data Analysis (Formulas, Macros & Cleaning)

Excel is powerful, but remembering the right formula, the right VBA syntax or the right Power Query steps is a different skill from actually understanding your data. AI closes that gap. Describe what you want in plain English, and ChatGPT, Claude, Gemini or Copilot writes the formula, the macro or the analysis plan for you. The 40 prompts below cover the five jobs that eat the most spreadsheet time: formulas, data cleaning, pivot tables and analysis, macros and automation, and charts and reporting.

  • Zybitai Editorial Team
  • November 2026
  • 11 Minutes
40 prompts for Excel and data analysis

Every prompt is copy paste ready. Replace the bracketed parts with your own columns, ranges and sheet names, then paste the prompt into your AI assistant of choice. One rule applies to all of them: AI does not do math, it predicts text. Every formula is a draft until you verify it on a small test range.

How to Write a Good Excel Prompt

A good formula prompt includes three things: your data layout, what you want to calculate, and any conditions or edge cases. Start a session by telling the AI your Excel version and your column layout, like this: “I am on Excel 365. Column A is Date, B is Region, C is Product, D is Revenue. Row 1 is headers.” That one line prevents most bad answers, because functions like XLOOKUP do not exist in Excel 2016 or 2019, and the AI needs to know which functions you can use.

AI assistant helping with Excel spreadsheets

Formulas: Prompts 1 to 10

1. The multi condition sum

“Write an Excel SUMIFS formula that totals revenue in column E where the region in column B is West, the product category in column C is Software, and the date in column A falls between January 1 and March 31, 2027.”

2. The safe lookup

“Create an XLOOKUP formula that looks up a product name in Sheet2 column A and returns the price from Sheet2 column C. If no match exists, return Not Found instead of an error.”

3. The conditional count

“Write a COUNTIFS formula that counts orders in column A where the status in column B is Shipped and the order value in column C is greater than 500.”

4. The tiered calculation

“Write a formula that calculates commission in column D: 5 percent on sales under 1000, 8 percent on sales from 1000 to 5000, and 12 percent on sales above 5000. Sales are in column C.”

5. The date difference

“Write a formula that calculates the number of working days between the start date in column A and the end date in column B, excluding weekends and the holidays listed in Sheet2 column A.”

6. The text extractor

“Write a formula that extracts the first name from a full name in cell A2, where names are stored as First Last. Handle names with middle initials.”

7. The running total

“Write a formula for column C that shows a running total of the values in column B, resetting to zero whenever the category in column A changes.”

8. The duplicate flag

“Write a formula for column B that shows Duplicate if the value in column A appears more than once in the column, and Unique otherwise.”

9. The percentage of total

“Write a formula that shows each row’s revenue in column D as a percentage of the total revenue in the whole column, and formats the result as a percentage with one decimal place.”

10. The formula explainer

“Explain this Excel formula in plain English, part by part, and tell me what could break if I copy it down 1000 rows: [paste formula].”

Data Cleaning: Prompts 11 to 18

11. The messy names fix

“Give me an Excel formula to clean a column of names that have inconsistent capitalization, extra spaces and mixed delimiters. Standardize everything to First Last format. The raw names are in column A starting at row 2.”

12. The email validator

“Write formulas to: (1) extract the domain from email addresses in column B, (2) flag any email that does not contain exactly one @ symbol, and (3) count how many emails use each domain.”

13. The phone number standardizer

“Column B has phone numbers in three formats: (555) 123-4567, 555-123-4567, and 5551234567. Write a formula for column C that standardizes all of them to XXX-XXX-XXXX format.”

14. The date fixer

“Cell A2 contains dates as text in MM/DD/YYYY format. Write a formula that converts them to proper Excel dates, and flag any cell that cannot be converted.”

15. The duplicate remover

“Write a formula that identifies duplicate rows based on columns A and B together, keeping the first occurrence and flagging the rest for review.”

16. The split column

“Column A contains addresses in the format Street, City, State ZIP. Write formulas to split them into four separate columns: Street, City, State and ZIP.”

17. The missing values handler

“My data in columns A to F has blank cells, N/A text, and zeros that actually mean missing. Write a formula for a helper column that flags each row as Complete, Missing Values, or Needs Review.”

18. The full cleanup plan

“I have a spreadsheet with 5000 rows and these columns: [list columns]. The data has inconsistent formatting, duplicates, blank cells and mixed date formats. Give me a step by step cleanup plan using formulas and Power Query, in the order I should do each step.”

Cleaning messy spreadsheet data

Pivot Tables & Analysis: Prompts 19 to 26

19. The pivot table designer

“I have sales data with these columns: Date, Product, Region, Salesperson, Revenue, Units Sold. Walk me through setting up a PivotTable that shows monthly revenue broken down by region, with product as a filter. Include how to add a calculated field for average revenue per unit.”

20. The growth calculator

“I have 12 months of revenue data in cells A2:B13, months in A, revenue in B. Write formulas to calculate month over month growth rate, a 3 month moving average, and identify which month had the largest single month decline.”

21. The top 10 finder

“Write a formula that lists the top 10 products by total revenue from my sales table, with each product’s total revenue and its share of overall revenue.”

22. The cohort analysis

“I have customer signup dates in column A and first purchase dates in column B. Help me build a cohort analysis that shows what percentage of each signup month’s customers made a purchase within 30 days.”

23. The outlier spotter

“Write formulas to flag outliers in column D using the interquartile range method, and explain in plain English how to interpret the results.”

24. The what if analysis

“My pricing model is in cells A1:D20, with price in B2, cost in B3 and volume in B4. Show me how to use Goal Seek and a data table to find the price that gives a 25 percent profit margin at three different volume levels.”

25. The survey analyzer

“I have survey responses in columns A to J, with 1 to 5 ratings and some text answers. Give me formulas and a PivotTable layout to calculate average scores by question, response counts, and the percentage of 4 and 5 ratings for each question.”

26. The file analysis prompt

“I am uploading an Excel file with sales data. Analyze it and tell me: (1) the top 5 products by revenue, (2) any unusual patterns or outliers, (3) month over month trends, and (4) three specific recommendations. Show your working and do not invent numbers that are not in the file.”

Macros & VBA Automation: Prompts 27 to 34

27. The report formatter

“Write a VBA macro that loops through every worksheet, bolds the header row, applies alternating row colors, freezes the top row, and skips the sheet called Summary. Include comments explaining each section.”

28. The duplicate remover macro

“Write a VBA macro that removes duplicate rows based on columns A and B, keeping the first occurrence. Ask the user to confirm before deleting anything, and report how many rows were removed.”

29. The sheet merger

“Write a VBA macro that combines all worksheets with the same headers into one master sheet called Combined, skipping blank rows and adding a column showing which sheet each row came from.”

30. The PDF exporter

“Write a VBA macro that exports the sheet called Report to PDF, saves it in the same folder as the workbook with today’s date in the filename, and opens the folder when it finishes.”

31. The email sender

“Write a VBA macro that sends an email through Outlook to each address in column A, with a subject from column B and a message from column C. Add error handling and a log of which emails were sent.”

32. The data entry form

“Write a VBA macro that creates a simple data entry form: it asks the user for Name, Date and Amount, validates that the amount is a number, and appends the entry to the next empty row of Sheet1.”

33. The auto refresh dashboard

“Write a VBA macro that refreshes all PivotTables and external data connections in the workbook, then updates a cell called Last Updated with the current date and time. Trigger it automatically when the workbook opens.”

34. The macro debugger

“This VBA macro gives me a Run time error 1004 on the line I have marked. Explain what causes the error, fix the code, and add error handling so it fails gracefully next time: [paste code].”

Charts & Reporting: Prompts 35 to 40

35. The chart chooser

“I have monthly revenue by product category for the last 24 months. Recommend the best chart type to show both the trend over time and the share of each category, and walk me through building it in Excel.”

36. The dashboard planner

“Help me design a one page Excel dashboard for a small business owner. It should show monthly revenue, top 5 products, sales by region, and a target vs actual comparison. Tell me which charts to use, where to place them, and which formulas feed each one.”

37. The conditional formatting rules

“Write conditional formatting rules for my sales table: highlight cells in column D green if the value is above target, red if it is below 80 percent of target, and add data bars to column E.”

38. The executive summary writer

“I am uploading a spreadsheet of quarterly results. Write a 5 bullet executive summary in plain English: what went up, what went down, the biggest surprise, and one recommendation. Base everything on the data in the file.”

39. The forecast builder

“I have 24 months of sales data in columns A and B. Show me how to use Excel’s Forecast Sheet to project the next 6 months, and explain how to interpret the confidence interval.”

40. The final quality check

“I am about to send this spreadsheet to my manager. Give me a checklist of things to verify first: formula errors, broken links, hidden sheets, print settings, and anything else that could embarrass me.”

Analyzing Excel charts and data trends

Tips for Getting Better Answers From AI

  • Always state your Excel version. XLOOKUP, FILTER, LET and dynamic arrays need Excel 365 or Excel 2021. If you are on an older version, say so, or the AI will give you formulas that return errors.
  • Describe your layout exactly. Column letters, header rows and sheet names prevent most bad answers. A prompt that says “my data” without saying where it is will get a generic answer.
  • Ask for an explanation, not just a formula. A formula you do not understand is a formula you cannot fix. Ask the AI to explain each part.
  • Test on a copy. Never run an AI written macro on your only copy of a workbook. Test it on a copy first, and keep a backup.
  • Verify the numbers. AI can write a formula that looks perfect and returns wrong numbers without throwing an error. Spot check the results against a manual calculation before you trust them.
  • Use file uploads for real analysis. ChatGPT Plus and similar paid plans let you upload a spreadsheet and get real answers from your data, not just instructions. The free tier handles formula generation, but file analysis needs the paid tier on most services.

Conclusion

The best Excel users in 2027 are not the ones who memorized the most functions. They are the ones who describe the problem clearly and let AI write the formula, the macro or the analysis plan. Keep these 40 prompts handy, adapt them to your own data, and always verify the result before it goes into a report. Your spreadsheets will get faster, cleaner and more reliable, and you will spend your time on the decisions the numbers inform, not on fighting with syntax.

Don’t Miss These, Explore More Topics

Best free alternatives to HeyGen for AI avatar videos

Best Free Alternatives to HeyGen for AI Avata r Videos

Top AI tools for 3D model generation from a single image

Top AI Tools for 3D Model Generation from a Single Image

5 Free Alternatives to Runway Gen-3

5 Best Free Alternatives to Runway Gen-3 for Text-to-Video Creation

AI in personal finance automate budgeting and expense tracking

AI in Personal Finance: How to Automate Budgeting & Expense Tracking

Free AI APIs with Generous Daily Limits

Ultimate Directory of Free AI APIs with Generous Daily Limits

How to connect Claude AI to local files using MCP

How to Connect Claude AI to Local Files Using MCP (Beginner Guide)

6 free Perplexity AI alternatives for deep academic research

6 Free Perplexity AI Alternatives for Deep Academic Research

Best AI Video Upscalers 720p to 4K

Best AI Video Upscalers to Turn 720p Old Footage into Crisp 4K

Best offline AI tools that work without an internet connection

Best Offline AI Tools That Work Without an Internet Connection