ChatGPT Prompts for Excel
Excel remains the most widely used data tool in business, and ChatGPT has become the fastest way to solve spreadsheet problems that would otherwise require hours of Googling or trial-and-error. The key to getting accurate Excel formulas from AI is providing precise context about your data structure. Instead of asking "how do I look up a value," describe your exact setup: "Column A has product IDs, Column B has product names, Column C has prices. I need a formula in D2 that finds the price for a product ID entered in cell F1."
VBA macro prompts should specify the exact action you want automated, the sheet and range names involved, whether the macro should handle errors, and any user interaction needed. For complex macros, describe the workflow step by step. Always ask the model to include error handling and comments. For pivot table construction, describe your raw data structure, the fields you want in rows, columns, values, and filters, and the aggregation type.
Data cleaning is where AI-assisted Excel work delivers the highest ROI. Describe the messy data pattern and the desired clean format. Save your best Excel prompts as templates with placeholder descriptions for data structure, so you can reuse them across different spreadsheets.
Excel & Spreadsheet Prompts
Get accurate formulas, macros, and data solutions — not generic advice.
Formula Generator
I need an Excel formula for this task: **Goal:** {{what_you_want_to_calculate}} **Data layout:** - Column A: {{column_a_description}} - Column B: {{column_b_description}} - Column C: {{column_c_description}} **Data starts at row:** {{start_row}} (e.g., row 2, with headers in row 1) **Total rows:** approximately {{row_count}} **Edge cases to handle:** - {{edge_case_1}} (e.g., "blank cells should be skipped") - {{edge_case_2}} (e.g., "duplicates should return the first match") Provide: 1. The formula 2. A brief explanation of how it works 3. Paste it into cell: {{target_cell}} Use the simplest function that works. Prefer INDEX-MATCH over VLOOKUP. If XLOOKUP is available (Excel 365), mention that as an alternative.
Why it works: Describing the exact column layout prevents the AI from guessing your data structure. Specifying edge cases upfront avoids formulas that break on real data. The 'simplest function' instruction prevents over-engineered solutions.
VBA Macro Writer
Write a VBA macro for Excel that does the following: **Task:** {{describe_the_automation}} **Sheet(s) involved:** {{sheet_names}} **Range:** {{range}} (e.g., "A1:D500" or "Column A, all rows with data") **Trigger:** {{trigger}} (e.g., "button click", "workbook open", "cell change") Step-by-step workflow: 1. {{step_1}} 2. {{step_2}} 3. {{step_3}} Requirements: - Include error handling (On Error GoTo) - Add comments explaining each section - Show a message box when complete with a summary - Handle the case where the sheet or range is empty Format the code so I can paste it directly into the VBA editor (Alt+F11 > Insert > Module).
Why it works: Step-by-step workflow descriptions produce accurate macros. Requiring error handling prevents macros that crash silently. The paste-ready format instruction saves setup time.
Data Cleaning Formula
I have messy data in Excel that needs cleaning: **Column:** {{column}} (e.g., "Column B, rows 2-1000") **Current format (messy):** {{messy_format}} Example messy values: - "{{example_1}}" - "{{example_2}}" - "{{example_3}}" **Desired clean format:** {{clean_format}} Expected output for the examples above: - "{{clean_1}}" - "{{clean_2}}" - "{{clean_3}}" Provide: 1. A formula I can put in an adjacent column to clean each row 2. If the formula is complex, break it into helper columns 3. If Power Query would be better for this scale, show that approach too My Excel version: {{version}} (e.g., "Excel 365", "Excel 2019")
Why it works: Showing before/after examples lets the AI infer the pattern precisely. Asking for Power Query alternatives when appropriate gives you the best tool for the job, not just formulas.
Pivot Table Setup
Help me create a pivot table in Excel: **Raw data structure:** | Column | Description | Example values | |--------|-------------|----------------| | {{col_a}} | {{desc_a}} | {{examples_a}} | | {{col_b}} | {{desc_b}} | {{examples_b}} | | {{col_c}} | {{desc_c}} | {{examples_c}} | **Analysis question:** {{what_you_want_to_know}} Tell me: 1. Which field goes in Rows, Columns, Values, and Filters 2. What aggregation to use (Sum, Count, Average, etc.) 3. Any calculated fields I should add 4. Recommended chart type to visualize the result 5. Step-by-step instructions to set it up
Why it works: Describing the data as a table with examples gives the AI concrete context. Asking for the chart recommendation turns a data question into a visual insight.
Conditional Formatting Rules
Set up conditional formatting rules for my Excel sheet: **Range:** {{range}} (e.g., "A2:F500") **Data description:** {{what_the_data_represents}} I want to highlight: 1. {{rule_1}} (e.g., "cells in Column C > 1000 → green background") 2. {{rule_2}} (e.g., "cells in Column D with text 'Overdue' → red text, bold") 3. {{rule_3}} (e.g., "entire row where Column E is blank → yellow background") For each rule, provide: - The exact steps in Excel (Home > Conditional Formatting > ...) - If a custom formula is needed, provide the formula - The order the rules should be applied (priority matters) Also flag if any rules might conflict with each other.
Why it works: Specifying rules in plain English with examples is faster than trying to figure out conditional formatting dialogs. Asking about rule conflicts prevents formatting that silently overrides itself.
Dashboard Formula Set
I'm building an Excel dashboard. Help me create the summary formulas. **Data sheet:** "{{data_sheet_name}}" with columns: {{describe_columns}} **Dashboard metrics I need:** 1. {{metric_1}} (e.g., "Total revenue this month") 2. {{metric_2}} (e.g., "Top 5 products by units sold") 3. {{metric_3}} (e.g., "Month-over-month growth %") 4. {{metric_4}} (e.g., "Count of orders by status") For each metric, provide: - The formula (using SUMIFS, COUNTIFS, LARGE, INDEX-MATCH, etc.) - Where to place it on the dashboard sheet - How to make it dynamic (auto-update when new data is added) Use named ranges or structured table references where appropriate. My data is in an Excel Table named "{{table_name}}".
Why it works: Using Excel Table names produces formulas that auto-expand with new data. Asking for dynamic formulas prevents dashboards that break when the dataset grows.
Recommended tools & resources
Browse community-shared prompt templates for every use case.
Prompt BuilderGenerate custom Excel prompts step by step.
Data Analysis PromptsAI prompts for analyzing data, finding trends, and reporting.
Prompt TipsTechniques for getting accurate formulas and code from AI.
Prompt PatternsProven structures for technical and analytical prompts.
AI Prompt ExamplesReal-world examples of effective AI prompts across domains.