Beta
This is a new feature and we can’t wait to hear your feedback. Just let us know. Use with caution: beta features may contain some bugs and rough edges. To test the feature, start a free trial or update to the latest XLTools version.
GPT.Classify - Categorize text into predefined groups in Excel
GPT.Classify is an AI function that classifies a given text into one of the specified categories.


Syntax
=GPT.Classify(text, categories, [examples])
Argument | Description |
---|---|
text [required] | The text to classify. Cannot be empty. |
categories [required] | Comma-separated list of categories or a range specifying possible categories. |
examples [optional] | Range of examples (two columns) for better classification accuracy. |
Before you begin, add Functions to Excel
Functions are one of the 20+ features within XLTools Add-in for Excel. Works in Excel 2019, 2016, 2013, 2010, desktop Office 365.

Download XLTools for Excel
Examples [download]
Download this spreadsheet with examples and try the function yourself.
Download examples with this function (xlsx)
Formula | Description | Result |
---|---|---|
=GPT.Classify("Apple", "fruit, tech company") | Classifies "Apple" based on the given categories. | "tech company" |
=GPT.Classify("Tesla", "automobile, tech company, energy") | Classifies "Tesla" into one of the specified categories. | "automobile" |
=GPT.Classify("Python", "programming language, snake", A1:B2) | Classifies "Python" with the help of examples for better accuracy. | "programming language" |
Any questions or suggestions?