Back to articles
AI in ExcelFormulas
2026-11-265 min read
#ai#formulas#productivity

Can ChatGPT Create an Excel Spreadsheet? Build an Inventory Tracker

Functions in this article

Jump to the reference pages for the Excel functions used below.

Browse library
Table of Contents

Yes, ChatGPT can create an Excel spreadsheet in an experience that supports file creation. Ask for a downloadable .xlsx workbook and specify the cells, formulas, and data it should contain. OpenAI documents this workflow through ChatGPT Work, where availability depends on your plan, workspace settings, and the version of ChatGPT you're using.

Start with an empty chat in Work when it's available to you. The prompt below asks for a three-product inventory tracker. Once you have the file, you'll open it in Excel and change a stock quantity to check that the formulas recalculate.

You can also download the editorial reference workbook to follow the checks. This example was created for the article and verified in Excel for Mac. The ChatGPT creation steps follow OpenAI's documentation.

Ask for a workbook with live formulas

The tracker uses a simple rule. When stock is below the reorder point, order enough units to reach that point. Otherwise, order zero. This example assumes whole units and has no supplier minimum or pack-size requirement.

Copy this prompt into your new chat. All the source data is included, so you can begin without uploading a file.

Create and attach a downloadable Excel workbook named inventory-tracker.xlsx.
Create one worksheet named Example.

Put the title Can ChatGPT Create an Excel Spreadsheet? Build an Inventory Tracker
in A1. Leave row 3 blank.

Put these headers in A4:D4.
Product | In Stock | Reorder Point | Order Qty

Enter these values in A5:C7.
USB Cable | 8 | 10
Notebook | 15 | 12
Shipping Label | 4 | 5

In D5, enter =IF(B5<C5,C5-B5,0).
Fill the formula down through D7 with relative row references.
Put Total to Order in C9 and =SUM(D5:D7) in D9.
Keep the quantities numeric and the formulas editable.
Use readable column widths and bold headers.

The initial Order Qty values should be 2, 0, and 1, with a total of 3.
If B5 changes to 11, the first order quantity should become 0
and the total should become 1.
Attach the generated .xlsx workbook so I can download and open it in Excel.
AI prompt

When ChatGPT finishes, look for the generated file or its download control. Save the .xlsx file and open it in Excel. Check the filename and extension before continuing. A written description of a workbook still needs a file attached before you can perform these checks.

If you receive only text or a CSV

Ask a follow-up request that explicitly asks ChatGPT to generate and attach inventory-tracker.xlsx with the specified formulas. If file creation is unavailable in that chat, use the reference download or build the same small example in Excel.

To build it yourself, create a sheet named Example, then paste this into A4.

Product	In Stock	Reorder Point	Order Qty
USB Cable	8	10
Notebook	15	12
Shipping Label	4	5
Text

Enter the formulas shown in the next section and save the file as an Excel Workbook (.xlsx).

OpenAI's data-analysis guide says the Download button on an interactive table produces a CSV. If that's what you receive, open the data in Excel, add the formulas, and save an .xlsx copy. Check the formula bar before assuming an exported order quantity will update.

Check the formulas and starting quantities

In the Example sheet, select D5 and inspect the formula bar. It should contain this formula.

=IF(B5<C5,C5-B5,0)
Formula

If you're building the sheet yourself, enter this formula in D5 and fill it down through D7. The IF function checks whether stock is below the reorder point. For USB Cable, 8 is below 10, so the formula returns the difference of 2. In D6 and D7, the references should use rows 6 and 7 respectively.

Select D9 and check the total formula.

=SUM(D5:D7)
Formula

The SUM function adds the three order quantities. Put Total to Order in C9 if you're assembling the sheet yourself.

ProductIn StockReorder PointExpected Order Qty
USB Cable8102
Notebook15120
Shipping Label451

The initial total in D9 should be 3. Here's the reference workbook at that point.

Excel for Mac showing the IF formula in D5, order quantities 2, 0, and 1, and a total of 3
The editorial reference workbook in Excel for Mac. D5 is selected so you can see its formula and the calculated quantity together.

Change one input to verify recalculation

Change B5 from 8 to 11. The USB Cable quantity in D5 should become 0. The three order quantities should now be 0, 0, and 1, with 1 in D9.

Restore B5 to 8. Check that D5 returns to 2 and the total returns to 3. These calculations and edits were verified in the reference workbook using Excel for Mac 16.114 (26101123).

If your generated file stays at the old result, check whether D5 contains a formula and whether Excel's calculation mode is Automatic. If only the total is wrong, check that D9 sums D5:D7. A file can look correct on its first opening while still containing fixed numbers where formulas belong.

Use your own inventory after the checks pass

Replace the three product names and stock figures with your own values. If you add rows, extend the order formulas and update the total range to include them. Tell ChatGPT about supplier pack sizes or minimum orders before asking it to expand the tracker.

For an inventory file you already have, follow the guide to uploading an Excel workbook to ChatGPT. To work directly inside an open workbook, ChatGPT for Excel provides a separate add-in workflow.

Enjoyed this guide?

Join our newsletter to get the latest Excel tips delivered to your inbox.

You can unsubscribe anytime. See our Privacy Policy.