To use ChatGPT for Excel formulas, tell it five things: your software and version (for example “Excel 2019” or “Microsoft 365”), the sheet layout (which column holds what and where data starts), the result you want with one expected answer, the awkward cases (blanks, half days, “AB”), and a request to explain the formula simply. Then test the formula on rows you can check by hand before copying it down. AI tools write and explain formulas well, but they can also give formulas that look right and are wrong, and they should never see your real salary or customer data.
| Point | Position |
|---|---|
| Good uses | Writing formulas from plain language, explaining long formulas, diagnosing errors, suggesting layouts |
| Bad use | Asking the chat tool to calculate totals from pasted data |
| Always state | Excel version or Google Sheets; XLOOKUP, IFS, FILTER and TEXTSPLIT are not in every version |
| Data rule | Describe columns or paste made-up dummy rows; never real personal or client data in an unapproved tool |
| Built-in assistants | Copilot in Excel and Gemini in Google Sheets need eligible paid plans |
| Check routine | Read it, test 3 to 5 known rows, check the last copied row, cross-check the total another way |
How to use ChatGPT for Excel formulas: a prompt that works
Compare two prompts.
Weak: “Formula for attendance.”
Strong: “I use Excel 2019. Sheet ‘Attendance’ has employee IDs in A5:A60 and daily codes for October 2026 in C5:AG60. Codes: P present, A absent, HD half day, CL, SL, EL leave, H holiday, WO weekly off. In AH5 I want days present, counting HD as half a day. For a row with 20 P and 2 HD the answer should be 21. Give one formula I can copy down and explain each part.”
A correct answer is =COUNTIF(C5:AG5,"P")+0.5*COUNTIF(C5:AG5,"HD"). The expected answer you gave (21) lets you confirm it in seconds.
More prompts worth saving:
- Lookup: “Excel 2016. Product codes in Products!A2:A200, rates in D2:D200. Fetch the rate for the code in A2, show ‘Not found’ if missing, and do not use XLOOKUP.” Expected: an INDEX with MATCH or VLOOKUP with FALSE, wrapped in IFNA.
- Conditional total: “Microsoft 365. Column B city, C month, D amount, headers in row 1. Total for Lucknow in October.” Expected:
=SUMIFS(D:D,B:B,"Lucknow",C:C,"October"). - Explain a formula: paste only the formula: “Explain step by step for a beginner:
=IFNA(INDEX(Rates!$D$2:$D$200,MATCH(A2,Rates!$A$2:$A$200,0)),"Not found").” - Fix an error: “This VLOOKUP returns #N/A for some rows though the codes look identical. The codes were pasted from a PDF.” A good answer suggests hidden spaces or numbers stored as text and proposes TRIM or VALUE.
Common AI formula mistakes to catch
- Wrong version: XLOOKUP, IFS, FILTER or TEXTSPLIT given to someone on an older Excel, which shows
#NAME?. - Argument order: SUMIF and SUMIFS mixed up (SUMIF puts the sum range last, SUMIFS first).
- Missing exact match: VLOOKUP without FALSE, or MATCH without 0, which can return plausible but wrong values.
- No $ signs where the formula will be copied, so ranges drift.
- Invented functions or options that do not exist.
- Made-up arithmetic: asking “what is the total of these rows?” invites wrong numbers. Let Excel calculate; let AI write the formula.
Example: Pooja, an accounts assistant in Surat, got =D2*C2/2 for CGST with no rounding and an unlocked rate cell. Her test rows showed the error in row 3. She asked again with “copy down, rate is per row in column C, round to 2 decimals” and got =ROUND(D2*C2/2,2), which passed her checks.
Learn this properly, with a certificate. Lesson 5.1 of the Excel and AI course teaches prompting AI assistants for formulas and a full checking routine, and Modules 2 to 4 give you enough formula knowledge to recognise a good answer. Excel and AI for Office Work, ₹299: self-paced lessons, module quizzes and a 30-question final test; pass at 60% for a verifiable Lexfolio certificate. For safe AI use beyond spreadsheets, see AI at Work, ₹299.
Copilot in Excel and Gemini in Google Sheets
Copilot in Excel is a pane inside Excel that can suggest formula columns, highlight data and summarise. Microsoft says it needs an eligible plan, such as certain Microsoft 365 personal plans with AI credits or a business Copilot licence, and it edits only when calculation is set to Automatic. A separate preview worksheet function, =COPILOT, was withdrawn in September 2026; old workbooks that used it show #NAME? when recalculated.
Gemini in Google Sheets offers a side panel and an AI function for eligible Google Workspace or Google AI plans. Google itself warns that output may be inaccurate.
Plans and features change often. Check what your organisation has approved before using any assistant on work files, and follow your employer’s AI policy even inside an approved tool.
The checking routine: every formula, every time
- Read it. Identify each function and argument. Look up anything unfamiliar on Microsoft’s or Google’s help page.
- Test known rows. Pick 3 to 5 rows you can work out by hand, including an awkward one: a blank, a zero, a half day, a missing code.
- Check after copying. Open the formula in the last row: did the ranges shift correctly?
- Cross-check the total another way: a pivot table, a SUMIFS or a filtered SUBTOTAL.
- Check versions for everyone who will open the file.
- Leave a note (Review, New Comment) saying what the formula does and when you checked it.
And the data rule: never paste salary sheets, Aadhaar or PAN numbers, bank details, student marks with names or customer lists into an AI tool your organisation has not approved for that data. Describe the columns, or paste five made-up rows with the same structure.
Frequently asked questions
Can I use ChatGPT for Excel formulas?
Yes. ChatGPT and similar tools are good at writing and explaining Excel and Google Sheets formulas if you state your version, describe the layout and give an expected answer. Always test the formula on rows you can verify before relying on it.
Is Copilot in Excel free?
No. Microsoft makes Copilot in Excel available with eligible paid plans, and the eligible plans change from time to time. Check Microsoft’s current plan page or your organisation’s IT team.
Why does the formula from ChatGPT show #NAME?
Usually the formula uses a function your Excel version does not have, such as XLOOKUP or IFS in Excel 2016, or the function name is misspelt. Tell the tool your exact version and ask for an alternative using INDEX and MATCH or nested IF.
Is it safe to upload my Excel file to ChatGPT?
Not if it contains personal, salary, customer or confidential data, unless your employer has approved that tool for such data. Uploaded files include hidden sheets and comments too. Describe the structure or use dummy rows instead.
Quick quiz
Q1. Which detail most often prevents an AI tool from giving you an unusable formula?
- Your name
- Your Excel version
- Your city
- The file name
Show answer
Answer: B. Newer functions such as XLOOKUP show #NAME? in older versions.
Q2. You need the total of 3,000 sales rows. What is the right use of AI?
- Paste the rows and ask the chat tool for the total
- Ask for the formula and let Excel calculate
- Ask for an estimate
- Upload the file to a personal account
Show answer
Answer: B. Chat tools can miscalculate or invent numbers; Excel calculates reliably.
Q3. An AI gives =VLOOKUP(A2,Rates!A2:D200,4). What is the main risk?
- It looks left
- No exact-match argument and an unlocked range
- It needs Microsoft 365
- It cannot return numbers
Show answer
Answer: B. Without FALSE it uses approximate match, and without $ the range shifts when copied.
Sources
- Microsoft Support: Get started with Copilot in Excel (eligible plans and requirements)
- Microsoft 365 Message Center, MC1454373: retirement of the =COPILOT function in Excel
- Google Workspace Help: Gemini in Google Sheets
- Microsoft Support: COUNTIF, SUMIFS, VLOOKUP, INDEX and MATCH functions
Learn formulas well enough to check any AI answer: Excel and AI for Office Work certificate course.
This page is for education and general information, not legal advice for a specific case. Law as on 29 October 2026.
Useful books for this topic
- Bare acts of the new criminal laws (BNS, BNSS, BSA)
- Code of Civil Procedure bare act
- Legal drafting and conveyancing books
- Constitution of India (coat pocket edition)
As an Amazon Associate, Lexfolio earns from qualifying purchases. Prices and availability are shown on Amazon.
Leave a Reply