Level Marketing / Articles / Running a business
AI for Excel and Google Sheets: formulas, cleaning, pivots
In many businesses, sales, stock and ad reporting still live in spreadsheets. The problem is that few people know spreadsheets well, and the formulas live in one employee's head. AI closes that gap: it writes formulas, shows how to clean messy data and helps you draw conclusions from a table. But it writes a wrong formula just as confidently as a right one — which is why half of this article is about checking.
What AI is good for in spreadsheets
AI has four main jobs when you work with spreadsheets:
| Task | What AI does | Risk level |
|---|---|---|
| Writing formulas | you describe the task in words and get a formula | medium: wrong range |
| Cleaning data | finds duplicates, spelling variants, date formats | high: original data can be damaged |
| Pivot and summary tables | suggests which breakdown to look at | low |
| Explaining results | describes the numbers in words | high: it may invent a cause |
The safest use is asking AI for formulas and steps while you change the data yourself. The riskiest is uploading the whole file, asking for "insights" and sending the numbers to your boss unchecked.
Which tool: Gemini, Copilot or a plain chat
There are three routes, and they do not replace each other.
Gemini inside Google Sheets. Sheets has an =AI("task", range) function (=Gemini() also works): it sorts text into categories, summarises it or detects sentiment. According to Google's help centre, it needs an eligible Google Workspace or Google AI plan, returns text only, cannot see the whole spreadsheet and has generation limits — check the current terms on the official page. It suits text columns rather than calculations: for example, sorting customer comments into "price", "delivery" and "quality".
Copilot in Excel. The Microsoft Copilot pane in Excel suggests formulas, analyses data and builds charts; it needs an eligible Microsoft 365 plan. Note that the separate COPILOT function stopped working in Excel on 14 September 2026, and in older files it returns an error when recalculated — this is stated on Microsoft's support page. If you have such files, save the results as plain values.
A plain AI chat. Giving ChatGPT, Gemini or Claude a description of your columns and asking for a formula is the cheapest and most universal route. We compared chat assistants in ChatGPT or Gemini.
How to ask for a formula
For AI to write a correct formula, it needs to see the table — but not the whole file. Put four things in the prompt:
- Column letters and contents: "A — date, B — salesperson, C — channel, E — amount in soums, F — status".
- 3–5 sample rows (with no personal data).
- Where the result goes and what it should look like.
- Software and language: Excel or Sheets, Russian or English interface, separator ";" or ",".
The last point is the one most often forgotten. Depending on the interface language and regional settings, function names and the argument separator can differ, so if a formula from AI throws an error right away, check this first. Ask AI to explain each part of the formula too — then you can fix it yourself.
Cleaning data
Sales spreadsheets in Uzbekistan have a typical set of errors: phone numbers in different formats (+998, 998, 90...), a city spelled three ways (Toshkent, Tashkent and a Cyrillic variant), trailing spaces in the status column, dates stored as text. AI finds all of this quickly, but there is a right way to use it:
- Do not change the original column. Add a new column next to it and produce the cleaned value with a formula.
- Ask AI for a rule, not a result. "Write a formula that converts a phone number to 998XXXXXXXXX" is repeatable. "Here are 500 numbers, clean them" cannot be checked.
- Count before and after cleaning. The number of rows, unique customers and the total amount should not change (except when removing duplicates).
- Prevent it next time. Add a dropdown list (data validation) to the status and channel columns — manual typing errors disappear.
Pivot tables
A pivot table is the most useful and least used tool for a business owner. AI solves the "which pivot answers which question" problem. Give it the question: "Which channel brings more sales month by month?" — and it will name the rows, columns, values and filter: rows — channel, columns — month, values — sum of amount, filter — status "Sold".
If there is no month column, AI will also give you a helper column formula: =TEXT(A2,"YYYY-MM"). How to turn a pivot into a permanent panel is covered in marketing dashboard, and how to read customer return rates in cohort analysis.
Checking a formula: 5 steps
An AI formula that "worked" is not the same as one that calculated correctly. Every new formula should pass these five checks:
| Step | What to do |
|---|---|
| 1. Manual calculation | recalculate the result for 2–3 rows on a calculator |
| 2. Reconcile the total | the sum of all groups equals the overall total |
| 3. Blank and error cells | blank rows and numbers stored as text do not distort the result |
| 4. Edge cases | how month-end, zero amounts and refunds are counted |
| 5. Copying | the range does not shift when you drag the formula down ($ signs) |
The second step catches the most errors — as the example below shows.
Worked example on a sales table
Illustrative example. A furniture store's October sheet has 1,200 rows: date, salesperson, channel, product, amount and status. The owner wants sales by channel.
The formula from AI: =SUMIFS($E:$E,$C:$C,H2,$F:$F,"Sold"), where column H holds the channel names. The result:
| Channel | Sales, million soums |
|---|---|
| 186 | |
| Telegram | 94 |
| Website | 61 |
| Total | 341 |
The second check: a simple filter on status "Sold" shows 372 million soums. There is a 31 million gap. We ask AI to find the cause and it finds two: in 37 rows the status was typed as "Sold " with a trailing space, and in 9 rows the channel was entered as "Insta". SUMIFS did not count them.
The fix: a helper column with TRIM for status and channel, replacing "Insta" with "Instagram", and a dropdown list on both columns. After that the total matches 372 million, and Instagram's share comes out higher than in the first calculation. Without the check, the owner might have made the wrong decision to cut Instagram ads.
For salesperson conversion, AI will give a formula like =COUNTIFS(B:B,"Rep A",F:F,"Sold")/COUNTIF(B:B,"Rep A"). Here too, the status column must be cleaned first. Daily and monthly report formats are in sales reports.
Privacy: before you give AI your spreadsheet
A sales sheet contains customer names and phone numbers. A formula does not need them. Before uploading a file to AI:
- delete the name and phone columns or replace them with a code such as "Customer 001";
- keep only the columns you need;
- check the service's business plan and data use settings.
Customer data in Uzbekistan is protected by law — read more in AI and the law in Uzbekistan.
Common mistakes
- Trusting the "cause" AI explains. AI sees that a number changed but does not know why — it only guesses.
- Handing over the whole file for editing. If the original is not saved, the error cannot be undone.
- Mixing up margin and markup. AI takes your words literally; say exactly which you mean — the difference is in margin vs markup.
- Checking once and trusting forever. New rows bring new errors; reconcile the total every month.
Questions and answers
Can I work with AI without knowing Excel?
For simple tasks, yes. But you need the basics — ranges, relative and absolute references, filters — or you will not spot AI's mistakes. A one- or two-day basic course makes working with AI much safer.
Do I have to pay separately for Gemini or Copilot?
Both are tied to specific plans, and the terms change often. Start by writing formulas in a plain AI chat; if you work with spreadsheets every day, then consider moving to a built-in tool.
Can AI build a pivot table on its own?
Copilot in Excel and some chat services can build a summary table from an uploaded file. Still reconcile the result with the total and review the pivot settings yourself.
What data should never be uploaded?
Customer phone numbers, passport details, card numbers and staff salaries. A formula needs none of these.
Conclusion
AI speeds up spreadsheet work: it gives you a formula, a cleaning rule and a pivot structure in minutes. But every result must pass a total reconciliation and a manual check — otherwise a neat table leads to a wrong decision. If you want to know whether your ad and sales numbers actually match, book a free audit with Level Marketing.