AI · 2 min read

COPILOT

COPILOT function in Excel: Runs an AI prompt from a cell.

AI function · Excel

COPILOT function

COPILOT sends a prompt and optional cell data to an AI model from inside a formula. Use it for language work such as classifying or summarizing text. Use standard functions for arithmetic.

Syntax

=COPILOT(prompt_part1, [context1], [prompt_part2], [context2], ...)
On Google Sheets: use AI. Both run prompts in a cell. Review prompts and outputs after moving.
Not on the Microsoft list we fetched. Added from Microsoft announcements. Requires a qualifying license.

Arguments

ArgumentRequiredMeaning
prompt_part1YesThe instruction in quotes.
context1NoA cell or range the model should read.
more partsNoAlternate extra instructions and data.

Worked example

AB
1Customer feedbackSentiment
2Delivery was late but support fixed it
=COPILOT("Classify as Positive, Neutral or Negative. Answer with one word.",A2)
Result: Varies. Example output: Neutral

The prompt fixes the allowed answers, and the cell supplies the text to classify.

Try it

AI output needs a live Microsoft account, and it can differ between runs.

Availability

PlatformStatus
ExcelMicrosoft 365 with a qualifying Copilot license. Check your plan and region.
Google SheetsNot available. See the AI function.

Common mistakes

  • Results can change between runs, so check them before they feed a report.
  • Do not use it for financial totals, legal work or compliance decisions.
  • Your data goes to a cloud AI service, so follow your company data policy.

Do it with AI

Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.

Rewrite this prompt so it returns one allowed label and nothing else: =COPILOT("what does the customer think",A2)