=GPT_TABLE() — generate a whole table from one prompt
=GPT_TABLE() asks the AI for structured data and spills the answer into multiple rows and columns, starting from the cell that holds the formula. It is the fastest way in GPT for Sheets to draft datasets, comparison tables and content plans.
Syntax
=GPT_TABLE(prompt, [headers])
| Parameter | Required | Description |
|---|---|---|
prompt |
yes | What table to generate. A string or a cell reference. |
headers |
no | One cell or a range containing the column headers you want, e.g. A1:D1. |
Examples
Draft a competitor comparison for research:
=GPT_TABLE("top 10 CRM tools with vendor, founding year and target audience")
Reuse your own headers — put Keyword, Intent, Suggested title in A1:C1 and generate an SEO content plan under them:
=GPT_TABLE("20 blog post ideas about email marketing", A1:C1)
Build a product attribute sheet for an e-commerce category:
=GPT_TABLE("15 popular running shoe models with brand, drop in mm and cushioning type")
Seed test data for a demo file:
=GPT_TABLE("8 fictional customers with name, company, country and industry")
Tips
- The output needs empty cells below and to the right of the formula — clear the area first or Sheets shows
#REF!. - Passing
headerskeeps columns in a fixed order, so you can drag other formulas against them safely. - Once the table looks right, use Replace all GPT formulas with results in the sidebar so the data stops regenerating on refresh.
- AI-generated facts are drafts — verify numbers before publishing. For live data, combine with =GPT_WEB_SEARCH().
Related functions
- =GPT_LIST() — a single vertical list instead of a table
- =GPT_FILL() — autofill a range from examples
- =GPT() — one answer in one cell
Try it
=GPT_TABLE() ships with GPT for Sheets — no API keys needed. Install the add-on from the Google Workspace Marketplace.