How to Use ChatGPT in Google Sheets on Windows and Mac

A few months ago, all were stunned at the abilities of a chatbot that had an answer to nearly every question you threw at it. Now, OpenAI allows you to integrate ChatGPT with other products we use in our daily lives! In this article, we want to show you how to use ChatGPT with Google Sheets and maximize the potential of an already feature-rich product from Google.

The process works by generating an API key from OpenAI and adding it to the extension on Google Sheets. Yes, that might sound complicated and you might assume a lot of technicalities are involved, but trust us – the process is a breeze.

Once you install the GPT for Sheets extension, we will show you the capabilities it brings to Google Sheets. Follow along.

Also read: 20 best free AI tools online for your business or personal use

How to Connect ChatGPT With Google Sheets

There are two steps you need to follow to use ChatGPT with Google Sheets.

  1. Generate an API key from OpenAI.
  2. Download and set up the GPT for Sheets Extension.

Let us now begin with generating an API key from Open AI.

1. Generate OpenAI API Key

OpenAI has made it possible to connect ChatGPT to other products and applications using API keys. Application Programming Interface keys – or API keys are tools utilized by developers that permit them to connect and integrate different services for users.

Once you download an API key, you will be able to allow the extension on Google Sheets to use ChatGPT. Here’s how to download an API key from OpenAI.

Step 1: Go to OpenAI’s website.

Step 2: Log in with your OpenAI account or create one if you do not have an existing account.

Step 3: Click on your profile picture in the top right corner and select ‘View API Keys’.

Step 4: Click on the ‘Create New Secret key’ button. This will generate an API Key.

Create New Secret Key

Step 5: You will get an option to name the API key and once it is previewed to you, click on the copy button.

Click on Copy API Key

There you go – the API key is now generated and you can use it to integrate ChatGPT and Google Sheets. Let us see how to do it in the next section.

2. Download and Set Up GPT for Sheets Extension

Step 1: Open Google Sheets on your web browser.

Step 2: Now, click on Extensions -> Add Ons -> Get add-ons.

Step 3: Using the search bar, search for the extension ‘GPT for Sheets’.

Step 4: Select the extension.

Step 5: Install the Extension. Click on the Install button.

Step 6: Select the Google Account you want to link it with and click on Allow to grant permissions so that the extension can help you use ChatGPT on spreadsheets.

Step 7: Click on Next.

Step 8: Click on Done to complete the installation process.

Step 9: Now, go back to your spreadsheet. Click on Extensions -> GPT for Sheets and Docs -> ‘Launch & Enable functions’.

Step 10: Paste the API key you copied and click on Next.

You will get a response that says your OpenAI API key is valid.

Step 11: Lastly, click on Extensions from the toolbar again. Click on GPT for Sheets and Docs -> Launch & Enable functions.

There you go – that is all you need to do to install and activate the extension. In the next section, we’ll see how to make the best use of the same.

Make the Best Use of ChatGPT With Google Sheets

ChatGPT without a doubt has to be one of the most capable tools at our disposal. And with the extension you just installed, you can use the abilities of ChatGPT on your Google Sheets spreadsheet as well.

All you need to do is to use the ‘GPT_()’ function and type your instructions in the parentheses. However, there are also a few predefined functions like GPT_LIST (which provides a list of items based on your command) and GPT_TABLE (which tabulates the result of your ChatGPT command).

Let us look at all the functions along with an example prompt or command.

10 Functions to Use GPT for Sheets on Google Sheets

Here are some of the functions you can use with ChatGPT on Google Sheets :

GPTThis function simply lets you use the result of a ChatGPT prompt in a cell. GPT(“Write an introduction for a financial report”)
GPT_LISTOutputs the result of a ChatGPT prompt as a list in consecutive cells of a column. GPT_LIST(“List of top ten countries with highest GDP”)
GPT_TABLEOutputs the result of a ChatGPT prompt as a table. GPT_TABLE(“top ten currencies of the world and their conversion rate with USD”)
GPT_EDITHelps you correct typographical and grammatical errors in a given text. GPT_EDIT(“acount totals of a 2021”)

Corrects the errors in the word ‘acount’ and the grammatical errors in the sentence.
GPT_EXTRACTHelps you extract data from a text and outputs as values separated by commas. GPT_EXTRACT(“My name is Supreeth I work at Guiding Tech”, “name”, “companies”)
GPT_SUMMARIZESummarizes text in a cell or a range of cells. GPT_SUMMARIZE(cell address)
GPT_TRANSLATETranslates text in a cell. Works better when the source language is specified. GPT_TRANSLATE(“Hello, Good Morning”, “french”)
GPT_CONVERTConverts from one format to another. Example – xml to json. GPT_CONVERT(“<ul><li><p>Name: James</p><p>Age: 27</p></li><li><p>Name: Jenna</p><p>Age: 28</p></li></ul>”, “json”)
GPT_CODEHelps you generate a code according to the details in the prompt. GPT_CODE(“concatenate two strings”, “Python”)
GPT_CREATE_PROMPTHelps you concatenate cells and create a prompt from disjointed data. GPT_CREATE_PROMPT(cell ranges)

There you go – that is everything you need to know about how to use ChatGPT with Google Sheets. However, if you have any further questions, look at the FAQ section below.

FAQs on ChatGPT and Google Sheets

1. The GPT for Sheets extension is not working for me. What do I do?

Ensure you have enough credits on your OpenAI account. You can check it under the Usage option in your account. However, the shortcut is also dependent on ChatGPT’s servers. So, if it is down, you need to wait until it is restored.

2. I am getting a warning that says ‘Your API Key is Not Working’ on GPT for Sheets on Google Sheets. What do I do?

Try generating another OpenAI API key and pasting it to the extension. Or, you can wait for some time until the API key is activated.

Use Google Sheets Like a Pro

We hope this article helped you use Google Sheets and ChatGPT and maximize the capabilities of the free spreadsheet tool by Google. The AI revolution seems to be here, and if there’s one thing that we need to be good at, it is writing prompts! Therefore, take a look at two of our comprehensive guides that’ll help you write better prompts for Dall-E 2 and ChatGPT:

Last updated on 26 April, 2023

The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.