Use Microsoft 365 Copilot in Excel for Exploratory Checks
For Statisticians ·
What This Does
Copilot's "Edit with Copilot" feature in Excel can run Python directly inside a workbook, covering statistics, simulations, and visualizations without leaving the spreadsheet. For a five-minute question on aggregated numbers already sitting in a workbook, that means skipping the round trip to opening a script editor, importing the file, and writing code for something small.
Before You Start
- A Microsoft 365 subscription with the Copilot add-on enabled for your account. Paid plan required, check Microsoft's Copilot pricing page for current tiers, since the add-on is often licensed separately from a standard Microsoft 365 seat
- Excel, opened either in the desktop app or in a browser, both support Copilot
- Confirmation from your organization that Copilot is approved for the kind of workbook you plan to open with it, not just approved in general. Many statisticians work under an employer or sponsor policy that names specific tools by name, and a workbook's formula logic, sheet names, or other open tabs can be proprietary or protocol-specific even when the target range holds only aggregated figures, since Copilot sends that surrounding workbook content to Microsoft to generate its response
- A workbook holding aggregated or summary-level figures only, not row-level subject, claims, or survey data
Steps
1. Confirm you have the Copilot add-on
Open Excel and look for a Copilot icon on the Home ribbon or in the top-right corner of the window. If it is not there, your Microsoft 365 plan likely does not include the Copilot add-on yet. Check with whoever manages your organization's Microsoft 365 licenses before assuming the feature simply is not installed.
2. Open Copilot on your workbook
Click the Copilot icon to open the chat pane alongside your worksheet. Copilot can see the data already in the open workbook, so there is no separate upload step the way there is with a chatbot.
3. Ask for the check you need in plain language
Type your question directly, naming the range or table if the workbook has more than one: "Run a chi-square test on the counts in the Region column against the Outcome column in the SummaryCounts table, and tell me if the association is statistically significant." Copilot runs Python behind the scenes and writes the result back into the sheet.
4. Review the output against the numbers you already know
Check the returned statistic and any generated chart against a rough mental estimate of what the data should show. If a result looks implausible, ask Copilot to show the code it ran so you can spot an obvious misread of the range or a wrong column reference.
5. Treat this as a first look, not the final analysis
A quick check inside Excel is useful for deciding whether something is worth a full script in R or Python. Anything going into a report, a submission, or a filed number should still be reproduced and validated in your actual analysis environment, with the log or output checked the normal way.
Real Example
Scenario: A workbook holds a summary table of adverse event counts by treatment arm, already aggregated past any subject-level detail, and a stakeholder asks whether the difference looks meaningful before a full analysis gets scheduled.
What you type into Copilot: "Using the counts in the AECounts table, run a chi-square test comparing event rate by arm and give me the p-value with a one-sentence interpretation."
What you get: A chi-square statistic and p-value written into a cell, plus a short plain-language interpretation, with the option to ask Copilot to show the underlying Python code.
Time comparison: Opening a script editor, importing the same aggregated table, and writing the equivalent test: 10-15 minutes. Asking Copilot inside the open workbook: 2-3 minutes.
Tips
- Name your ranges or format data as an Excel Table before asking Copilot a question. It reads structured tables more reliably than a loose block of cells
- Ask Copilot to show its work ("what code did you just run") whenever a result surprises you. It is often faster to catch a wrong column reference this way than to re-derive the answer by hand
- Keep this feature for aggregated, non-sensitive checks. Route anything touching real subject, claims, or survey rows through your validated analysis environment instead
Tool interfaces change. If a button has moved, look for similar AI/magic/smart options in the same menu area.