Account

What new tool do you want?

Office & Documents

Excel & Google Sheets Formula Generator

Build Excel and Google Sheets formulas without memorizing syntax — SUMIF, COUNTIF, XLOOKUP, IF, date differences, TEXTJOIN, UNIQUE and more. Pick a task, fill in your cells, copy the formula.

How to use

  1. 1Pick what you want to do.
  2. 2Enter your cell references and values.
  3. 3Copy the formula into your spreadsheet.

Frequently asked questions

Do these formulas work in Google Sheets?

Yes — all of them work in Google Sheets. XLOOKUP, TEXTJOIN, UNIQUE, TEXTBEFORE and TEXTAFTER need Excel 2021 or Microsoft 365 on the Excel side; choose the older-Excel option where offered.

What should I type as a condition?

A value (Paid), a number (100), a comparison in quotes-free form (>=100, <>0) or a cell reference (E1). The generator adds quotes where Excel needs them.

Why add $ signs to ranges?

$B$2:$B$50 stays fixed when you copy the formula down; without $ the range shifts row by row.

Why the generator decides for you whether to quote a value

Excel formulas need text criteria wrapped in quotes ("Paid") but numbers and cell references left bare (100, E1) — mixing this up is one of the most common reasons a formula a beginner types by hand throws a #VALUE! or just silently returns zero. The crit() and val() helper functions here detect automatically whether what you typed looks like a number, a cell reference (matching a pattern like B2 or $B$2), or plain text, and quote only the plain text — so typing 'Paid' as a condition produces "Paid" in the formula, while typing 'E1' produces the bare reference E1, with no extra thought required from you.

Worked example: Excel & Google Sheets Formula Generator

Choosing SUMIF with range A2:A100, criteria 'Paid', and range2 C2:C100 generates =SUMIF(A2:A100, "Paid", C2:C100) — adding every value in C2:C100 where the matching row in A2:A100 reads exactly 'Paid'. Switch the task to the lookup formula with 'Older Excel' selected, cell F2, range A:A and range2 D:D, and the generator produces =IFERROR(INDEX(D:D, MATCH(F2, A:A, 0)), "Not found") instead of XLOOKUP — automatically substituting the INDEX/MATCH pattern that works in every Excel version, including ones without native XLOOKUP support.

Why the 'older Excel' option exists at all

XLOOKUP, TEXTJOIN, UNIQUE, TEXTBEFORE and TEXTAFTER are genuinely newer functions — they work in Excel 2021, Microsoft 365, and Google Sheets, but simply don't exist in Excel 2019 or earlier, where typing them produces a #NAME? error rather than a result. The generator's fallback formulas (INDEX/MATCH instead of XLOOKUP, MID/FIND instead of TEXTAFTER) aren't just alternate styles — they're the only way to get the same result in a spreadsheet that predates the newer function, which is why picking the wrong 'spreadsheet' option for your actual Excel version produces a formula you can copy in but can't actually run.

Why the $ sign reminder in the FAQ matters more than it looks

A formula built with A2:A100 works perfectly in the cell you build it for, but dragging it down to fill adjacent rows shifts every unlocked reference — A2:A100 becomes A3:A101, A4:A102, and so on — which silently breaks a lookup or SUMIF range as soon as it's copied anywhere else. Locking the range with dollar signs ($A$2:$A$100) before filling down keeps it anchored, which is why the rank formula's explanation specifically flags adding $ signs — copying a RANK formula down a column without locking the range is one of the most common ways people get wrong rankings without realizing why.

Related tools

More: Office & Documents