Excel formula generator

To sum a column the formula is =SUM(A2:A1000). To count how often a value appears it is =COUNTIF(A2:A1000,"value").

Describe what you need below and get the exact formula for Excel or Google Sheets. Twenty common patterns, built in your browser, no account and no waiting.

Sum a column
=SUM(A2:A1000)

Change the last row to match your data.

Sum with a condition
=SUMIF(B2:B1000,"criteria",A2:A1000)

Column with the condition, then the column to sum.

Count rows
=COUNTA(A2:A1000)

Counts non-empty cells.

Count with a condition
=COUNTIF(A2:A1000,"criteria")

Use * for wildcards: "*text*".

Look up a value from another table
=VLOOKUP(A2,A2:B1000,2,FALSE)

Exact match only. FALSE is not optional.

XLOOKUP (newer Excel)
=XLOOKUP(A2,A2:A1000,B2:B1000,"not found")

Microsoft 365 and Excel 2021+ only.

The words in a formula

Formula
A cell entry starting with = that computes a value instead of storing text.
Range
A block of cells written as A2:A1000. Most formulas take one or two ranges.
Criteria
The condition a formula tests. Text goes in quotes: "Dubai". Wildcards work: "*text*".
Absolute reference
A1 is relative and moves when you drag. $A$1 is fixed. Use $ when a formula must always point at the same cell.
Array formula
A formula that returns many values at once, like UNIQUE or TEXTSPLIT. Older Excel needs Ctrl+Shift+Enter.

Questions

What is the formula to sum a column in Excel?

=SUM(A2:A1000). Change A to your column and 1000 to your last row. SUM ignores text and empty cells.

How do I count how many times a value appears?

=COUNTIF(A2:A1000,"value"). For partial matches use wildcards: =COUNTIF(A2:A1000,"*text*").

Why does VLOOKUP return #N/A?

Three usual causes: the lookup value has trailing spaces (wrap it in TRIM), the fourth argument is missing (it must be FALSE for an exact match), or the column index counts from the start of the range rather than the sheet.

Do these formulas work in Google Sheets?

Almost all of them. XLOOKUP, TEXTSPLIT and UNIQUE are newer functions: they work in current Sheets and Microsoft 365, but not in Excel 2016.

Is this really free?

Yes. The formulas are generated in your browser from a pattern library, so there is no server call and nothing to sign up for.

Need a formula for something unusual?

The patterns above cover the common cases. For a formula built around your actual sheet, describe it to our AI endpoint — it takes the columns and returns the formula with an explanation.