How to Use a Formula in Excel

Last updated on November 9th, 2026 at 01:25 pm

To use a formula in Excel, select the cell where you want the result, type an equal sign (=), enter the calculation, such as =A1+B1, and press Enter. Excel shows the result in the cell. Below are the basic steps, the parts of a formula, ten useful functions and fixes for common errors.

How to Use a Formula in Excel

Step 1: Open Excel and Select a Cell

Select the cell where you want the result of your formula to appear.

When you open Excel, you’ll see a grid of cells. Pick any cell to start with. This will be the cell where your result will be displayed.

Step 2: Begin with an Equal Sign

Type an equal sign (=) into the selected cell.

The equal sign tells Excel that what follows is a formula. This is the first step in creating any calculation or function.

Step 3: Enter the Formula

Type the formula you need. For example, if you want to add two numbers, type =A1+B1.

Formulas can be simple or complex. For basic arithmetic, you can use the plus (+), minus (-), multiply (*), or divide (/) symbols. The cell references (like A1 and B1) are where Excel gets the numbers from.

Step 4: Press Enter

Hit the Enter key to complete the formula.

When you press Enter, Excel calculates the formula and displays the result in the cell you selected in Step 1. If there’s an error, Excel will let you know. A formula that refers to its own cell causes a circular reference; for intentional ones, turn on iterative calculation.

Step 5: Copy the Formula

Drag the fill handle (a small square at the bottom-right corner of the cell) to copy the formula to adjacent cells.

Dragging the fill handle lets you apply the same formula to other cells, automatically adjusting the cell references. This is super handy for calculating totals and averages for large datasets.

How do I reference cells from another sheet?

Use the sheet name followed by an exclamation mark and the cell reference, like =Sheet2!A1.

Why does my formula show a green triangle in the corner?

That is an error-checking flag. It may mean the formula is inconsistent with nearby formulas or that a number is stored as text. Click the cell and the warning icon to see the reason and suggested fixes.

Related: using absolute cell references and creating a multiplication formula in Excel.

The Parts of an Excel Formula

Every formula starts with an equal sign and can contain four kinds of building blocks, each explained further in Microsoft’s overview of formulas in Excel:

  • Constants: numbers or text typed directly into the formula, such as 10 or "Paid".
  • Cell references: addresses like A2 or ranges like A2:A10 that point to values elsewhere in the sheet. When those values change, the formula recalculates automatically.
  • Operators: symbols that tell Excel what to do, such as + (add), – (subtract), * (multiply), / (divide), ^ (power) and & (join text).
  • Functions: built-in formulas such as SUM or IF that take arguments inside parentheses.

Order of operations

Excel calculates in a fixed order: parentheses first, then exponents, then multiplication and division, then addition and subtraction, working left to right. That means =2+3*4 returns 14, not 20. Add parentheses to control the order, for example =(2+3)*4 returns 20.

How to Enter a Function Without Typing It

If you do not remember a function’s name or arguments, Excel can build it for you:

  • AutoSum: select the cell below a column of numbers and press Alt + =, or click Home > AutoSum. Excel guesses the range; press Enter to accept it. The arrow next to AutoSum also offers Average, Count, Max and Min.
  • Insert Function: click the fx button next to the formula bar, search for what you want to do, and fill in each argument in the dialog box.
  • Formula AutoComplete: start typing, for example =VL, and Excel lists matching functions. Press Tab to accept one, then follow the tooltip that shows the arguments.

Ten Formulas Every Beginner Should Know

These cover most everyday spreadsheet tasks. Each example assumes data in rows 2 to 10.

  1. SUM adds a range: =SUM(B2:B10). There are other ways to add numbers in Excel too.
  2. AVERAGE returns the mean: =AVERAGE(B2:B10).
  3. MIN and MAX find the smallest and largest values: =MAX(B2:B10).
  4. COUNT and COUNTA count cells with numbers, or any non-empty cells: =COUNTA(A2:A10).
  5. ROUND rounds to a set number of decimal places: =ROUND(B2,2).
  6. IF returns one result if a test is true and another if it is false: =IF(B2>=50,"Pass","Fail").
  7. SUMIF adds only values that meet a condition: =SUMIF(A2:A10,"East",B2:B10). More examples are in using the SUMIF function.
  8. COUNTIF counts cells that meet a condition: =COUNTIF(A2:A10,"East"). Our guide on how to use COUNTIF in Excel covers wildcards, dates and more.
  9. XLOOKUP finds a value in one column and returns the matching value from another: =XLOOKUP(E2,A2:A10,B2:B10). It is available in Microsoft 365 and Excel 2021 or later, and doing an XLOOKUP in Excel explains its arguments.
  10. Text joining with the & operator or CONCAT: =A2&" "&B2. Other options are in concatenating in Excel.

Relative and Absolute Cell References

One of the most important formula concepts is what happens when you copy a formula. A reference such as A1 is relative and normally changes when copied to another cell. A reference such as $A$1 is absolute and stays fixed. Mixed references such as $A1 or A$1 lock only the column or row. Understanding these references prevents many spreadsheet calculation errors. To put this into practice, learn how to keep one cell constant when every row should use the same input.

Check Formulas Before Copying Them

After filling a formula down or across a range, inspect a few results and formula references. Excel can calculate exactly what you entered even when the reference is not the one you intended.

How to Edit, View and Check Formulas

  • Click a cell and edit its formula in the formula bar, or press F2 to edit directly in the cell. Press Esc to cancel changes.
  • Press Ctrl + ` (the grave accent key, usually left of 1) to show every formula on the sheet instead of its result. Press it again to switch back.
  • Use Formulas > Trace Precedents to draw arrows to the cells a formula uses, which helps you spot wrong references.
  • Use Formulas > Evaluate Formula to step through a complex formula one calculation at a time.

Troubleshooting Common Formula Errors

#DIV/0!

The formula divides by zero or by an empty cell. Check the divisor, or wrap the formula in IFERROR, for example =IFERROR(A2/B2,0).

#NAME?

Excel does not recognize something in the formula, usually a misspelled function name, text without quotation marks, or a function your version does not support. A common example is the label in a HYPERLINK formula that shows your own link text, which must be wrapped in straight quotation marks.

#VALUE!

The formula is trying to do math with text, such as a number stored as text or a stray space. Check the referenced cells and convert text to numbers if needed.

#REF!

A cell the formula referred to has been deleted. Press Ctrl + Z to undo the deletion, or edit the formula to point to the correct cells.

#N/A

A lookup function could not find the value. Check for spelling differences or extra spaces in the lookup value and the lookup range.

The formula shows as text instead of a result

The cell is formatted as Text or the formula is missing its leading equal sign. Change the format to General, then click in the cell and press Enter.

Results do not update

Calculation may be set to manual. Go to Formulas > Calculation Options and choose Automatic, or press F9 to recalculate now.

Tips for Using Formulas in Excel

  1. Take advantage of Excel’s built-in functions like SUM, AVERAGE, and VLOOKUP.
  2. Double-check your cell references to ensure accuracy.
  3. Use the Formula tab to explore more complex functions and tools.