> ## Content Index
> Fetch the complete content index at: https://chale.tech/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to use AI to write Excel formulas (with examples you can copy)
- URL: https://chale.tech/ai-excel-formulas/
- Published: 2026-11-17T10:00:00.000Z
- Updated: 2026-11-17T10:00:00.000Z
- Description: Describe what you want and let ChatGPT, Gemini or Copilot write the Excel formula: totals, grades, lookups and dates, with prompts and checks so the results are right.
- Author: Isaac Nana Yaw Annor
- Tags: How-To, AI & online work

You don’t need to memorise Excel functions. Describe what you want in plain English, and an AI chatbot will write the formula. The trick is describing your sheet clearly.

## How to ask

Tell the AI: which columns hold what, which row data starts on, your Excel version, and the result you want.

*“In Excel 365, column B has student names from B2, column C has exam scores out of 100\. In column D, give the WASSCE-style grade: 75+ A1, 70–74 B2, 65–69 B3, 60–64 C4, 55–59 C5, 50–54 C6, 45–49 D7, 40–44 E8, below 40 F9.”*

## Example formulas

| Task                                   | Formula                           |
| -------------------------------------- | --------------------------------- |
| Total sales in C2:C100                 | \=SUM(C2:C100)                    |
| Sales above GH₵1,000 count             | \=COUNTIF(C2:C100,">1000")        |
| Total for one product (A) “Rice”       | \=SUMIF(A2:A100,"Rice",C2:C100)   |
| Find price of item in E2 from list A:B | \=XLOOKUP(E2,A:A,B:B,"Not found") |
| Days until due date in B2              | \=B2-TODAY()                      |
| Pass/Fail at 50                        | \=IF(C2>=50,"Pass","Fail")        |

## Check every formula

1. Test on a few rows where you know the answer.
2. Ask the AI to *“explain this formula step by step”*.
3. If you get #NAME? or #VALUE!, paste the error back to the AI.
4. If your Excel uses **;** instead of **,** (regional settings), tell the AI.

## Built-in AI

- **Copilot in Excel** (Microsoft 365 plans that include it).
- **Gemini in Google Sheets** (eligible Google Workspace/Google One plans).

Don’t paste customer phone numbers, salaries or Ghana Card numbers into public AI tools. Describe the columns instead.

## Related guides

- [ChatGPT vs Gemini](https://chale.tech/chatgpt-vs-gemini/)
- [Best expense-tracking apps](https://chale.tech/best-expense-tracking-apps/)

*Checked on 10 November 2026\. AI tools and app menus change often.*

## Common questions

### Can ChatGPT write Excel formulas?

Yes. Describe your columns and what you want, and it writes the formula and explains it.

### Does Excel have built-in AI?

Microsoft 365 Copilot in Excel and Gemini in Google Sheets (on eligible plans) can suggest formulas and analyse data.

### Why does the AI formula give an error?

Usually wrong cell references, a different Excel version, or regional settings using ; instead of ,. Tell the AI the error message.

### Is it safe to paste my spreadsheet into AI?

Remove names, phone numbers and other personal data first, or describe the columns instead.

## Sources

- [Microsoft Support: XLOOKUP function](https://support.microsoft.com/en-us/office/xlookup-function-b7fd680e-6d10-43e6-84f9-88eae8bf5929?ref=chale.tech)
- [Microsoft Support: Get started with Copilot in Excel](https://support.microsoft.com/en-us/office/get-started-with-copilot-in-excel-d7110502-0334-4b4f-a175-a73abdfc118a?ref=chale.tech)
- [Google Workspace: Gemini in Google Sheets](https://support.google.com/docs/answer/14218565?ref=chale.tech)