Ultra Prompt

← All articles

How to write the Excel formula you need without learning Excel

By Friday you can have a live spreadsheet that automatically flags every invoice older than 30 days. No Excel class. No YouTube rabbit hole. No calling in a favor from the IT department. The formula exists. You just need to know how to ask for it in plain English, and that's the only skill this guide teaches.

Most people waste an hour hunting through help forums for a function that takes an AI about four seconds to produce. The gap isn't intelligence. It's knowing how to describe what you need precisely enough that the model doesn't guess. That's the whole game, and there are four moves.

Say what the cell should show, in plain words

Before you open any AI tool, write one sentence that describes exactly what you want to appear in the cell. Not the problem you're trying to solve. Not the process you went through last month. The output. What should it say?

This step trips most people up because they describe their situation instead of their desired result. "I need to track overdue invoices" tells the AI nothing about what to put in column D. "Return the word OVERDUE if the invoice is more than 30 days old" tells it everything.

Try this: Write your sentence in the form "Return [X] if [condition], otherwise return [Y]."

For the invoice-aging sheet, that sentence looks like this:

Write an Excel formula that returns "OVERDUE" if the invoice date
in column B is more than 30 days older than today, otherwise return "".

Commit to the output type before you prompt. Do you want TRUE/FALSE? A text label like "OVERDUE"? A number of days? Each one produces a different formula. Decide first, then write the sentence.

Describe your columns, not your problem

Once you know what the cell should show, the AI needs to know where your data lives. Column letters, data types, and header rows. That's it. You don't need to explain the business context or your accounting process. Just map the spreadsheet.

Skipping this step is why most AI-generated formulas need editing. The model assumes a layout that doesn't match yours, produces something like =IF(TODAY()-A1>30,"OVERDUE","") when your dates are in column B starting at row 2, and you're back to Googling why it doesn't work.

Add this block directly after your first sentence:

Column B contains invoice dates formatted as mm/dd/yyyy.
Column C contains the invoice amount.
The sheet has a header row in Row 1, so data starts in Row 2.

If your sheet pulls from another tab, name that tab here too. "Data is on the sheet named 'Invoices'" saves a whole round of back-and-forth. The more specific the map, the less you have to touch the output.

If you're also building reports or tracking KPIs alongside your invoice sheet, the same column-mapping technique applies across any data task. It's the single habit that separates prompts that work from prompts that waste time.

Get the formula and a one-line explanation

Now combine both pieces into a single prompt and ask for two things at once: the formula and one sentence explaining what it does. The explanation isn't fluff. It's your documentation. You can paste it into a comment in the cell, drop it into a Slack message, or hand it to a colleague who takes over the sheet next quarter.

Structure your prompt like this:

Task: Flag invoices >30 days old.
Columns: B = Invoice Date (mm/dd/yyyy), C = Amount.
Data starts in Row 2. Header in Row 1.
Output: "OVERDUE" if >30 days past today, "" if not.
Return the formula and a one-sentence explanation.

A well-structured prompt like that produces output you can use immediately:

Formula (paste into D2): =IF(TODAY()-B2>30,"OVERDUE","")

Explanation: Subtracts the invoice date in B2 from today's date; if the difference exceeds 30 days, the cell displays "OVERDUE," otherwise it stays blank.

One prompt. Paste-ready formula. Documentation included. The explanation also doubles as a gut-check. If the one-sentence description doesn't match what you asked for, the formula is wrong and you'll catch it before touching your spreadsheet.

This is also the right moment to ask for variations if you need them. A second prompt like "Now show me the version that highlights invoices 60 days or older in a separate column" takes seconds and builds on the formula the AI already knows about.

Test it on two rows before you fill down

Don't trust a formula you haven't seen work. Copy it into two cells: one row that should trigger OVERDUE, one that shouldn't. Look at what comes back. This catches the most common failure mode in AI-generated formulas before it affects hundreds of rows.

The most useful thing to check is whether the formula's logic matches your actual policy. Before you fill down, ask yourself: does "more than 30 days" match your threshold, or does your policy mean something slightly different at the boundary? Catching a mismatch on two rows costs 30 seconds. Catching it after the report is out costs a lot more.

Use a debugging prompt to make the AI do the checking for you:

Formula: =IF(TODAY()-B2>30,"OVERDUE","")
Test rows:
  B2 = a date that should be clearly overdue (e.g., more than 60 days ago)
  B3 = a date that should not be overdue (e.g., two weeks ago)
Show what each row returns and flag any logic errors.

The AI walks through both rows, confirms which returns "OVERDUE" and which returns blank, then flags edge cases you may not have thought to specify:

Row 2: Invoice date is well past 30 days. Returns "OVERDUE". Correct.

Row 3: Invoice date is recent. Returns "". Correct.

Note: Double-check how your policy defines the boundary. If you want to make the 30-day cutoff explicit, you can adjust the operator — for example, changing > to >= — and ask the AI to confirm the updated formula matches your intent before you use it.

The debugging step catches what you forgot to specify. You described ">30 days" and the AI delivered exactly that. Running the test surfaces any edge case you didn't think to mention. Do it every time before you fill down to the full dataset.

Once both rows check out, select D2, copy the formula, then highlight D3 through the last row of your data and paste. Excel handles the relative references automatically. Every invoice date in column B gets evaluated against today's date, and column D fills with the right answer.

If your sheet needs follow-up actions alongside the overdue flags, such as sending a payment notice, the same structured-prompt approach works for drafting those messages too. A late payment notice that stays compliant and still gets paid is a different prompt, but the method is identical: describe the output, map the context, ask for the thing.

Run it now

The recipe is free. Each link opens the finished prompt with the blanks already named, so you fill in your job and paste the result into the AI you use.

More like this, for whatever you are working on: open Ultra Prompt.

Ready to level up your prompts?

Ultra Prompt has 1,000+ expert-crafted templates. Stop guessing, start prompting.

Try Ultra Prompt Free
S

Written by Sean

Founder of Ultra Prompt. Building the prompt engineering toolkit I wish existed.