GPTX Functions for Sheets

Section header image mobile

Get ready to elevate your Google Sheets experience with the revolutionary GPTX Functions! 🤯 Powered by OpenAI's language model, these functions empower you to perform tasks like natural language processing, text generation, sentiment analysis, and even code generation directly within your spreadsheets. 🚀 Unleash the potential for new insights and improved decision-making, automating workflows to boost your productivity. Buckle up and explore a whole new world of possibilities as GPTX functions take your spreadsheets to the next level!

*This feature is currently supported on Google Sheets only*

GPTX function

GPTX_LIST function

GPTX_TABLE function

GPTX_FILL function

GPTX_MAP function

GPTX_EDIT function

GPTX_FORMAT function

GPTX_TAG function

GPTX_CLASSIFY function

GPTX_EXTRACT function

GPTX_SUMMARIZE function

GPTX_TRANSLATE function

GPTX_CONVERT function

GPTX_CODE function

FAQs for GPTX_ Functions

GPTX function

Let GPT do the job for you by producing text and displaying the results in a single cell.

Use Instructions

Function format (syntax) =GPTX(prompt)
copy/paste example =GPTX(”Write a funny email subject line for job application”)
Output The answer to your prompt will return in a single-cell

Parameters (Inputs)

Parameter Definition
prompt The text (or range of cells) containing a prompt to generate text from (example: ”Write a funny email subject line for job application” or A1:A7)

Example of Input /Output

Screenshot 2023-04-12 at 3.03.11 PM.png

ℹ️ Click here for an example.

 

GPTX_LIST function

Like the GPTX function, but even more user-friendly for quickly generating results in a list format.

Use Instructions

Function format (syntax) =GPTX_LIST (prompt)
copy/paste example =GPTX_LIST(”List 5 outrageous excuses for showing up late to a meeting”)
Output The number of responses you asked for in your prompt with one response per cell

Parameters (Inputs)

Parameter Definition
prompt text or cell containing prompt to generate text from (example: ”List 5 outrageous excuses for showing up late to a meeting” or A1)

Example of Input /Output

Screenshot 2023-04-12 at 3.17.23 PM.png

ℹ️ Click here for an example.

 

GPTX_TABLE function

Instantly receive your results with our function that creates tables in a snap! 🫰🏼

Use Instructions

Function format (syntax) =GPTX_TABLE(prompt, [header_row])
copy/paste example =GPTX_TABLE(”Top 10 most populous countries”, B1:E1)
Output responses

Parameters (Inputs)

Parameter Definition
prompt text or cell containing prompt (example: ”Top 10 most populous countries” or A1)
header_row (optional)
A range corresponding to a header row with the desired column headers. If not specified, GPT will create column headers for you (example: B1:E1)

Example of Input /Output

Screenshot 2023-04-13 at 4.39.38 PM.png

ℹ️ Click here for an example.

 

GPTX_FILL function

Fill in a range with generated results that follow the pattern of the example rows you choose!

Use Instructions

Function format (syntax) =GPTX_FILL(examples_rows, [incomplete_rows])
copy/paste example =GPTX_FILL(A2:B6, A7:A10)
Output Based on the provided examples, the blank portion of the range will be populated

Parameters (Inputs)

Parameter Definition
example_rows A range containing example rows for GPT to learn from (example: A2: B6)
incomplete_rows (optional)
A range containing incomplete rows that GPT should fill in. If not specified, one new row is generated (example: A7:A10)

Example of Input /Output

Screenshot 2023-04-14 at 3.54.04 PM.png

ℹ️ Click here for an example.

 

GPTX_MAP function

Quickly map the values of two columns based on their similarities and avoid the headache of manual comparisons!

Use Instructions

Function format (syntax) =GPTX_MAP(search_keys, inputs) =GPTX_MAP(search_keys, inputs)
copy/paste example =GPTX_MAP(A2:A8, B2:B10)
Output Returns the most similar search key for each input value

Parameters (Inputs)

Parameter Definition
search_keys
A range containing the search keys (search term or keywords) to look for (example: A2:A8)
inputs
A range of input values to search (example: B2:B10)

Example of Input /Output

Screenshot 2023-04-13 at 5.01.51 PM.png

ℹ️ Click here for an example.

 

GPTX_EDIT function

Effortlessly tidy up and edit text input right before your eyes!

Use Instructions

Function format (syntax) =GPTX_EDIT(text, [task])
copy/paste example =GPTX_EDIT(”Ar they’re Ny errrs in thssi setnence”)
Output Edited text returns in a single cell

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to be edited (example: ”Ar they’re Ny errrs in thssi setnence” or A1:A2)
task (optional)
The task (or range of tasks) for how the text should be edited. If no tasks are specified, it defaults to fixing grammar and spelling (example: “Make it funny” or B1)

Example of Input /Output

Screenshot 2023-04-13 at 5.10.46 PM.png

ℹ️ Click here for an example.

 

GPTX_FORMAT function

Easily transform your input text into the desired format!

Use Instructions

Function format (syntax) =GPTX_FORMAT(text, language)
copy/paste example =GPTX_FORMAT (“5:15PM on Feb 10, 2023”, “PST”)
Output Formatted text returns in a single cell

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to convert (example: “5:15PM on Feb 10, 2023” or A2:A5)
format
The format (or range of formats) to convert to (example: "PST” or B2:B5)

Example of Input /Output

Screenshot 2023-04-17 at 2.39.02 PM.png

ℹ️ Click here for an example.

 

GPTX_TAG function

Tag it up! Rapidly match and apply descriptive tags to your text for enhanced organization and easy searchability.

Use Instructions

Function format (syntax) =GPTX_TAG(text, tags)
copy/paste example =GPTX_TAG(”apple”, ”colorful, sweet, bitter, fruit”)
Output Returns the tags(s) for the specified text

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to apply tags to (example: “Titanic” or B2:B11)
tags
List of possible tags, specified either as comma-separated text or in a range of cells (example: ”colorful, sweet, bitter, fruit” or A2:A8)

Example of Input /Output

Screenshot 2023-04-13 at 5.33.59 PM.png

ℹ️ Click here for an example.

 

GPTX_CLASSIFY function

Whether you're sifting through extensive data sets or just organizing a few lines of text, effortlessly categorize your content based on predefined categories or labels.

Use Instructions

Function format (syntax) =GPTX_CLASSIFY(text, labels)
copy/paste example =GPTX_CLASSIFY("pumpkin", "fruit, vegetable, grains, protein”)
Output Returns the most relevant label/category for the specified text

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to classify (example: "pumpkin" or B2:B9)
labels
List of possible labels, specified either as comma-separated text or in a range of cells
(example: "fruit, vegetable, grains, protein” or A2:A7)

Example of Input /Output

Screenshot 2023-04-17 at 2.34.59 PM.png

ℹ️ Click here for an example.

 

GPTX_EXTRACT function

Stop searching and start finding! This extraction function makes it easy to extract the information you need from your input text.

Use Instructions

Function format (syntax) =GPTX_EXTRACT(text, info_to_extract)
copy/paste example =GPTX_EXTRACT(”123 Main St, Smallville, CA, USA”, “city”)
Output Returns the desired extracted information from the text provided

Parameters (Inputs)

Parameter Definition
text
The text (or range of text) to extract information from (example: ”123 Main St, Smallville, CA, USA” or A2:A5)
info_to_extract
The description (or range of descriptions) of the information/entity to extract (example: “city”)

Example of Input /Output

Screenshot 2023-04-13 at 5.37.03 PM.png

ℹ️ Click here for an example.

 

GPTX_SUMMARIZE function

Capture the essence of your text swiftly using our summarization function! Whether you require a brief overview or a detailed summary, this function has you covered.

Use Instructions

Function format (syntax) =GPTX_SUMMARIZE(text, [format])
copy/paste example =GPTX_SUMMARIZE(A2:A10, “10 words or less”)
Output Returns a summary of the input text in the format specified.
NOTE - If selecting to summarize a range of cells, the output will be a summary for each individual cell of the selected range, not a single summary of all cells included in range.

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to summarize (example: ”A very long blob of text to summarize” or A2:A4)
format (optional)
The desired summary format (or range of formats). If not specified, default is to generate a summary of reasonable length (example: “10 words or less” or B2:B4)

Example of Input /Output..(Sorry for the spoilers 😬)

Screenshot 2023-04-13 at 5.43.27 PM.png

ℹ️ Click here for an example.

 

GPTX_TRANSLATE function

Simplify the process of converting your input text into any language. Just specify the target language, and this function will do the heavy lifting, enabling you to communicate effortlessly with people around the globe.

Use Instructions

Function format (syntax) =GPTX_TRANSLATE(text, language)
copy/paste example =GPTX_TRANSLATE(”Thank you”, “Japanese”)
Output Returns the input text in the language provided

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to translate (example: “I don’t speak pig latin” or A2:A5)

language
The language (or range of languages) to translate the provided text into (example: “Pig Latin” or B2:B5)

Example of Input /Output

Screenshot 2023-04-13 at 5.46.30 PM.png

ℹ️ Click here for an example.

 

GPTX_CONVERT function

Streamline the process of converting your input text into the structured format of your choice.

Use Instructions

Function format (syntax) =GPTX_CONVERT(text, format)
copy/paste example
=GPTX_CONVERT(”<fruits><fruit>apple</fruit><fruit>banana</fruit></fruits>”, “csv”)
Output

Returns the provided text in the specified format

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) to convert to a new format (example: “<div><p>apple</p><p>banana</p></div>” or A2:A4)

format
The format (or range of formats) to convert the provided text(s) to (example: “json” or B2:B4)

Example of Input /Output

Screenshot 2023-04-13 at 5.48.23 PM.png

ℹ️ Click here for an example.

 

GPTX_CODE function

Bid farewell to manual coding and embrace efficient automation! Effortlessly generate code that accomplishes your specified tasks with ease.

Use Instructions

Function format (syntax) =GPTX_CODE(task, language)
copy/paste example
=GPTX_CODE(”Extract domain from email address”, “JavaScript”)
Output

Returns the code block that executes the specified task in a single cell

Parameters (Inputs)

Parameter Definition
text
The text (or range of texts) defining what the generated code should do (example: “Extract domain from email address” or A2:A4)
language
Programming language the code needs to be written in (example: “JavaScript” or B2:B4)

Example of Input /Output

Screenshot 2023-04-13 at 5.50.27 PM.png

ℹ️ Click here for an example.

 

FAQs for GPTX_ Functions

Is there a token (or character) limit for GPTX functions?

Yes, to ensure that ChatGPT can provide a sufficient response, we have set a character limit of 2k tokens. This is about 8k characters for the prompt. 

Do I need to have Coefficient open for GPTX functions to work?

For GPTX Functions to calculate, you will need to open the Coefficient sidebar at least once. 

Why do I get the same response each time I run the GPTX function?

We use caching on every spreadsheet, which allows us to quickly retrieve answers to frequently asked questions without having to reprocess them with GPT. This results in faster response times, improved performance, and a more efficient user experience.

If you would like to clear your spreadsheet's cache, follow these steps:

  1. Launch the Coefficient sidebar
  2. Click on GPT Copilot
  3. Select Use GPT from the sheet
  4. Click on the 3-vertical dots on the page header
  5. Select "Clear Cache" and confirm. 

Who can use the GPTX functions in my spreadsheet?

Anyone with Editor (Google Sheets Permissions) can use the GPTX functions, however - all the usage will incur on the owner of the spreadsheet who first launched Coefficient. 

Will GPTX functions recalculate when I reload my sheet?

The GPTX functions, similar to Google Sheet formulas, recalculate when you reload the sheet. To avoid these recalculations affecting your usage limits, we've implemented caching. This means you'll receive consistent responses in that sheet. However, if you're aiming for fresh calculations, you'll need to reset your cache.

 

Was this article helpful? 2 out of 3 found this helpful