Every Excel formula starts with an equal sign (=), followed by values, cell references, and operators, and pressing Enter calculates the result immediately. This works identically in Excel for Microsoft 365, Excel 2024, 2021, 2019, and Excel for the web, with a per-formula limit of 8,192 characters. The rules below cover simple math, built-in functions, and cell references you can copy across columns.
Formula Syntax, Operators, and Error Cheat Sheet
The reference table below maps what you type to what Excel does, so you can diagnose a broken formula before rebuilding it.
| Task | Syntax example | Result or behavior |
|---|---|---|
| Add constants | =1+1 |
Returns 2 |
| Add cell values | =A1+A2 |
Sum of two referenced cells |
| Order of operations | =5+2*3 |
Returns 11 (multiplication first) |
| Force order | =(5+2)*3 |
Returns 21 (parentheses first) |
| Reference a range | =SUM(A1:A100) |
Totals the whole column segment |
| Average a range | =AVERAGE(B1:B10) |
Mean of populated cells |
| Round a value | =ROUND(A10,2) |
Rounds cell A10 to two decimals |
| Look up one function | Shift + F3 |
Opens the Insert Function dialog |
Excel evaluates operators in PEMDAS order—parentheses, exponents, multiplication and division, then addition and subtraction—so wrapping a section in parentheses is the fastest fix when a result looks close but wrong.
Enter a Formula Step by Step
- Select the cell where the result should appear, for example
D2. - Type
=(the equal sign is mandatory; without it Excel treats the entry as text). - Type the constants and operators, or click the cells you want to include and type operators between them.
- Finish with the function's closing parenthesis if you used a function, such as
=SUM(A1:A10). - Press
Enter; the calculated result appears in the cell and the formula shows in the formula bar. - To reuse it, drag the fill handle or copy the cell and paste into adjacent rows—relative references adjust automatically.
If the cell shows the formula text instead of a result, the cell is likely formatted as Text. Change the format to General and re-enter the formula by pressing F2 then Enter.
Worked Example 1: Simple Arithmetic and Cell References
With A1 = 120 and A2 = 45, typing =A1+A2 in A3 returns 265. Typing =A1-A2 returns 75, =A1*A2 returns 5400, and =A1/A2 returns about 2.67. The same formulas work with literal constants: =5+2*3 returns 11 because multiplication is evaluated before addition.
To enrich a column of totals, place =SUM(B2:B11) in B12 and press Enter—the AutoSum button on the Home tab produces the same result without typing the range. When the underlying numbers in B2:B11 change, B12 recalculates on the next edit, which is the core advantage of referencing cells instead of typing values.
Worked Example 2: Built-In Functions and Nested Arguments
Functions are predefined formulas with a fixed argument order. The ROUND function demonstrates the structure: start with =, type the function name, open a parenthesis, separate arguments with commas, and close the parenthesis. With A10 = 47.628, =ROUND(A10,2) returns 47.63 and =ROUND(A10,0) returns 48.
Nesting lets one function feed another. With A1 = 10, B1 = 20, and C1 = 30, the formula below averages the three values, adds a 10% buffer, and rounds the final result to one decimal place:
=ROUND(AVERAGE(A1:C1)*1.1,1)
AVERAGE(A1:C1) returns 20, multiplying by 1.1 gives 22, and ROUND(...,1) leaves 22 at one decimal place. If you need to see what any nested piece is doing, select just that portion in the formula bar and press F9 to preview the intermediate value—press Esc to restore the original text before saving.
Worked Example 3: Copying Formulas Across Many Rows
With headers in row 1 and a small price list in A2:A4 (10, 25, 40) and quantities in B2:B4 (3, 2, 5), enter =A2*B2 in C2. Copy that cell and paste into C3 and C4. Excel adjusts the row number in each copy, so C3 becomes =A3*B3 and returns 50, while C4 becomes =A4*B4 and returns 200.
To total the extended column, place =SUM(C2:C4) in C5 and the result is 250. If a copied formula locks to one source cell that shouldn't move—such as a tax rate in F1—write the reference as =$F$1 (absolute) and only the part without the dollar signs will shift when copied. Pressing Ctrl + Shift + Enter is not required in current versions because dynamic arrays spill automatically; typed ranges like C2:C4 continue to work in Excel 2019 and earlier.
Formula Errors and Verified Fixes
Each error code below points to a specific cause and the fix that resolves it without rebuilding the whole sheet.
| Error code or message | Typical cause | Verified fix |
|---|---|---|
#VALUE! |
Text used where a number is required | Change the cell to a number, or wrap the reference in VALUE(); remove stray spaces with TRIM() |
#NAME? |
Function name misspelled or missing quotes around text | Correct the spelling, use Shift + F3 to insert a function from the dialog, and wrap text arguments in double quotes |
#DIV/0! |
Denominator is zero or points to a blank cell | Wrap with =IFERROR(A1/B1,0) or confirm the reference is populated |
#REF! |
Previously referenced cell, row, or column was deleted | Undo the deletion immediately with Ctrl + Z, or restore the reference by re-selecting the source range |
#N/A |
Lookup value not found in the searched range | Confirm exact spelling and value type; combine with IFNA to display a friendly message |
#SPILL! |
A dynamic array formula's result would overlap existing content | Clear the blocking cells in the spill range, or reference a reserved area of the sheet |
##### |
Column too narrow to display the result | Widen the column by double-clicking its right edge in the header |
| Text shown, not result | Cell formatted as Text before entry | Set format to General, press F2, then Enter |
A looping reference or a manual calculation setting produces an answer that never updates; check Formulas > Calculation Options and switch to Automatic if editing is disabled. Circular references surface a warning on the Status bar—if the message persists, break the loop by moving the dependent formula to a different cell.
Functions and Helpers You Should Know
The Ribbon's Formulas tab groups every built-in function by category, and the Insert Function dialog (Shift + F3) provides search and argument prompts, which is the fastest way to confirm argument order for unfamiliar functions like XLOOKUP, SUMIFS, or TEXTJOIN. For a concise reference of operators, function syntax, and the calculation-order rules, the official overview of formulas in Excel documents each category; the simple formula walkthrough is the shortest path for beginners confirming the equals sign, operators, and Enter behavior.
Operators fall into four families: arithmetic (+, -, *, /, ^), comparison (=, >, <, >=, <=, <>), text concatenation (&), and reference (: for ranges, , for union, space for intersection). Mixing them is fine as long as parentheses disambiguate intent—=IF(A1>100,"Over","OK") reads clearly because the comparison sits inside its own parentheses.
Frequently Asked Questions
Why does a formula I copied return the wrong row?
Relative references shift with copy direction, so a reference to A1 becomes A2 when copied down one row and B1 when copied one column right. Convert the parts that must stay fixed to absolute references with $ (=$A$1 locks both row and column, =$A1 locks only the column, =A$1 locks only the row) before copying.
Can I use a formula on a different worksheet?
Yes. Reference another sheet by prefixing the sheet name with an exclamation mark, for example =Sheet2!A1 or =SUM('Quarter 1'!B2:B20). Wrap sheet names containing spaces in single quotes, as shown in the second example.
Why does pressing Enter not calculate my formula?
The cell is most likely formatted as Text (fix by switching to General and re-entering with F2 then Enter) or Show Formulas is enabled in Formulas. Toggle it off with `Ctrl + `` (the backtick key to the left of the number 1 on most layouts).
What's the difference between a formula and a function?
A formula is any equation you build yourself starting with =; a function is a predefined formula with a reserved name and argument slots, such as SUM, AVERAGE, or ROUND. You can mix both—=SUM(A1:A5)*2 uses a function inside a custom formula.