Skip to main content
Guides

ChatGPT for Excel: Formulas for Invoices and Finance

ChatGPT for Excel, made practical: prompts plus tested formulas for invoice trackers, due dates, aging buckets, VAT and SUMIFS reports you can copy today.

By Invoice Creator Editorial Team 9 min read

Quick answer: Using ChatGPT for Excel works best when you describe your columns by letter, give one example row and the result you expect, and ask for the formula plus an explanation. Then test it on rows you can check by hand. This guide gives ready formulas for invoice trackers, due dates, aging buckets, VAT and SUMIFS reports.

Spreadsheets are still where many small businesses keep their invoice log, expense list and cash forecast. AI chatbots are good at the part people find hardest: turning "total everything unpaid for this client" into a working formula. Below you will find a prompt pattern that produces fewer errors, a complete invoice tracker layout with formulas, a worked aging example with the arithmetic shown, and the mistakes that most often break AI-written formulas. If you want the basics of building an invoice sheet first, start with our guide on how to make an invoice in Excel.

How to ask ChatGPT for Excel formulas that work

Most bad formulas come from vague prompts. The model has to guess your layout, your version of Excel and what "paid" means in your sheet. Remove the guessing:

  1. Name the program and version. Excel for Microsoft 365, Excel 2019, or Google Sheets.
  2. Describe the columns by letter. "A is invoice number, C is issue date, E is due date, K is balance."
  3. Give an example row and the expected answer. "Row 2: due 15 Oct 2026, balance 1,200; as of 27 Oct 2026 the result should be 12."
  4. State edge cases. Blank rows, zero balances, partial payments, credit notes.
  5. Ask for an explanation. If you cannot follow the logic, you cannot maintain the sheet.

A complete prompt looks like this: I use Excel for Microsoft 365. Column E holds due dates, column K holds the unpaid balance. In column M, write a formula that shows days overdue as of today, returns 0 if the balance is 0 or less or the invoice is not yet due, and ignores blank rows. Explain each part.

Prompts for fixing and explaining formulas

Debugging is often more valuable than writing from scratch. Three prompts cover most situations:

  • This formula returns #VALUE! in Excel for Microsoft 365: [paste formula]. Column C holds dates and column F holds amounts. Explain the likely cause and give a corrected version.
  • Explain this formula one function at a time, as if to a new bookkeeper, then suggest a simpler version if one exists: [paste formula].
  • Convert this Excel formula so it works in Google Sheets, and tell me if any function behaves differently: [paste formula].

Paste the formula and the error text exactly. Screenshots lose detail, and a paraphrased error often leads to a wrong fix.

Invoice tracker layout with formulas

This layout follows the structure in our invoice tracker spreadsheet guide. Row 1 holds headers; formulas start in row 2 and are copied down. Tax rate is entered as a decimal (0.08 for 8%).

ColumnHeaderEntry or formula (row 2)
AInvoice numberTyped value, such as INV-0101
BClientTyped value or client code
CIssue dateTyped date
DTerms (days)Typed number, such as 30
EDue date=C2+D2
FNet amountTyped value
GTax rateTyped decimal, such as 0.08
HTax=ROUND(F2*G2,2)
IInvoice total=F2+H2
JAmount paidTyped value
KBalance=I2-J2
LStatus=IF(K2<=0,"Paid",IF(TODAY()>E2,"Overdue","Open"))
MDays overdue=IF(K2<=0,0,MAX(0,TODAY()-E2))
NAging bucket=IF(K2<=0,"Paid",IF(M2=0,"Current",IF(M2<=30,"1-30",IF(M2<=60,"31-60",IF(M2<=90,"61-90","90+")))))

If your terms are "end of month plus 30 days", replace the due date formula with =EOMONTH(C2,0)+30. If you keep client terms on a separate sheet called Clients (client in column A, terms in column B), you can look them up with =XLOOKUP(B2,Clients!A:A,Clients!B:B,30), which falls back to 30 days when the client is not found.

Summary formulas for reports

Once each row is calculated, a small summary area answers the questions you ask every week. SUMIFS adds values that meet several conditions; Microsoft's SUMIFS function reference explains the argument order if you need it.

QuestionFormula
Total unpaid for one client=SUMIFS(K:K,B:B,"CLIENT_A",K:K,">0")
Total in the 31 to 60 day bucket=SUMIFS(K:K,N:N,"31-60")
Number of overdue invoices=COUNTIFS(L:L,"Overdue")
Invoiced (net) in October 2026=SUMIFS(F:F,C:C,">="&DATE(2026,10,1),C:C,"<"&DATE(2026,11,1))
Tax charged in October 2026=SUMIFS(H:H,C:C,">="&DATE(2026,10,1),C:C,"<"&DATE(2026,11,1))
Share of receivables overdue=SUMIFS(K:K,L:L,"Overdue")/SUMIFS(K:K,K:K,">0")

Put the client code or bucket name in a cell and reference it instead of typing it into the formula, for example =SUMIFS(K:K,B:B,P2). That way one formula serves every client.

VAT and sales tax formulas

Tax formulas are where AI-written spreadsheets most often go wrong, because adding tax and extracting tax are different calculations.

  • Add tax to a net amount: =ROUND(F2*G2,2), then total =F2+H2
  • Extract tax from a gross (tax-inclusive) amount: =ROUND(I2*G2/(1+G2),2)
  • Net from gross: =I2-ROUND(I2*G2/(1+G2),2)
  • Round per line or per invoice: rules vary by country, so check local guidance and ask the model to follow your chosen method consistently

Never let a chatbot choose the rate. Look it up on your tax authority's website or check it with our sales tax calculator, then type it into column G. For what a compliant VAT invoice must show, see our VAT invoice guide.

Worked example: aging four invoices

Assume today is 27 October 2026 and the tracker holds four unpaid invoices (illustrative figures):

InvoiceDue dateBalanceDays overdueBucket
INV-010115 Oct 20261,200.0027 − 15 = 121-30
INV-010220 Sep 2026850.0010 (rest of Sep) + 27 = 3731-60
INV-01035 Nov 20262,400.000 (not yet due)Current
INV-010415 Jul 2026500.0016 + 31 + 30 + 27 = 10490+

Total receivables: 1,200 + 850 + 2,400 + 500 = 4,950.00. Overdue: 1,200 + 850 + 500 = 2,550.00. Share overdue: 2,550 ÷ 4,950 = 0.515, or about 51.5%. Your formulas should return exactly these numbers. If the share-overdue formula gives something different, check that the Status column reads "Overdue" for the three late invoices and "Open" for INV-0103.

Now a VAT check on INV-0101, assuming it was billed at a 20% rate and 1,200.00 is the gross amount: 1,200 × 0.20 ÷ 1.20 = 200.00 VAT and 1,000.00 net. That is the test case to give ChatGPT when you ask it to write or debug a VAT extraction formula. For how to read the result, our guide to the accounts receivable aging report explains what each bucket means for collections.

Built-in AI assistants in spreadsheets

You do not have to copy formulas from a separate chat window. At the time of writing, Microsoft offers Copilot in Excel and Google offers Gemini in Google Sheets, and both can suggest formulas or summarize data inside the workbook. Some AI vendors also offer their own spreadsheet add-ins, and the list changes quickly. Availability depends on your Microsoft 365 or Google Workspace plan, your region and your administrator's settings, so check your own account.

A separate chatbot and a built-in assistant each have trade-offs. Built-in tools can see your sheet structure, which removes the need to describe columns. A standalone chat is useful when you want to understand a formula step by step or design a layout before building it. Whichever you use, the testing rules are the same. If you are still choosing a general assistant, our ChatGPT vs Claude vs Gemini comparison explains how to test them on your own tasks, and our library of ChatGPT prompts for bookkeeping and finance includes reporting prompts that pair well with these formulas.

More finance formulas worth asking for

Beyond the invoice tracker, a few formulas cover most small business spreadsheet needs. Each one below is a good test of whether a chatbot has understood your layout, because you can check the answer with a calculator.

NeedExample formulaWhat it does
Late fee on overdue balance=IF(M2>30,ROUND(K2*0.015,2),0)Applies an illustrative 1.5% fee once an invoice is over 30 days late
Expense total by category and month=SUMIFS(C:C,B:B,"Software",A:A,">="&DATE(2026,10,1),A:A,"<"&DATE(2026,11,1))Totals one category in an expense log with dates in A, categories in B, amounts in C
Closing cash in a weekly forecast=B2+B10-B20Opening cash plus total receipts minus total payments
Next week's opening cash=B21Links each week to the previous week's closing cash
Average days to pay=AVERAGEIFS(P:P,L:L,"Paid")Averages a column P that holds payment date minus issue date for paid invoices
Gross margin=IF(B2=0,"",(B2-C2)/B2)Revenue in B, cost of sales in C; blank instead of a divide-by-zero error

The late fee row is only an example. Whether you can charge a late fee, and how much, depends on your contract and local law; our guide to late payment fees explains the common rules. When you ask ChatGPT for Excel formulas like these, include the exact cell references from your own sheet, because the row numbers above are placeholders.

Testing checklist for AI-written formulas

  • Test on at least three rows where you know the answer, including a zero and a blank
  • Check that dates are real dates (right-aligned by default) and not text
  • Confirm absolute and relative references ($A$1 vs A1) before copying down
  • Recalculate one total by hand or with a calculator
  • Check rounding matches how you print totals on the invoice
  • Protect formula cells so typing in new invoices does not overwrite them
  • Save a copy before running any macro or script the chatbot writes

Common mistakes when using ChatGPT for Excel

  • Not saying which program you use. A formula that works in Excel for Microsoft 365 may fail in older versions or behave differently in Google Sheets.
  • Ignoring regional separators. In many European locales, formulas use semicolons, such as =ROUND(F2*G2;2).
  • Multiplying gross by the VAT rate. At 20%, that overstates VAT on 1,200 by 40 (240 instead of 200).
  • Using ROW() for invoice numbers. Sorting renumbers issued invoices. Keep numbers as fixed values and follow a clear invoice numbering system, or create them with our invoice number generator.
  • Uploading the whole workbook. Remove client contact details, bank details and tax IDs before sharing a file with any AI tool.
  • Trusting a formula you do not understand. Ask for an explanation, and if it still makes no sense, ask for a simpler version.

From spreadsheet to invoice

A spreadsheet is good for tracking and reporting, but formatting a professional invoice in Excel takes time. Many people keep the tracker in a sheet and create the invoice document separately. Our free invoice generator builds a PDF in your browser and stores drafts in your browser's local storage; it has no AI features and does not send or track invoices, so log each one in your tracker after you send it. If you prefer to stay entirely in a spreadsheet, our Google Sheets invoice template guide shows a layout that works with the formulas above. With clear prompts and a short testing habit, ChatGPT for Excel turns a blank sheet into a reliable finance tool in an afternoon.

Frequently asked questions

Can ChatGPT write Excel formulas?

Yes, and it is one of its most reliable uses, because you can test the result immediately. Describe your columns by letter, give an example row and the result you expect, and ask for the formula plus a plain-English explanation. Then test it on a few rows where you already know the answer, including blanks and edge cases, before copying it down the whole sheet.

Do ChatGPT formulas work in Google Sheets?

Most do. SUMIFS, COUNTIFS, IF, ROUND, EOMONTH, TODAY and XLOOKUP work in both Excel and Google Sheets, but some functions, array behavior and date handling differ. Tell ChatGPT which program you use at the start of the prompt, and if a formula returns an error, paste the exact error message back and ask it to correct the formula for that program.

Why does my formula from ChatGPT show an error?

The most common causes are a different list separator (some regional settings use semicolons instead of commas), dates stored as text, numbers stored as text, references to the wrong column, and functions not available in your version. Check the cell format, confirm your separator, and give ChatGPT the error code such as #VALUE! or #NAME? so it can diagnose the problem.

Can ChatGPT analyze an Excel file I upload?

Depending on your plan and features, ChatGPT can often read uploaded spreadsheets and run analysis with built-in tools. That is useful for summaries and charts, but you should still verify key totals in the original file. Before uploading, remove columns with personal data, bank details or tax IDs that the analysis does not need, and check your plan's data settings.

Is Copilot in Excel better than ChatGPT for formulas?

They suit different workflows. Assistants built into a spreadsheet can see your workbook and act on it directly, while a separate chatbot needs you to describe or upload the data. Availability and features depend on your Microsoft 365 or Google Workspace plan at the time of writing. Try both on the same real task and judge accuracy, speed and how easily you can check the result.

What is the formula for days overdue on an invoice?

If the due date is in column E and the unpaid balance is in column K, use =IF(K2<=0,0,MAX(0,TODAY()-E2)). It returns zero for paid or not-yet-due invoices and the number of days late for the rest. Format the result as a number, not a date, or Excel may display it as a date in early 1900.

How do I calculate VAT from a gross amount in Excel?

Divide out the rate rather than multiplying the gross amount by it. With the gross total in I2 and the rate as a decimal in G2, the VAT portion is =ROUND(I2*G2/(1+G2),2) and the net is the gross minus that figure. At 20%, a gross amount of 1,200 contains 200 of VAT and 1,000 net. Multiplying 1,200 by 20% would wrongly give 240.

Should I generate invoice numbers with a formula?

Be careful. Formulas based on ROW() change when you sort, insert or delete rows, which can renumber invoices you have already sent. Type numbers as fixed values, or generate them in a consistent format and paste them as values. Each number should be unique and never reused, so keep a single log of issued numbers rather than recalculating them.

IC

Invoice Creator Editorial Team

Guides on invoicing, cash flow and small-business finance from Invoice Creator, operated by Next Software Development Company. Content is reviewed for accuracy against the fields our own invoice generator produces.

Try the invoice generator

Related reading