AI · 2 min read

AI

AI function in Google Sheets: Runs an AI prompt from a cell.

AI function · Google Sheets

AI function

AI runs a Gemini prompt from a Google Sheets cell. It handles text jobs such as summaries, categories and rewrites. Google also grounds it in Search results for current information.

Syntax

=AI(prompt, [value])
On Excel: use COPILOT. Both run prompts in a cell. Review prompts and outputs after moving.

Arguments

ArgumentRequiredMeaning
promptYesThe instruction in quotes.
valueNoA cell or range for the prompt to read.

Worked example

AB
1Customer feedbackSummary
2Delivery was late but support fixed it
=AI("Summarize in five words or fewer.",A2)
Result: Varies. Example output: Late delivery, support resolved it

The prompt sets the task and length, and the cell supplies the text.

Try it

AI output needs a live Google account, and it can differ between runs.

Availability

PlatformStatus
ExcelNot available. See the COPILOT function.
Google SheetsRequires a Google plan with AI features. A workplace admin may need to enable it.

Common mistakes

  • A #NAME? error usually means your account lacks access.
  • Results can change, so copy approved results as values.
  • Keep calculations and regulated reporting in standard formulas.

Do it with AI

Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.

Write three AI function prompts that tag support tickets in A2 as Billing, Technical or Account, using one word only.