AI on Windows

How to use AI to write Excel formulas

Short answer

Describe the result you want, name the columns and give one example row with the answer you expect, then ask for a formula and an explanation of it. In Excel for Microsoft 365 with an eligible plan, ask Copilot in its pane; otherwise any assistant works, including one that can see your sheet, such as Ace. Test the formula on rows you can check by hand before filling it down.

Free Play: 2,000 credits, no card. Ace by Black Label.

BEYOND. as dimensional glass letters over iridescent light

Describe the sheet the way Excel sees it

Most wrong formulas start with a vague request. Give the assistant:

Example: “Sheet Orders, headers in row 1. Column B is the customer, C the order date, D the amount. In F2, total the amounts for the customer named in E2, for 2026 orders only. For Alvarez the answer should be 1,240.”

Ask Ace in the Ace web workspace: chat, library, study, tasks, computer and schools in one sidebar.
Ask Ace in the Ace web workspace: chat, library, study, tasks, computer and schools in one sidebar. Live at tryacee.com/account?space=chat.

Copilot in Excel

In Excel for Microsoft 365, select the Copilot icon in the lower-right corner; Alt + C moves the focus to it. Copilot can add formula columns or rows that calculate from your data, suggest a formula for a single cell, recommend a lookup such as XLOOKUP, and explain a formula you select.

It needs one of these: Microsoft 365 Personal or Family with an AI credits plan, Microsoft 365 Premium, or an eligible business subscription. Copilot can edit only when Calculation Options is set to Automatic, it doesn’t work with Strict Open XML files (save them as .xlsx), and Microsoft recommends a table or range with one header row and no merged cells.

The COPILOT worksheet function was retired on September 14, 2026. Workbooks that used it keep their cached results, but those cells show #NAME? when they recalculate. Microsoft points people to the Copilot pane instead.

With another assistant

Any chat assistant can write a formula if you describe the sheet well; you paste the formula into the cell yourself. An assistant that can see the screen saves the description. With Ace, made by the team that publishes this guide, open the sheet, hold Ctrl + Shift and say “Explain this spreadsheet formula in plain English”, or “Write a formula for F2 that totals column D for the customer in E2.” Ace looks at the window when you ask, once you have allowed screen access.

Whatever you use, ask for the explanation along with the formula. If the explanation doesn’t match what you meant, the formula won’t either.

Computer in the Ace workspace: pair your Mac or Windows PC and talk to Ace from anywhere.
Computer in the Ace workspace: pair your Mac or Windows PC and talk to Ace from anywhere. Live at tryacee.com/account?space=computer.

Test the formula before you trust it

  1. Try it on three rows whose answers you can work out by hand, including one awkward row with a blank or a zero.
  2. Select the cell and choose Formulas > Formula Auditing > Evaluate Formula, then Evaluate, to watch Excel work through it one step at a time.
  3. Press Ctrl + ` (the grave accent key) to show formulas instead of results, and check that references move the way you expect as you fill down.
  4. Use Formulas > Formula Auditing > Trace Precedents to see which cells feed the result.

Fixing the errors AI formulas run into

ErrorWhat it usually meansWhat to try
#VALUE!The formula is typed wrong, or a referenced cell has a problem such as a hidden spaceClean the data, or use functions such as SUM instead of + across ranges
#N/AA lookup can’t find the value it was asked forCheck that the lookup value exists in exactly that form
#REF!A reference points at cells that were deleted or pasted overUndo, or rebuild the formula with whole ranges
#DIV/0!Something is divided by zero or by an empty cellFix the divisor, or test for zero first
#NAME?Excel doesn’t recognize a name, most often a misspelled functionCorrect the name instead of hiding it with IFERROR
#SPILL!A formula that returns several results is blocked by cells in the wayChoose Select Obstructing Cells from the error alert, then clear them

IFERROR(value, value_if_error) hides #N/A, #VALUE!, #REF!, #DIV/0! and #NAME? alike, so add it only after you know why an error happens.

Requests that work well

Keep the data safe

Copilot in Excel works inside your Microsoft 365 account; any other assistant receives whatever you paste or show it. For payroll, customer or health data, follow your organization’s rules, and when you can, test formulas on a copy filled with made-up values.

More from Ace

The full overview of Ace for Windows is on tryacee.com/windows-ai-assistant.

Also asked

Can Copilot write Excel formulas for free?

Copilot inside Excel needs an eligible plan, such as Microsoft 365 Personal or Family with AI credits, or Premium. You can still describe the problem in the free Copilot app and paste the formula it suggests.

What does #NAME? mean in a formula the AI wrote?

Usually a misspelled function, or one your Excel version lacks, such as XLOOKUP in Excel 2019. Cells that used the retired COPILOT function show it too.

How do I get AI to explain a formula I didn’t write?

Select the cell and ask Copilot in Excel to explain it, or hold Ctrl + Shift and ask Ace with the sheet on screen. Then confirm the logic with Evaluate Formula.

Should I trust AI with financial spreadsheets?

Check its work. Microsoft says Copilot can make mistakes and advises verifying its output before relying on it, and the same goes for any assistant.

What should I tell an AI about my spreadsheet before asking for a formula?

Tell it where the data is: sheet name, header row, column letters and roughly how many rows. Give one specific row with the answer you expect, list the awkward cases such as blanks, zeros, text that looks like numbers and duplicates, and name your Excel version, because XLOOKUP isn’t in Excel 2016 or Excel 2019.

How do I catch an AI formula that points at the wrong column?

Press Ctrl + ` (the grave accent key) to show formulas instead of results, and check that references move the way you expect as you fill down. Formulas > Formula Auditing > Trace Precedents shows which cells feed the result. Ask for an explanation with every formula too: if it doesn’t match what you meant, the formula won’t either.

Where is Copilot in Excel, and what can it do with formulas?

In Excel for Microsoft 365, select the Copilot icon in the lower-right corner, or press Alt + C to move the focus to it. Copilot can add formula columns or rows that calculate from your data, suggest a formula for a single cell, recommend a lookup such as XLOOKUP, and explain a formula you select.

Why won’t Copilot in Excel edit my workbook?

Copilot can edit only when Calculation Options is set to Automatic, and it doesn’t work with Strict Open XML files, so save those as .xlsx. Microsoft also recommends a table or range with one header row and no merged cells. You also need an eligible plan, such as Microsoft 365 Premium or an eligible business subscription.

What happened to the COPILOT function in Excel?

It was retired on September 14, 2026. Workbooks that used the COPILOT worksheet function keep their cached results, but those cells show #NAME? when they recalculate. Microsoft points people to the Copilot pane instead: select the Copilot icon in the lower-right corner of Excel for Microsoft 365, or press Alt + C to move the focus to it.

Why does my AI formula return #N/A or #REF!?

#N/A means a lookup can’t find the value it was asked for, so check that the lookup value exists in exactly that form. #REF! means a reference points at cells that were deleted or pasted over; undo, or rebuild the formula with whole ranges. Add IFERROR only after you know why an error happens, since it hides both.

Can Ace write an Excel formula from the sheet on my screen?

Yes, once you have allowed screen access. Open the sheet, hold Ctrl + Shift and say something like “Write a formula for F2 that totals column D for the customer in E2.” Ace looks at the window when you ask, and you paste the formula into the cell yourself. Test it on rows you can check by hand before filling it down.

Is it safe to give an AI my payroll or customer spreadsheet?

That depends on where the data goes and on your organization’s rules. Copilot in Excel works inside your Microsoft 365 account, while any other assistant receives whatever you paste or show it. For payroll, customer or health data, test formulas on a copy filled with made-up values when you can. With Ace, give the formula, column headings and a few invented or anonymised rows.

More questions

Deal yourself in.

More about Ace

Sources

  1. COPILOT Function | Microsoft Support, Microsoft Support. Checked November 14, 2026.
  2. XLOOKUP function | Microsoft Support, Microsoft Support. Checked November 14, 2026.

Who makes this guide