AI for Excel and Google Sheets: 18 Tips for Formulas, Cleaning Data and Charts
AI can write spreadsheet formulas, clean messy data and explain charts in seconds. These 18 tips work with Copilot in Excel, Gemini in Sheets or any free AI chat assistant.
Spreadsheets run a remarkable amount of life in Sri Lanka: shop stock lists, school marks, wedding budgets, tuition class fees, small business accounts, delivery schedules and sales reports. Many people who rely on them every day know only a handful of formulas and spend hours copying, cleaning and checking data by hand. Artificial intelligence changes that. Copilot in Excel and Gemini in Google Sheets can now write formulas from plain-language requests, tidy messy data, suggest charts and explain what a confusing spreadsheet does. Even without a paid plan, free assistants such as ChatGPT, Gemini and Claude can write and explain formulas you paste into any spreadsheet. This guide shares 18 practical tips that save real time, with examples, and the checks that stop an AI mistake turning into a costly error in your numbers.
Key points
- Format data as a proper table with clear column headings before asking AI anything; it improves every answer.
- Describe formulas in plain language, including column names and what should happen with blanks or errors.
- Ask AI to explain formulas you inherit, step by step, before you change them.
- Use AI to clean data, such as splitting names, fixing dates and removing duplicates, but work on a copy.
- Always test AI formulas on a few rows you can check by hand.
Three ways to use AI with spreadsheets
| Option | Where it works | Cost | Best for |
|---|---|---|---|
| Copilot in Excel | Inside Excel for Microsoft 365 | Included with Microsoft 365 plans, with usage limits | Office users; analysis and charts on your actual data |
| Gemini in Google Sheets | Inside Google Sheets | Included in some Google Workspace and Google AI plans | Google users; organising data and AI functions in cells |
| Free AI chat | Any spreadsheet; copy formulas across | Free tiers available | Writing and explaining formulas without a subscription |
The built-in options can see your data directly, which makes them faster for analysis. Free chat assistants cannot see your file unless you upload it, but they are excellent for writing and explaining formulas. Our comparison of free and paid AI plans explains what each subscription includes.

Preparing your data
1. Turn your data into a table
In Excel, click inside your data and press Control plus T; in Google Sheets, use Format, then Convert to table. Tables give every column a clear name and make it obvious where the data starts and ends. Copilot in Excel works best, and sometimes only works, on data formatted as a table.
2. Use clear, unique column headings
Headings such as “Customer name”, “Invoice date” and “Amount” help AI understand your data. Avoid merged cells, blank heading rows and repeated names like “Amount” and “Amount 2”.
3. One type of data per column
Keep dates in one column, numbers in another and notes in a third. A column that mixes “5,000”, “5000.00” and “five thousand” confuses both formulas and AI. Ask AI to help you standardise it first.
Writing formulas with AI
4. Describe the result, not the function
You do not need to know function names. Write what you want: “In column F, show the total of Quantity times Unit price for each row, and leave it blank if Quantity is empty.” Name the columns and say what should happen with blanks and errors; AI will choose the functions.
5. Ask for lookup formulas
Lookups are where many people get stuck. Try: “Write a formula that finds the product name in the Products sheet using the code in column A, and shows Not found if there is no match.” AI will usually suggest XLOOKUP in modern Excel or Google Sheets, which is simpler and more reliable than older VLOOKUP formulas.
6. Build conditional totals
Ask for totals with conditions: “Total sales for the Kandy branch in March” or “count orders over 10,000 that are still unpaid”. AI will write SUMIFS or COUNTIFS formulas with the right ranges. Check that the date conditions include the first and last days of the month.
7. Get formulas explained
Inherited a spreadsheet full of long formulas? Paste one into an AI assistant and ask: “Explain this formula step by step in simple English and tell me what could go wrong.” It is the fastest way to understand someone else’s work before changing it.
8. Fix error messages
When a cell shows an error such as a reference, value or name error, paste the formula and the error into AI and ask what is wrong. AI is very good at spotting a missing bracket, a wrong range or text stored as numbers.
9. Use the AI function in a cell
Google Sheets offers an AI function that runs a prompt on each row, for example to classify customer feedback as positive or negative or to summarise a comment, and Microsoft has been testing a similar COPILOT function in Excel. These are powerful for text-heavy columns, but results can vary between runs, so use them for categorising and summarising rather than for financial calculations.

Cleaning messy data
10. Split and combine columns
Ask AI to split full names into first and last names, separate addresses into street and city, or combine first and last names into one column. In Excel, Flash Fill (Control plus E) also learns from one or two examples you type.
11. Fix dates and phone numbers
Dates imported from different systems often mix day-month and month-day formats, and phone numbers appear with and without the country code. Ask AI for a formula that converts them into one consistent format, and test it on dates where the day is 12 or less, which is where mix-ups hide.
12. Remove duplicates safely
Ask Copilot or Gemini to identify duplicates rather than delete them, for example by adding a column that flags repeated phone numbers. Review the flagged rows before removing anything, because two customers can share a name.
Tip: Always make a copy of your sheet before letting AI clean or restructure data. If something goes wrong, you can compare with the original instead of trying to undo dozens of changes.
Analysis, pivot tables and charts
13. Ask questions about your data
With Copilot in Excel or Gemini in Sheets, you can ask “Which product had the highest sales growth this quarter?” or “Show me sales by branch and month”. The AI creates a summary, pivot table or chart. Check that the result matches a quick manual total for at least one branch or month.
14. Create pivot tables from a description
Pivot tables summarise large lists quickly but intimidate many users. Describe what you want: “a pivot table with branches as rows, months as columns and total sales as values”. Once created, you can adjust it by dragging fields, and AI can explain each part.
15. Choose the right chart
Ask AI which chart suits your message: a line chart for trends over time, a bar chart for comparing categories, and a pie chart only for a few parts of a whole. Then ask it to create the chart with a clear title and labelled axes. Fewer, clearer charts beat many decorated ones.
16. Highlight what matters
Ask for conditional formatting rules such as “highlight unpaid invoices older than 30 days in red” or “colour the top ten products green”. This turns a wall of numbers into something you can scan in seconds.

Automating repeated work
17. Get help with macros and scripts
For tasks you repeat every week, such as formatting a downloaded report, AI can write an Excel macro or Office Script, or a Google Apps Script. Describe the steps you do manually, run the script on a copy first, and keep the script with notes so someone else can maintain it.
18. Build reusable templates
Once AI has helped you build a good invoice tracker, stock list or budget, save it as a template. Ask AI to add instructions in a separate sheet explaining how to use it, so staff or family members can work with it without breaking formulas.
Checking AI results
AI formulas usually work, but when they are wrong they can be wrong in ways that are hard to spot, such as a range that stops one row short, a date condition that excludes the last day, or a total that double-counts. Before trusting an AI formula with money, marks or stock, test it on three or four rows you can calculate by hand, check edge cases such as blank cells, zeros and very large values, and compare the grand total with a simple SUM. For important reports, have a second person review the key formulas.
| Check | How |
|---|---|
| Spot-check rows | Calculate three rows by hand and compare |
| Totals match | Compare pivot or summary totals with a simple SUM |
| Edge cases | Test blank cells, zeros, negatives and text in number columns |
| Ranges | Check formulas cover all rows, including new ones added later |
| Dates | Test first and last days of months and day values of 12 or less |
Privacy with business data
Spreadsheets often hold customer names, phone numbers, salaries and financial records. Copilot in Excel used with a work Microsoft 365 account, and Gemini in a business Google Workspace account, process data under business data protection terms. Pasting the same data into a free personal chat assistant may not. When using free tools, describe the structure of your data and paste only column names or a few anonymised example rows, not the full customer list. Our AI privacy settings guide explains how to stop conversations being used for training.
A bigger screen helps
Working with AI side by side with a large spreadsheet is far easier on a bigger display. A 27-inch QHD monitor such as the MSI Modern MD272QXP at Rs 101,500 shows many more rows and columns at once, and its USB-C connection can charge a laptop with a single cable. Our dual monitor guide shows how to keep the AI assistant on one screen and the spreadsheet on the other. Microsoft 365 Family at Rs 37,000 includes Excel with Copilot features for up to six people.

Example: a small shop sales sheet
Imagine a phone accessories shop that records every sale in a sheet with date, product, category, quantity, price and payment method. With AI, the owner can add a total column with one request, create a pivot table showing sales by category and month, highlight slow-moving products that sold fewer than five units in a month, and ask which payment methods are growing. Tasks that took an evening now take minutes, and the time saved goes into ordering the right stock. Our article on AI tools for small shops has more ideas.
Learning while you work
A side benefit of using AI with spreadsheets is that you learn faster. Each time AI writes a formula, ask it to explain why it chose that function and how you could write it yourself. After a few weeks, you will recognise SUMIFS, XLOOKUP and FILTER without help, and you will spot when an AI suggestion is wrong. Many office workers find that this combination of AI help and growing personal skill is worth more than any spreadsheet course. Students preparing for accounting or business studies can use the same approach to understand formulas rather than memorising them; our guide to AI study tools shares more ways to learn with AI.
If your business relies on spreadsheets for accounts, stock or payroll, consider setting up Microsoft 365 or Google Workspace business accounts so AI features are covered by business data protection terms and files are backed up automatically. Our Microsoft 365 setup service at Rs 14,900 includes migrating existing spreadsheets and configuring shared folders and permissions.
-
MicrosoftMicrosoft 365 Family – 12-Month Subscription (up to 6 people)
Rs 37,000 Add to cart -
UGREENUGREEN Revodok 10-in-1 USB-C Docking Hub – Dual HDMI, Gigabit Ethernet, 100W PD
Rs 17,000 Add to cart -
HPHP ProBook 4 G1i 14 Laptop – Core Ultra 5 225U, 16GB, 512GB SSD
Rs 472,000 Add to cart -
MSIMSI Modern MD272QXP 27-inch Monitor – WQHD IPS, 100Hz, USB-C 65W
Rs 101,500 Add to cart
Frequently asked questions
Can AI write Excel formulas?
Yes. Describe the result you want with column names, and Copilot, Gemini or a free chat assistant will write the formula.
Do I need to pay for Copilot in Excel?
Copilot in Excel needs a Microsoft 365 plan. Free AI chat assistants can still write and explain formulas.
Does Google Sheets have AI?
Yes. Gemini in Sheets can organise data, create charts and run an AI function in cells on supported plans.
Can I trust AI formulas?
Usually, but always test them on rows you can check by hand, especially for money and marks.
Is it safe to upload customer data to AI?
Only to business accounts with data protection terms. With free tools, share structure or anonymised examples only.



