All articles
ProductivitySep 4, 2026 · 5 min read

How to Write Excel Formulas (Common Examples)

Every Excel formula starts with =, then a function and its arguments in brackets. Master a handful of functions and you can handle most spreadsheet tasks. Here are the essentials with examples — and a tool that writes any formula for you from plain English.

Skip the syntax — describe it instead

Not sure which function to use? Describe what you want in the AI Excel Formula Generator— e.g. “sum column B where column A is ‘Paid’” — and get the correct Excel or Google Sheets formula with a short explanation.

The essential functions

  • SUM — add a range: =SUM(B2:B10)
  • AVERAGE — the mean of a range: =AVERAGE(B2:B10)
  • IF — a condition: =IF(B2>100,"High","Low")
  • SUMIF / COUNTIF — conditional totals: =SUMIF(A2:A10,"Paid",B2:B10)
  • VLOOKUP / XLOOKUP — find a value in a table: =XLOOKUP("Alex",A2:A10,B2:B10)
  • CONCAT / TEXTJOIN — combine text: =TEXTJOIN(" ",TRUE,A2,B2)

A worked example

Say column A is a status and column B is an amount. To total only the “Paid” rows:

=SUMIF(A2:A100,"Paid",B2:B100)

SUMIF checks each cell in A2:A100; wherever it equals “Paid”, it adds the matching cell from B2:B100.

Tips for fewer errors

  • Lock references with $ (e.g. $B$2) so they don't shift when you copy the formula.
  • Wrap in IFERROR to hide errors: =IFERROR(formula,"").
  • Prefer XLOOKUP over VLOOKUP where available — it's simpler and safer.
  • Check your ranges — mismatched range sizes are the most common cause of wrong results.

Related tools

Working with data files too? Convert CSV to Excel or Excel to CSV, and for databases try the AI SQL Generator.

FAQ

Do these formulas work in Google Sheets?

Most do — the core functions are shared. In the generator, choose Google Sheets to get Sheets-specific syntax.

How do I write a formula if I don't know the function?

Describe the result you want in the AI Excel Formula Generator and it picks the right function for you.

Is the tool free?

You get a set number of free AI runs each day; go Pro for unlimited use.