Important: This article refers to Google Workspace Experiments, which is a trusted tester program for users to try new AI features. To check if you have access to Workspace Experiments features, open a spreadsheet on Google Sheets. On the right, find Summarize this table . Learn where you can use Workspace Experiments features.
You can use the AI function to:
- Generate text.
- Summarize information.
- Categorize information.
- Analyze sentiment.
- Access real-time information from Google Search.
Use the AI function in Sheets
You can use the AI function to:
- Generate text: To generate text tailored to your data, Google Workspace with Gemini uses relevant information from your sheet.
- Summarize information: To help you understand your data, Google Workspace with Gemini analyzes the content of your spreadsheet and extracts important key takeaways.
- Categorize information: To help you detect patterns, Google Workspace with Gemini categorizes your data into groups. This includes sentiment analysis.
- Access real-time information: To automatically generate accurate and timely answers, Google Workspace with Gemini provides up-to-date information from Google Search.
- On your computer, open a spreadsheet from Google Sheets.
- In a cell, enter an AI function. You can use either â=AI()â or â=Gemini()â.
- For example:
=AI(âGenerate slogan for event in 10 words or lessâ, A2) - Or, at the top of the spreadsheet, click Insert
Function
AI.
- For example:
- Select the cell or cells with an AI function.
- Click Generate and Insert.
- Optional: To refresh output, click Refresh and Insert.
Tip: When you click âGenerate and Insertâ or âRefresh and Insert,â generated content is inserted and the cell edit is attributed to you in version history.
Add an AI column to a table
When you add an AI column to a table, its first non-header row automatically shows the AI function. After you enter a specific function in that row, you can autofill the rest of the column with the same function and generate entries.
To add an AI column, at the top right of the last column in the table, click Insert AI column right .
Fill columns with Gemini
Important: This feature is also available for Google AI Ultra and Google AI Pro accounts.
To save time and reduce manual errors, you can use Gemini to extend and complete information in your spreadsheets:
- Drag-and-drop: If your column has at least one completed cell, you can use a new drag entry point to fill the column based on the context of the table.
- Prompt-based filling: For empty multi-cell selections, you can use a one-click entry point to "Fill" the range. You can either automatically fill cells when a column has at least one completed cell or write a custom prompt to fit your specific needs.
Check some examples
- Generate new text
=AI(âGenerate slogan for event in 10 words or lessâ, A2)=AI("Create an email to the reviewer addressing specific items in their reviews.", A2:G2)=AI("develop a list of keywords for the job title based on the summary of duties.", A2:C2)
- Summarize input cell or range
=AI("For the customer, write a one sentence summary of their feedback.", A2:D2)=AI("You are the owner of a pet sitting business. Write a 2 sentence summary for the customer about their petâs last stay. Be a little funny.", F2)=AI("List in bullet points the main themes of the book summary.", D2)
- Categorize inputs based on given definitions or generic categories
=AI("Classify the preview as either a spam email or not a spam email.", D2)=AI("Categorize the customer inquiry as a compliment, exchange request, or return request.",C2)=AI("Classify the restaurant by which New York City borough it belongs to. Use the neighborhood to help.", A2:C2)
- Analyze sentiment
=AI("Classify the sentiment of the realtor analysis.â, D2)=AI("Perform sentiment analysis on the emails sent by the customers to the barbershop.", C2)=AI("Classify the body of the email, as either positive, negative, or neutral.", D2)
- Get up-to-date information from the web
=AI("What is the current capital of Kazakhstan?", A2)=AI("What is the population of the list capital city?", A2:B2)=AI("What is the birthday of the author who wrote the associated book. Only output the date", A2:B2")
Tip: If you want to refer to two ranges that arenât contiguous, you can use concatenation in the prompt. However, if thereâs a change in the data in ranges that are part of the prompt, you donât get a prompt to refresh the data.
For example, if you use the function =AI("Find the major themes in the customer feedback of "&B2&" using the comments: "&D2&""), when B2 or D2 change, you need to manually determine when to refresh the data.
Syntax
AI(âpromptâ,[optional range])
- Prompt: A specific prompt that describes your desired action.
- Range: This is optional. Itâs the range that the prompt refers to when it generates data.
Give feedback about the AI function
Google Workspace with Gemini is constantly learning and may not be able to support your request.
If you get a suggestion thatâs inaccurate or that you feel is unsafe, you can let us know by submitting feedback. Your feedback can help improve AI-assisted Workspace features and broader Google efforts in AI.
Because feedback may be human readable, do not submit data that contains personal, confidential, or sensitive information.
- At the bottom right of the generated text, click Good suggestion
or Bad suggestion
.
- In the pop-up window, you can select the data you want to share along with your feedback, which includes:
- Prompts
- Ranges
- Only the referenced cells are collected and their context isn't shared.
- Outputs
- If you donât want to share certain data, you can uncheck it.
- If you select Bad suggestion
, to select the issue you found and enter additional feedback, click Next.
- If you select Good suggestion
, click Submit.
- If you select Bad suggestion
To provide general feedback on this feature, at the top, click Help Help Sheets improve.
To report a legal issue, create a request.
Learn about the limitations of the AI functions
- Responses are limited to text.
- The AI function doesnât have access to your entire spreadsheet or other files in your Google Drive.
- To provide data or context to your prompt, add the data to your current spreadsheet and use the optional range argument. This is highly recommended to improve output quality.
- You canât undo or redo your function.
- You can regenerate your output instead.
- You canât have more than one function with the same name in Sheets. If you build a custom function with the name â=AI()â or â=Gemini(),â the custom function remaps to the Sheets AI function.
- Embedded AI functions arenât supported.
- For example:
=IF(AI(âsentiment analysisâ, A2)),ânegativeâ,0)
- For example:
- If âAI function not availableâ shows, it could mean that:
- You're not a participant in the Workspace Experiments program or youâre not on a Workspace plan with access to AI functions.
- You donât have access to the AI function because of your Admin settings or your language setting. Learn how to change your language setting.
- The AI function has short term and long term generation limits. If you reach a long term limit, you temporarily canât click âGenerate.â You can wait for 24 hours and then try again.
- You can select multiple cells with AI functions and generate outputs; however, only the first 350 selected cells with AI functions will be generated. You can wait for the generation to complete and select more cells to generate outputs.
- You canât generate content with the AI function if you access Sheets with other cloud storage providers like Box, Dropbox, or Egnyte with Google Drive. Learn how to use Google Docs, Sheets & Slides with Box, Dropbox, or Egnyte.
Turn off the AI function
To turn off any of the features on Google Workspace Experiments, you must exit Workspace Experiments. If you exit, you canât rejoin Workspace Experiments and permanently lose access to all Workspace Experiments features.
Learn how to exit Workspace Experiments.
If you use AI functions after you exit Workspace Experiments:
- The error âAI function not availableâ shows.
- You canât generate output with AI functions.
Learn about Workspace Experiments feature suggestions
- Workspace Experiments feature suggestions donât represent Googleâs views, and should not be attributed to Google.
- Donât rely on Workspace Experiments features as medical, legal, financial or other professional advice.
- Workspace Experiments features may suggest inaccurate or inappropriate information. Your feedback makes Workspace Experiments more helpful and safe.
- Donât include personal, confidential, or sensitive information in your prompts.
- Google uses Workspace Experiments data and metrics to provide, improve, and develop products, services, and machine learning technologies across Google.
- Your Workspace Experiments Data may also be read, rated, annotated, and reviewed by human reviewers. Importantly, where Google uses Google-selected input (as described in the Privacy Notice) to generate output, Google will aggregate and/or pseudonymize that content and resulting output before it is viewed by human reviewers, unless it is specifically provided as part of your feedback to Google.
How Workspace Experiments data in Google Sheets is collected
When you use the AI function in Sheets, Google uses and stores the following data:
- The prompts you enter
- The generated text
- Google Workspace content that you have access to that is referenced to generate content (both Google-selected input and user-provided input).
- Your feedback on the AI functions
To understand how this data is used, review the Google Workspace Experiments Privacy Notice and Terms for Personal Accounts.