COPILOT Function in Excel: Ask AI Inside a Formula

COPILOT Function in Excel: Ask AI Inside a Formula 1
⏱ 2 min readUpdated 5 October 2026

AILevel: IntermediateAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. COPILOT in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions

COPILOT (2025) sends a prompt plus the cells you reference to Microsoft’s AI and returns the answer into the grid, e.g. classify feedback, summarise comments or extract a value from text. Results are AI-generated, can vary and must be checked.

Advertisement

Syntax

=COPILOT(prompt_part1, [context1], [prompt_part2], [context2], ...)
Argument What it means
prompt_part Instruction text
context Cells or ranges the AI should read

Examples

Example 1

=COPILOT("Classify as Positive, Neutral or Negative:", A2)

Result: Positive. See the worked example table below for more cases.

COPILOT in practice

Where you will use it

  • Classifying customer feedback as Positive/Neutral/Negative
  • Pulling a product name out of messy text
  • First drafts of short summaries

Worked example

FeedbackFormulaResult
Delivery was late but the product is great=COPILOT("Classify as Positive, Neutral or Negative:", A2)Positive
Worst service ever=COPILOT("Classify as Positive, Neutral or Negative:", A3)Negative
Okay, nothing special=COPILOT("Classify as Positive, Neutral or Negative:", A4)Neutral

Not calculated here: COPILOT needs the latest Microsoft 365 with a Copilot licence. The result shown is what it returns.

Mistakes people make

MistakeWhat to do instead
Using it for exact numbers or totalsUse normal formulas for maths; AI answers can be wrong
Sensitive dataCheck your organisation's policy before sending data to AI

LAMBDA · TEXTBEFORE

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

Advertisement
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *