AI for Sheets formula reference

Use these formulas directly in a Google Sheets cell. If you want the built-in formula picker, open Extensions → AI for Sheets → 🚀 Use AI Formulas.

Last updated: 2026-03-11

Quick answer

Most users start with =GEN for writing, =ANALYZE for table summaries, =VISION / =PDF for files, and =AISEARCH for up-to-date answers. If you need broader spreadsheet reasoning instead of a single-cell formula, use Sheet Agent.

Which AI for Sheets formula should I use?

  • Write or generate text: =GEN, =WRITE
  • Summarize, rewrite, or translate: =SUMMARIZE, =REPHRASE, =TRANSLATE
  • Analyze a range or table: =ANALYZE
  • Classify text: =SENTIMENT, =SPAM, =TAGS
  • Analyze images: =VISION
  • Analyze PDFs: =PDF
  • Transcribe audio: =TRANSCRIBE
  • Generate or edit images: =IMAGEN, =EDIT
  • Get up-to-date answers from the web: =AISEARCH

If you are new to the add-on, start with Getting started. If a formula fails with Unknown function, permissions, or file-access errors, jump to Formula errors or Common issues.

Text formulas

=GEN(prompt, [context], [list_mode])

Use =GEN as the general-purpose AI formula. The optional second argument can be a cell, range, or extra context. Set list_mode to 1 when you want one result per row.

=GEN("Write 3 follow-up email subject lines", A2)
=GEN("List 5 Google Sheets dashboard ideas for a sales team",,1)

=WRITE(topic, [content_type])

Use =WRITE when you want a longer draft. If you omit content_type, it defaults to blog post.

=WRITE("Remote work best practices")
=WRITE("Quarterly sales recap", "email")

=ANALYZE(range)

Use =ANALYZE for fast summaries of a selected range. It works best when your input range has headers and a clean tabular structure.

=ANALYZE(A1:D20)

=SUMMARIZE(text)

Use =SUMMARIZE to turn long notes, meeting transcripts, or copied content into a shorter summary.

=SUMMARIZE(A2)

=REPHRASE(text)

Use =REPHRASE to rewrite one sentence or paragraph in a clearer alternative wording.

=REPHRASE(A2)

=TRANSLATE(text, target_language)

Use =TRANSLATE when you want a direct translation. Pass the target language in natural language, for example French, Japanese, or Traditional Chinese.

=TRANSLATE(A2, "French")

=TAGS(text)

Use =TAGS when you want comma-separated topic tags for a sentence, product description, or article.

=TAGS(A2)

=SENTIMENT(text)

Use =SENTIMENT to classify text as positive, neutral, or negative.

=SENTIMENT(A2)

=SPAM(text)

Use =SPAM to classify a message as spam or non-spam.

=SPAM(A2)

Files: images, PDFs, and audio

For file URLs, use direct links, public Google Drive links, or URLs created from Upload/Download Files. If a Drive file does not work, follow Make Drive images accessible.

=VISION(prompt, image_url) or =VISION(image_url)

Use =VISION to describe an image, extract text, or answer questions about what is in the file. One-argument usage is supported and defaults to a generic description prompt.

=VISION("Describe this image", A2)
=VISION(A2)

=PDF(prompt, pdf_url) or =PDF(pdf_url)

Use =PDF to summarize a PDF, extract fields, or answer questions about a document. One-argument usage is also supported.

=PDF("Extract invoice number", A2)
=PDF(A2)

=TRANSCRIBE(prompt, audio_url) or =TRANSCRIBE(audio_url)

Use =TRANSCRIBE for audio files such as MP3, WAV, or M4A. One-argument usage defaults to transcript-only output.

=TRANSCRIBE("Transcribe and return only the transcript.", A2)
=TRANSCRIBE(A2)

Images: generation and edits

=IMAGEN and =EDIT return an image URL. To preview the result in your sheet, wrap it with Google Sheets =IMAGE().

=IMAGEN(prompt, [aspect_ratio], [reference_image_url])

Use =IMAGEN to generate a new image. Supported aspect ratios are 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9.

=IMAGEN("A futuristic city skyline at sunset", "16:9")
=IMAGE(IMAGEN("A portrait photo with soft studio lighting", "9:16"))

=EDIT(prompt, image_url1, [image_url2], [image_url3], [aspect_ratio])

Use =EDIT to modify an existing image. You can optionally add reference images, and the aspect ratio can also be passed as the third argument in shorthand usage like =EDIT(prompt, image, "16:9").

=EDIT("Remove background", A2)
=EDIT("Change sky to sunset", A2, "16:9")
=EDIT("Use this second image as a style reference", A2, B2)

Web search

=AISEARCH(query)

Use =AISEARCH when the answer depends on fresh information from the web rather than only the model's prior knowledge.

=AISEARCH("Summarize the current economic outlook for 2026")

Troubleshooting and next steps

Frequently Asked Questions

What is the best AI for Sheets formula to start with?

Start with =GEN() for general writing and text tasks, =ANALYZE() for table summaries, =VISION() / =PDF() for files, and =AISEARCH() when you need current web information.

Why does =VISION() or =PDF() fail with a Google Drive link?

The file usually is not public enough for the formula to fetch. Follow Make Drive images accessible or upload the file with Upload/Download Files and use the generated URL.

Can I still use =GEMINI() in Google Sheets?

Legacy sheets may still contain =GEMINI(), but current AI for Sheets documentation and menu flow use =GEN(). If needed, open Extensions → AI for Sheets and run Convert =GEMINI to =GEN.

When should I use Sheet Agent instead of a formula?

Use formulas when you want a result in one cell. Use Sheet Agent when you want to ask broader questions across a spreadsheet, attach files, or iterate interactively instead of forcing a long prompt into one formula.

How do I stop AI formulas from re-running?

Use Save formula output to convert the formula results into static values after you are happy with them.

Was this page helpful?

Your feedback helps improve this content.