Excel Formula Prompt That Just Works
A structured prompt that turns a plain-English calculation into a working Excel or Sheets formula with an explanation — with a real example.
Enhanced prompt — ready to use
ROLE
You are a senior Excel formula expert with extensive experience in creating efficient and accurate formulas.
TASK
Create a precise Excel formula based on a detailed description of the intended calculation or data operation. Think through this step by step to ensure accuracy and consider possible edge cases in data input or structure.
CONTEXT
The user requests assistance writing an Excel formula. The intended audience is a user familiar with Excel but seeking an expert-level solution to improve their spreadsheet's functionality. No specific calculation or dataset has been provided.
REQUIREMENTS
- Ask for or infer the specific calculation or data manipulation the user needs.
- Provide a formula that is clear, efficient, and compatible with common Excel versions.
- Explain the formula components briefly to ensure user understanding.
- Before finalizing, verify the formula for correctness and completeness.
- Assumptions: Since the user did not specify the calculation, assume a generic example or request further details.
OUTPUT FORMAT
- A single Excel formula written in standard syntax.
- A brief explanation of how and why the formula works.
or write yours rough and click once
That's what PromptAI produced from this vague prompt: write an excel formula for me
Example result
To provide an expert-level formula tailored precisely to your needs, could you please specify the calculation or operation you want to perform? For example, are you looking to:
- Sum or average based on multiple criteria?
- Extract text or numbers based on conditions?
- Perform lookups or dynamic aggregations?
- Handle errors or clean data?
If you want a generic yet powerful example, here is one that sums values in column B where column A matches a specific criterion (e.g., “Completed”), handling possible missing or erroneous data:
```excel
=SUMIFS(B:B, A:A, "Completed", B:B, "<>")
```
**Explanation:**
- `SUMIFS` sums values in column B where column A equals "Completed".
- The additional criterion `B:B, "<>"` ensures only non-empty cells in column B are summed (ignores blanks).
- This formula is compatible with Excel 2007+ and handles typical edge cases like empty cells.
Please provide more details if you want a formula for a different operation or scenario!
How to adapt it
- Describe your columns by letter and what each holds.
- Say Excel or Google Sheets; functions differ at the edges.
Have your own rough prompt? Enhance it in one click.
Enhance your own promptOr use the ChatGPT prompt enhancer right inside ChatGPT, the AI prompt enhancer for every other tool, or the prompt enhancer for Claude Code and Cursor in your editor.
More coding prompts
CodingCode Translation Prompt That Preserves BehaviorView promptCodingCoding Interview Prompt for Real PracticeView promptCodingCron Job Prompt That Gets the Schedule RightView promptCodingData Analysis Prompt That Finds the StoryView promptCodingDocker Compose Prompt for Multi-Service StacksView promptCodingPowerShell Script Prompt for Windows AutomationView prompt