This guide will explore the best ways you can use ChatGPT in Google Sheets.
OpenAI’s ChatGPT is a powerful language model that can help users improve their Google Sheets workflows and formulas. We’ll look into how to write the perfect ChatGPT prompts to allow the AI to return the best results.
ChatGPT is a chatbot service released in 2022 by OpenAI that can mimic natural human-like conversation.
The AI was fine-tuned with OpenAI’s GPT-3.5 language model, which was trained on data from over 8 million documents. The model’s massive training dataset allows the chatbot to answer questions from almost any topic you can imagine.
Professionals have already started using ChatGPT to speed up their workflow using Google Sheets. The AI can perform various tasks, from answering straightforward questions about Google Sheets to creating Apps and Script code users can run.
In this guide, we will go through the best use cases for ChatGPT. We’ll first provide sample ChatGPT prompts for each possible use case. Afterward, we will show you how ChatGPT’s responses can be applied to your Google Sheets projects.
Head over to the next section to see the sample prompts you can try out with ChatGPT.
Best Ways to Use ChatGPT in Google Sheets
In this section, we’ll look into a few useful ways we can use ChatGPT in Google Sheets. We will also provide the chat prompts you can use with ChatGPT to generate similar results.
Create Google Sheets Formulas with ChatGPT
Users can ask ChatGPT to write a Google Sheets formula for a specific purpose.
For example, we can ask ChatGPT to create a formula that computes how long ago a particular date was. We can use the following prompt:
Write a Google Sheets formula that… [task]

Our prompts can even specify which cells to use as reference.

We can copy the code into our clipboard by clicking on the Copy code text in the top-right corner. We can paste the formula into Google Sheets to confirm that the formula works as intended.

Create Apps Script Code with ChatGPT
We can also ask ChatGPT to generate an Apps Script code.
Google Apps Script is the main programming language of Google Sheets. Apps Script code enables us to automate workflows that are done within the Google Workspace.
We can use the following template to form our prompts:
> Write an Apps Script that… [task]
For example, we can command ChatGPT to delete all empty rows in a particular range.

You can learn more about generating Apps Script code to automate workflows by reading our guide here.
Explaining Formulas with ChatGPT
Aside from generating formulas, ChatGPT can also explain existing formulas.
For example, you may be accessing another user’s spreadsheet, and you find a formula you don’t quite understand.
You can use the following prompt with ChatGPT:
Explain the following Google Sheets formula: [Formula]
In the example below, we asked ChatGPT to explain the formula =EOMONTH(TODAY(),0). We now know that the formula returns the date of the last day of the current month.
Create Regular Expressions with ChatGPT
Users who are familiar with regular expressions should know that creating the right regular expression for a particular use case is not a straightforward task.
Google Sheets functions such as REGEXMATCH and REGEXREPLACE are only as accurate as the user’s regular expression.
Luckily, we can use ChatGPT to convert plain text into a regular expression.

In the example above, ChatGPT returned a regular expression that matches strings of a certain format. The response even includes an explanation of each symbol used in the expression.
We can use the regular expression with the REGEXMATCH function to create a formula that checks whether a given username is valid.

Do you want to take a closer look at our examples? You can make your own copy of the spreadsheet above using the link attached below.
Use our sample spreadsheet to copy the prompts we’ve used in the previous examples.
Best Practices When Using ChatGPT with Google Sheets
This section will guide you through some useful tips you can follow when creating ChatGPT prompts.
- First, ChatGPT’s responses are more accurate if you write your prompts to be as specific as possible.
For example, ‘Write a formula that finds the center value of a range’ may prompt ChatGPT to return various possible results. However, the prompt “Write a formula that returns the median of a range” will certainly signal that we need to use theMEDIANfunction. - Next, users should still verify the ChatGPT responses. While the AI can provide accurate results, it is certainly possible for ChatGPT to return an inaccurate or incomplete result.
- ChatGPT is sensitive to particular keywords. For example, if we do not specify that we want to return a Google Sheets formula, ChatGPT may return a script written in another programming language.
- Users should also avoid using jargon or slang in their prompts. ChatGPT may fail to understand the meaning of the request and return an inaccurate result.
Use the steps mentioned above to start creating the perfect ChatGPT prompt!
Hopefully, this guide has helped you understand how you can use ChatGPT alongside your current Google Sheets workflow. We’ve provided some of the best use cases for the AI as well as the sample prompts we’ve used.
Using ChatGPT’s AI is just one way you can improve your Google Sheets workflow. Our website offers hundreds of other functions and methods to help you get more out of Google Sheets.
With so many other Google Sheets functions available, you can find one appropriate for your use case.
Don’t miss out on our team’s new spreadsheet tips, tricks, and best practices. Subscribe to our newsletter to stay updated on the latest guides from us!