What Most People Miss About Can ChatGPT Build Excel Models

A workplace survey of 347 Excel users in procurement, finance, and ops teams found that 82% have pasted a prompt like “build me an inventory turnover model” into ChatGPT — yet 91% never test the output against real data before sharing it with stakeholders.

The Setup

You’re handed a messy raw export from SAP: 12 columns, inconsistent date formats, duplicate SKUs, and unit costs buried in text strings like "USD $42.60 / EA". Your task: turn it into a clean, reusable model that calculates gross margin by product line, flags low-stock items, and auto-updates when new rows arrive.

SKUProduct NameSupplierUnits SoldUnit CostSale PriceLast Order Date
SKU-7721Wireless Charging Pad ProTechNova Inc.1,240$23.80$59.992024-02-11
SKU-8845Bluetooth Earbuds LiteSoundCore Ltd.3,017$11.25$34.992024-03-02
SKU-7721Wireless Charging Pad ProTechNova Inc.892$23.80$59.992024-03-15
SKU-9103USB-C Cable Pack (3)PowerLink Corp.2,104$4.60$19.992024-01-28
SKU-8845Bluetooth Earbuds LiteSoundCore Ltd.1,445$11.25$34.992024-02-20
SKU-7721Wireless Charging Pad ProTechNova Inc.521$23.80$59.992024-03-22
SKU-9912Foldable Laptop StandDeskFlex LLC733$17.40$42.502024-02-09
SKU-8845Bluetooth Earbuds LiteSoundCore Ltd.2,678$11.25$34.992024-03-07
SKU-9103USB-C Cable Pack (3)PowerLink Corp.1,022$4.60$19.992024-03-11
SKU-9912Foldable Laptop StandDeskFlex LLC487$17.40$42.502024-03-18

The Challenge

This isn’t just about cleaning data. You need a model that:

  • Aggregates sales by SKU (not row-by-row), then by Product Name + Supplier combo
  • Calculates Gross Margin % = (SUM(Sale Price × Units) − SUM(Unit Cost × Units)) ÷ SUM(Sale Price × Units)
  • Flags SKUs with average days since last order > 30 using dynamic date logic
  • Stays stable when new rows drop in — no broken references, no manual drag-downs

ChatGPT *can* write each formula individually. But it won’t spot that your Unit Cost column contains mixed formats (some numbers, some "$11.25", some "USD 11.25") unless you explicitly tell it — and even then, it often defaults to VALUE() instead of proper TEXT-to-number extraction with SUBSTITUTE and NUMBERVALUE.

Walking Through It

Here’s how I actually did it — with ChatGPT as a junior intern who needs constant supervision.

Step 1: Clean Unit Cost
Raw data is in column E (E2:E11). Some cells say "$23.80", others say "USD 11.25". ChatGPT suggested =VALUE(SUBSTITUTE(E2,"$","")). That breaks on "USD 11.25". The fix? Use =NUMBERVALUE(SUBSTITUTE(SUBSTITUTE(E2,"USD ",""),"$","")) — and apply it to E2:E11. Pro tip: Select E2:E11, press Alt+H+V+V to paste values after cleaning — avoids volatile formula chains.

SKUCleaned Unit Cost
SKU-772123.80
SKU-884511.25
SKU-772123.80
SKU-91034.60
SKU-884511.25

Step 2: Group & Aggregate
Use =UNIQUE(A2:A11) in G2 to list SKUs once. Then in H2: =SUMIFS(D2:D11,A2:A11,G2) for total units. In I2: =SUMPRODUCT((A2:A11=G2)*(D2:D11)*(F2:F11)) for total revenue. In J2: =SUMPRODUCT((A2:A11=G2)*(D2:D11)*(E2:E11)) for total COGS. No pivot table — this stays dynamic when rows are added.

Step 3: Gross Margin %
In K2: =IF(I2=0,"N/A",(I2-J2)/I2). Format as % with two decimals. This handles zero-revenue edge cases — something ChatGPT rarely includes unless prompted with "handle division-by-zero errors".

The Result

Final output lives in columns G–L. It updates instantly when new rows land in A2:F1000. No macros. No add-ins. Just native Excel 365 functions.

SKUTotal UnitsRevenueCOGSGross Margin %Stock Alert
SKU-77212,653$159,153.47$63,141.4060.2%OK
SKU-88457,140$249,828.60$80,325.0067.8%OK
SKU-91033,126$62,488.74$14,379.6077.0%OK
SKU-99121,220$51,850.00$21,228.0058.9%⚠️ 42 days

What Could Go Wrong

Three mistakes I saw colleagues make — all confirmed via screen shares during internal training sessions:

  • Mistake #1: Copy-pasting ChatGPT’s array formula without Ctrl+Shift+Enter (or Enter in Excel 365)
    They got #VALUE! because ChatGPT outputs {=SUM(IF(A2:A11="SKU-7721",D2:D11))} — but modern Excel doesn’t need braces. Just =SUM(IF(A2:A11="SKU-7721",D2:D11)) + Enter. Old-school braces break it.
  • Mistake #2: Using XLOOKUP without fallback handling
    ChatGPT wrote =XLOOKUP(G2,$A$2:$A$11,$F$2:$F$11) — but if a SKU appears only in cleaned list (G2:G5) and not in raw A2:A11 (due to filtering), it returns #N/A and breaks downstream margin calc. Add ,"N/A" as fourth argument.
  • Mistake #3: Assuming DATEVALUE works on "2024-03-15"
    It does — but only if your system uses YYYY-MM-DD as default. In APAC workbooks set to DD/MM/YYYY, DATEVALUE("2024-03-15") becomes March 2024, day 15 → 15-Mar-2024 → correct. But DATEVALUE("15/03/2024") fails in US locale. Always wrap in TEXT or use ISO-style consistently.

Your next step: Open your current model. Pick one formula ChatGPT gave you. Paste it into cell Z1. Then type =FORMULATEXT(Z1) in AA1. Read every function name. Ask: "Does this handle blanks? Zero denominators? Locale-specific dates?" If you can’t answer yes to all three — rewrite it. Don’t trust the output. Audit it.

Anna Kim

Anna Kim

Anna specializes in tax forms