All available functions in GPT for Excel
Discover all available functions in GPT for Excel, along with simple examples and an extensive list of paramaters. If you are looking for usage examples, download our Microsoft Excel template.
Prerequisites
GPT function
To process images, use GPT_VISION. To get up-to-date information based on recent web search data, use GPT_WEB.
How to use
Syntax | =GPT(prompt, [value], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | A response to your prompt in a single cell |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction provided to the AI to generate a result in a single cell. The prompt parameter can be:
|
(optional) value | Text, cell or range you want your prompt to apply to |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_LIST / GPT_HLIST function
Like GPT, but outputs the results in a column. Very practical when the output is a list.
- Use GPT_LIST to return options listed vertically.
- Use GPT_HLIST to return options listed horizontally.
How to use
Syntax | =GPT_LIST(prompt, [value], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | As many responses to your prompt as you asked, one response per cell |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction provided to the AI to generate a list. The prompt parameter can be:
|
(optional) value | Text, cell or range you want your prompt to apply to |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_SPLIT / GPT_HSPLIT function
Splits text semantically, such as by section, paragraph, sentence, customer…
- Use GPT_SPLIT to return outputs listed vertically.
- Use GPT_HSPLIT to return outputs listed horizontally.
How to use
Syntax | =GPT_SPLIT(text, split_by, [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | Input text is split as requested, one element per cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to split. The text parameter can be:
|
split_by (cannot be empty) | How to split the text. Examples:
|
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_FILL function
Magically fills or cleans a range from a few examples. For best results, use GPT_FILL with the gpt-4o model and add custom instructions to guide the AI.
How to use
Syntax | =GPT_FILL(examples, [inputs], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The empty part of the range will be filled based on the examples provided |
Parameters
Parameter | Definition |
---|---|
examples | Range containing complete examples that the AI should learn from |
(optional) inputs | Range containing incomplete data that the AI should complete from the examples |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_TABLE function
Like GPT, but outputs the results in a table. Very practical when the output is a table.
How to use
Syntax | =GPT_TABLE(prompt, [head], [inputs], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The response to your prompt in the shape of a table |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction to generate a table. The prompt parameter can be:
|
(optional) head | Range containing at least one row. the first row should be headers, the following rows can be used to specify examples If left empty, headers will be generated automatically. |
(optional) inputs | Range containing partial rows to complete with GPT_TABLE |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_MATCH function
Matches the values of two columns by similarity.
Regardless of the model you choose, this function always uses text-embedding-ada-002. If you have access to text-embedding-ada-002 with your own API key, select it in the model switcher to reduce costs. Learn more about pricing.
How to use
Syntax | =GPT_MATCH(search_keys, lookup_range, [confidence], [stats], [top_k]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | A column of the best matches to each value in the range |
Parameters
Parameter | Definition |
---|---|
search_keys (cannot be empty) | The values that you want to look for in the range |
lookup_range (cannot be empty) | The range in which to look for values that are similar to search keys |
confidence (optional) | Set a similarity threshold: only values with a superior similarity score are matched. Must be comprised between 0 and 1 |
stats (optional) | "true" to display similarity scores |
top_k (optional) | Number of matching values to return per search_key (default: 1 - only the best match) |
GPT_FORMAT function
Formats dates, currencies, addresses, names, etc. Fixes capitalization. And so much more.
GPT_CONVERT and GPT_FORMAT perform the same task. We removed GPT_CONVERT from the list of available functions, but it still executes if manually typed.
How to use
Syntax | =GPT_FORMAT(input, target_format, [source_format], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The converted input in a single cell unless it is converted a table, which outputs a table |
Parameters
Parameter | Definition |
---|---|
input (cannot be empty) | Input text to format. The input parameter can be:
|
target_format (cannot be empty) | Target format for the input. Examples: "iso", "currency iso", "international phone number", "lowercase/uppercase/camelcase/snake case/title case/sentence case"… |
(optional) source_format | Source format of the input. Optional, but including it can yield better results. |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_EDIT function
Applies the given task to the given text. The default task is to fix grammar and spelling.
How to use
Syntax | =GPT_EDIT(text, [edit_instruction], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The edited text in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to edit. The text parameter can be:
|
(optional) edit_instruction | Text, cell or range specifying how the text should be edited. Defaults to fixing grammar and spelling. Other examples:
|
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_CLASSIFY function
Classifies a given text into a single category.
How to use
Syntax | =GPT_CLASSIFY(value, categories, [examples], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The best applicable category |
Parameters
Parameter | Definition |
---|---|
value (cannot be empty) | Input text to classify. The value parameter can be:
|
categories (cannot be empty) | Comma-separated categories or range of categories to choose from. Only the most relevant category will be returned. |
(optional) examples | A table of examples in two columns. The first column should contain the inputs and the second column should contain the outputs. |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_EXTRACT function
Extracts data (like email addresses or company names) from a text. Outputs as comma-separated values.
How to use
Syntax | =GPT_EXTRACT(text, to_extract, [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The extracted entities as comma-separated values in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to extract data from. The text parameter can be:
|
to_extract (cannot be empty) | Text, cell or horizontal range specifying what you want to extract. Examples:
|
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_SUMMARIZE function
Summarizes text according to a given format (three sentences by default).
How to use
Syntax | =GPT_SUMMARIZE(text, [format], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | A summary in the requested format in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to summarize. The text parameter can be:
|
(optional) format | Format of the summary. Examples:
|
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_TAG function
Applies user-defined tags to text or automatically suggests relevant tags if none are specified.
How to use
Syntax | =GPT_TAG(value, [tags], [examples], [top_k], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The applicable tags as csv in a single cell |
Parameters
Parameter | Definition |
---|---|
value (cannot be empty) | Input text to tag. The value parameter can be:
|
(optional) tags | Comma-separated tags or range of tags applicable. If left empty, GPT_TAG will automatically come up with the tags |
(optional) top_k | Maximum number of tags to return |
(optional) examples | A table of examples in two columns. The first column should contain the inputs and the second column should contain the outputs. |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_TRANSLATE function
Translates text from one language into another. Works better if you specify the source language.
How to use
Syntax | =GPT_TRANSLATE(text, [target_language], [source_language], [instructions], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | The requested translation in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to translate. The text parameter can be:
|
(optional) target_language | Language of the output. Examples: "spanish", "chinese", "french". Defaults to "english". |
(optional) source_language | Language of the input. Example: "english" |
(optional) instructions | Additional instructions for the translation. Can include a dictionary of translations. |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_VISION function
Applies a prompt to an image. For example you can ask a question about the image, ask for a description of it, or generate alt text for images. Learn more.
- Regardless of the model you choose, this function always uses gpt-4o. If you have access to gpt-4o with your own API key, select it in the model switcher to reduce costs. Learn more about pricing.
- GPT_VISION is the only function that accepts images as input.
How to use
Syntax | =GPT_VISION(prompt, image_url, [high_res], [temperature]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | A response to your prompt according to the information extracted from the image |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction provided to the AI to analyze an image. The prompt parameter can be:
|
image_url | Link to the image you want the AI to analyze. Supported formats are PNG, JPEG, WEBP, and non-animated GIF. Maximum size is 20MB per image. The image_url parameter can be:
|
(optional) high_res | How the AI processes the image and generates its textual understanding. Possible values are true , false , and auto (default). Learn more. |
(optional) temperature | Number between 0 and 1 that governs the creativity of GPT:
|
GPT_WEB function
Provides up-to-date information sourced from recent web search data. Use GPT_WEB when you need fresh and accurate answers to questions about companies, current events, facts, people, and more. The function is built on the Perplexity API.
- Regardless of the model you select, GPT_WEB always uses the Perplexity API model
llama-3.1-sonar-small-128k-online
. - GPT_WEB is the only function that generates responses based on recent web search data.
- If you provide a URL in the prompt, the function attempts to generate a response based on search data from that specific web page.
Searching a specific page only works if:
- Perplexity's web crawler has already independently indexed the content of the page. The crawler does not index new pages on demand based on URLs you provide. In addition, the crawler respects robots.txt directives and does not index disallowed content.
- The URL points directly to the page without any redirects. To check if a URL results in redirects, use the Redirect Checker.
If a specific URL does not produce valid results, use a different source of information.
- GPT_WEB is priced per 1000 executions instead of tokens. In this case, input and output size do not matter. The price of GPT_WEB is $15 or €15 per 1000 executions.
- GPT for Excel settings do not apply to the GPT_WEB function.
How to use
Syntax | =GPT_WEB(prompt, [value]) |
---|---|
Copy/paste example |
|
⚠️ Localization | In some locales, you might need to use ";" to separate parameters instead of "," |
Output | A response to your prompt based on recent web search data |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instructions provided to the AI to generate results based on recent web search data. Provide instructions in English for better results. The prompt parameter can be:
|
(optional) value | Text, cell, or range you want your prompt to apply to |