How to Use the New =COPILOT() Function in Excel

Historically, extracting sentiment, categorizing text, or generating summary insights from raw spreadsheet data required exporting your grid to external NLP models or writing fragile Python scripts. Microsoft recently deployed a massive structural update directly into the calculation engine: the excel copilot function.

Why You Need This Architecture

Unlike the conversational Copilot side-panel, this is a literal formula (=COPILOT()) that executes Large Language Model prompts natively inside the grid. It allows you to build scalable, AI-driven text analysis architectures that update dynamically when the underlying source data changes. Because it acts like a standard array function, you can nest it inside LAMBDA, FILTER, or IF statements to programmatically process hundreds of rows of qualitative data—such as customer feedback, unstructured vendor invoices, or survey responses—without ever leaving the workbook.

Prerequisites

  • Channel Access: You must be enrolled in the Microsoft 365 Insider program (Beta Channel) running Windows version 2509 (Build 19212.20000) or later, or Mac version 16.101.
  • Licensing: A dedicated Microsoft 365 Copilot license assigned to your enterprise account.
  • Execution Limits: Microsoft currently throttles the calculation engine to 100 API calls per 10-minute window, and 300 calls per hour.

Step-by-Step Workflow Build

Step 1: Define the Context Range

Do not write your prompt directly into the formula without a target. Locate the exact column or array containing the unstructured text you want the AI to analyze. This acts as the raw material for the engine.

Step 2: Construct the Formula

Navigate to your target output cell and initiate the function. The syntax requires two arguments: a prompt string, and an optional (but highly recommended) context reference.

Excel

=COPILOT("Extract the primary complaint from this feedback", A2:A50)

Step 3: Optimize for Array Execution

Dragging the formula down a column (e.g., placing =COPILOT("Summarize", A2) in cell B2 and dragging to B100) triggers 99 distinct API calls, instantly burning your hourly throttle limit. You must pass the entire range as a single array. By pointing the context argument to A2:A50, the engine processes the entire batch in one network call and spills the results dynamically down the column.

Step 4: Nest Inside Logical Operators

Wrap the AI function in standard Excel logic to control execution and prevent it from running on empty rows, which wastes processing quotas.

Excel

=IF(ISBLANK(A2:A50), "", COPILOT("Categorize as Positive, Neutral, or Negative", A2:A50))

Real-World Example: Triaging Unstructured IT Support Tickets

An IT operations manager receives a daily CSV export of 200 unstructured support tickets. They need to route these tickets to specific departments (Hardware, Software, Network) based on the user’s raw text description. Manual triage takes two hours every morning.

Raw Data State

Ticket IDUser Description (Col B)
TK-001My monitor won’t turn on and the HDMI cable looks frayed.
TK-002I can’t access the VPN from my home internet.
TK-003The new Adobe update crashed my system.

The Architecture Applied

The manager bypasses the Copilot chat panel and builds a programmatic routing column using the new formula. They explicitly pass the entire array to conserve API calls.

Excel

=COPILOT("Classify this text strictly as 'Hardware', 'Network', or 'Software'. Output only the category name.", B2:B4)

Output State

Ticket IDUser DescriptionAI Routing Category
TK-001My monitor won’t turn on and the HDMI cable looks frayed.Hardware
TK-002I can’t access the VPN from my home internet.Network
TK-003The new Adobe update crashed my system.Software

The manager can now wrap this column in an XLOOKUP or FILTER to automatically assign tickets to the correct technician.

Common Pitfalls & Structural Fixes

  • Error: The formula returns a #BUSY! or #CONNECT! error. -> Cause: The cell is waiting for the cloud-based LLM to return the payload, or you have exceeded your 300-call hourly limit. -> Fix: Wait for the network payload to resolve. To prevent throttling, ensure you are passing contiguous arrays (e.g., B2:B100) rather than dragging single-cell formulas down a column.
  • Error: The AI outputs inconsistent formatting (e.g., returning “It is a network issue” instead of “Network”). -> Cause: Your prompt lacks strict output constraints. Large Language Models default to conversational responses unless explicitly restricted. -> Fix: Edit your prompt string to include absolute formatting commands, such as: “Output only the single category name. Do not include conversational filler.”

Key Takeaways

  • The native calculation engine now supports direct LLM prompting, eliminating the need to export text data to external AI tools.
  • Passing contiguous array ranges into the context argument is mandatory to preserve your hourly API call limits.
  • Combining this tool with legacy functions like IF and LAMBDA enables fully automated, conditional text analysis workflows.

Frequently Asked Questions

Can the function read live data from the web?

Yes. Recent updates to the Insider channel allow the AI to ground its responses in live data. You can instruct the formula to pull current benchmarks or company details directly into the grid, though this functionality is currently restricted to Frontier and Insider rings.

Will this formula update automatically if the source text changes?

Yes. It operates natively within the Excel calculation tree. If a user modifies the text in the referenced context cell, the engine detects the change and automatically triggers a new query to update the output.

Is my proprietary data used to train the public AI model?

No. When executed under a commercial Microsoft 365 Copilot license, Microsoft enforces strict enterprise data boundaries. Your internal spreadsheet data is isolated and is never utilized to train foundational models.

About the Architect: Grid and Formula

Lead Data Analyst and Workspace Automation Engineer at Grid & Formula. Specializing in Excel logic, Google Sheets architecture, and Notion database blueprints. I build and rigorously test the formula frameworks and error fixes published here, ensuring you get immediate, no-fluff solutions to your most complex data bottlenecks.