Skip to content

Write a Spreadsheet Formula From a Plain-English Description

Describe what you want calculated and get a working Excel or Google Sheets formula with a plain explanation of how it works.

Make it yours

Fill in each variable and watch the prompt update. Anything still in {{braces}} needs your input before you use it.

Fill in the blanks

0 of 4 filled

Excel, Google Sheets, LibreOffice, etc. — functions differ.

Which columns hold what, and where the data starts and ends.

The result you want, described in words.

The cell where you'll put the formula.

Live previewUnfilled
I'm using {{spreadsheet_app}}. Write a formula for me.

My data layout: {{data_layout}}
What I want to calculate: {{goal}}
Where the formula will go: {{target_cell}}

Please give me:
1. The formula, ready to paste
2. A plain-English, step-by-step explanation of each part
3. One quick way to test that it's working correctly
4. Any edge cases that could break it (blank cells, text instead of numbers, etc.) and how to handle them

If there's a simpler alternative that works in my app, mention it briefly. If my request is ambiguous, state the assumption you made.
Open in Playground

Example

Example input

Filled prompt
I'm using Google Sheets. Write a formula for me.

My data layout: Column A has order dates, column B has the salesperson's name, column C has order amounts. Data is in rows 2 to 500 with headers in row 1.
What I want to calculate: total sales for the salesperson named in cell F1, only for orders in March 2026
Where the formula will go: F2

Please give me:
1. The formula, ready to paste
2. A plain-English, step-by-step explanation of each part
3. One quick way to test that it's working correctly
4. Any edge cases that could break it (blank cells, text instead of numbers, etc.) and how to handle them

If there's a simpler alternative that works in my app, mention it briefly. If my request is ambiguous, state the assumption you made.

Example output

Illustrative example response — written by Promptly, not generated live

1. Formula (paste into F2)

=SUMIFS(C2:C500, B2:B500, F1, A2:A500, ">="&DATE(2026,3,1), A2:A500, "<"&DATE(2026,4,1))

2. How it works

  • SUMIFS adds up values that meet all the conditions.
  • C2:C500 — the amounts to add.
  • B2:B500, F1 — only rows where the name matches cell F1.
  • A2:A500, ">="&DATE(2026,3,1) — dates on or after 1 March 2026.
  • A2:A500, "<"&DATE(2026,4,1) — dates before 1 April, which includes all of 31 March regardless of time.

3. Quick test Filter the sheet to one salesperson and March, select column C, and compare the sum in the status bar with F2.

4. Edge cases

  • Dates stored as text won't match — check with =ISNUMBER(A2) (should be TRUE).
  • Extra spaces in names ("Ana " vs "Ana") won't match — clean with TRIM.
  • If rows are added past 500, use C2:C instead of C2:C500.

Assumption: "March" means calendar March 2026.

Why it works

Formulas fail most often because the model guesses your layout. Stating exact columns, row ranges, and the app removes that guesswork. Asking for an explanation, a test, and edge cases turns a copy-paste answer into something you can understand and verify — important because an AI-written formula can look right and still be subtly wrong.

Techniques used