Skip to content

Question · At work

How do you use AI with Google Sheets?

The simplest way is to describe your data and task to a chat assistant and have it write formulas, or to hand an exported copy to an agent tool.

Updated

Short answer

The simplest way to use AI with Google Sheets is to describe your columns and your goal to a chat assistant such as Claude or ChatGPT and ask it to write the formula, then paste the formula in and test it. For larger cleanups, export the sheet as a CSV, have an agent tool process it, and re-import the result. Always check totals against the original.

Google’s own AI features in Sheets change with plans and releases, so this page sticks to approaches that work with any general assistant. Most of what our Excel guide says about setup and checking applies here too.

For formulas, cleanup and reports in more depth, see the guide AI for Google Sheets.

What Gemini in Sheets does

If your Google plan includes it, Gemini is built into Sheets. Gemini in Google Sheets can create tables, create formulas, generate data analysis and insights, and build charts and graphs. Google also says it works best with native Google Sheets files, so an .xlsx file needs File > Save as Google Sheets first. Gemini’s chat history is lost when you reload the browser or close and reopen the spreadsheet, so insert anything you want to keep. Undo reverses the last Gemini action. Its response panel also has a Show code option for the code used to generate the output, which helps you check it.

What Copilot in Excel does

Microsoft Learn lists these Excel features in Microsoft Copilot: analyze data, generate insights, create formulas and visuals. Google Sheets users get comparable help from Gemini, described above.

Approach 1: Ask for formulas

Describe your sheet, not the data. The assistant does not need real values to write a formula.

I have a Google Sheet. Column A is Order Date (text like “03/14/2026”), column B is Customer, column C is Amount. In another tab I want to show total Amount by Customer for March 2026. Write the Google Sheets formula and explain how it works. Assume data starts in row 2.

Paste the formula, test on a few rows you can check by hand, then extend. Ask for QUERY, ARRAYFORMULA or XLOOKUP alternatives when a formula gets hard to read. In Google Sheets, QUERY runs a Google Visualization API Query Language query across data. In Google Sheets, ARRAYFORMULA displays values returned from an array formula in multiple rows or columns. In Google Sheets, SUMIFS returns the sum of a range depending on multiple criteria. SUMIFS is the kind of function behind the total-by-customer example above.

Approach 2: Explain inherited formulas

Explain this formula step by step in plain English, and tell me what would break it: [paste formula].

This is often the most useful thing for people who inherited a complicated sheet.

Approach 3: Clean data with a sample

Copy a small, non-sensitive sample (10 to 20 rows) into a chat:

Here are sample rows from my sheet. Dates are in mixed formats and names have extra spaces. Suggest formulas to clean each column, and explain the edge cases you see.

Then apply the formulas to the full column.

Approach 4: Export for bigger jobs

For thousands of rows or multiple sheets, download as CSV or Excel and use an agent tool such as Claude Code:

Clean the file: standardize dates to YYYY-MM-DD, trim names, remove exact duplicates, and give me a list of rows you were unsure about instead of changing them.

Then import the cleaned file into a new tab. See what Claude Code is.

Approach 5: Recurring reports

If you produce the same summary weekly, ask an agent to build a repeatable process. See automating weekly reports.

Checks that catch most errors

  1. Count rows before and after.
  2. Compare a total before and after cleaning.
  3. Spot-check five random rows by hand.
  4. Look at anything the assistant flagged as uncertain.
  5. Work on a copy: File > Make a copy before you begin.

Privacy

Pasting rows into an AI chat sends them to the provider. Remove personal, financial or client identifiers first if you are not sure it is allowed. See whether it is safe to put company data in ChatGPT.

What AI is bad at here

It can make arithmetic mistakes when asked to calculate in its head. Ask for a formula, not for the answer, so the sheet does the math. For entering data at scale, see automating data entry.

Sources

Frequently asked

Does Google Sheets have built-in AI?

Google offers its own AI features in Workspace, and they vary by plan and change often, so check Google's current documentation for your account.

Is it safe to paste a spreadsheet into an AI chat?

Only if the data is allowed to leave your organization. Remove or mask sensitive columns first.

Applied AI Workflow Automation · Boston

Build this with us, in person

Two days, hands-on, 20 seats. You practice AI workflow automation on provided case files for email, documents and spreadsheets. Next class: early 2027, dates to be announced · $1,299 tuition.

// Free · AI automation starter kit

Get the starter kit

The copy-paste prompts and scripts from our guides in one place, plus a checklist for picking the first task worth automating. Free, sent to your inbox.

No spam. Unsubscribe any time by replying “stop”.