English

Guides

How to write Excel formulas with ChatGPT

Write an Excel formula with ChatGPT using four sample orders. Copy a beginner-friendly prompt, try SUMIF and check that only paid orders count.

4 December 2026 · 3 min read

FREE · 5 SHORT LESSONS

Less theory. More “aha!”

Get to know ChatGPT through everyday tasks. Start with one small win.

Start the free course

You have a list of orders in Excel. Some are paid, some are pending, and you want a total for the paid ones. Four rows are easy to add by hand. Forty are where a formula earns its keep.

Here’s how to use ChatGPT to write the formula and check it yourself. All you need for the exercise is a text chat and a blank Excel sheet.

1. Make a tiny practice sheet

Enter these made-up orders in a blank sheet, starting in A1. Put the status in column A and the amount in column B. Enter the amounts as numbers.

Status Amount
Paid 18
Pending 25
Paid 12
Pending 40

Before you open ChatGPT, work out the total yourself. Only the first and third orders are paid, so the answer should be 30.

2. Ask ChatGPT for one Excel formula

Open ChatGPT and copy the prompt below. When you adapt it to your own sheet, give ChatGPT the column letters, the row numbers and the exact status text. Use made-up rows and leave out customer details. See our guide to personal data and AI for examples of what to keep out of a prompt.

Help me write one Excel formula. Cells A2:A5 contain the order statuses Paid, Pending, Paid, Pending. Cells B2:B5 contain the corresponding amounts 18, 25, 12 and 40. Add only the amounts whose status is Paid. Give me a formula I can paste into D2. Explain what each part does. If the formula uses an argument separator, show both the comma and semicolon versions.

3. Paste the SUMIF formula and check the total

One formula for this exercise is =SUMIF(A2:A5,"Paid",B2:B5). Paste it into D2 and press Enter. SUMIF looks for Paid in A2:A5 and adds the amounts on those rows from B2:B5.

If Excel rejects the formula, check whether your setup uses semicolons between arguments. In that case, enter =SUMIF(A2:A5;"Paid";B2:B5). Keep the quotation marks around Paid in both versions.

Check that D2 shows 30. Then change the status in A3 from Pending to Paid. The total should rise to 55 because it now includes 25. Change the status back and the total should return to 30. This second check shows whether the formula follows the status when it changes.

4. Adapt the formula to your own sheet

Give ChatGPT the ranges from your real sheet or replace them yourself. If you extend this example to row 50, extend both ranges to row 50. A formula ending at row 5 will miss new orders below it. Check the result against a few rows you can add by hand, and see our guide to checking AI answers for more ways to verify a result.

If you’re new to prompting, practise with the free AI course.

Sources

Checked on 4 December 2026. Microsoft documents the SUMIF function and how argument separators affect formula entry. OpenAI’s prompt guidance explains how to ask with clear, specific context.

AI worth knowing about

Important AI news, practical tips and new lessons. In English, straight to WhatsApp.