Create a formula by using a function

You can create formulas that calculate values in your worksheet by using built-in Excel functions. For example, the formulas =SUM(A1:A2) and =SUM(A1,A2) both use the SUM function to add the values in cells A1 and A2. Formulas always start with an equal sign (=).

  1. Select the cell where you want to enter the formula.

  2. To start a formula, select the formula bar or begin typing in the cell.

    Tip

    As you type a function name after the equal sign (=), Excel displays matching functions and argument hints to help you build the formula. This feature is called Formula AutoComplete.

  3. After you complete the arguments for the formula, press Enter to see the formula result in the cell.

Examples

Use the data in the following table to work with examples of formulas that use a function. You can see and change formulas, and enter your own formulas.

Copy the following table into a blank worksheet starting in cell A1 to try these examples.

Data    
5 4
2 6
3 8
7 1
Formula Description Result
=SUM(A:A) Adds all numbers in column A =SUM(A:A)
=AVERAGE(A1:B4) Averages all numbers in the range A1:B4 =AVERAGE(A1:B4)

Note

Excel includes hundreds of built-in functions. For more information, see Excel functions (alphabetical) or Excel functions (by category).