Use Excel as your calculator

Instead of reaching for your calculator, use Microsoft Office Excel to do the math!

On a worksheet (worksheet: The primary document that you use in Excel to store and work with data. Also called a spreadsheet. A worksheet consists of cells that are organized into columns and rows; a worksheet is always stored in a workbook.), you can enter simple formulas (formula: A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) to add, divide, multiply, and subtract two or more numeric values. You can also enter a formula that uses the SUM function (also known as AutoSum) to quickly total a series of values without having to enter any of them manually in a formula. Once you have created a formula, you can fill it into adjacent cells — no need to create the same formula over and over again.

When you become familiar with these simple formulas, you may want to learn more about how to create complex formulas and try some of the many functions (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.) that are available in Excel. For more information, see Overview of formulas and List of worksheet functions (by category).

What do you want to do?


Learn more about simple formulas

The first thing that you have to know is that all formula entries start with an equal sign (=). For simple formulas, you type the equal sign followed by the numeric values that you want to calculate and the math operators that you want to use — for example the plus sign (+) to add, the minus sign (-) to subtract, the asterisk (*) to multiply, and the forward slash (/) to divide the values that you enter. When you press ENTER, Excel instantly calculates and displays the result of the formula.

For example, when you type a simple formula in a cell ( for example, =12.99+16.99 in cell C6 in the following picture) and then press ENTER, Excel calculates the result and displays it in that cell. The formula itself appears in the formula bar (formula bar: A bar at the top of the Excel window that you use to enter or edit values or formulas in cells or charts. Displays the constant value or formula stored in the active cell.).


Example of a simple formula

The formula that you enter in a cell remains visible in the formula bar, and you can see it whenever that cell is selected.

Click AutoSum, and voila!

To quickly total a series of values without having to enter any of them manually in a formula, you can enter a formula that uses the SUM function, also known as AutoSum.

AutoSum is the button that displays the "summation" symbol (the uppercase Sigma of the Greek alphabet). Within easy reach in two locations on the Ribbon, you can find this button on the Home tab in the Editing group and on the Formulas tab in the Function Library group.

When you select a cell to the right of or below a range of numeric values and then click AutoSum, Excel automatically includes that range in the formula and calculates the values.


AutoSum button

Clicking AutoSum enters a formula that uses the SUM function to calculate the numeric values directly above or to the left of the selected cell.

For example, to quickly total the numbers for January, you just have to select cell B7 and then click AutoSum. A color marquee surrounds the cells that are selected in the formula that is entered in cell B7. After pressing ENTER, the result of the formula is displayed in the selected cell (B7), and the formula appears in the formula bar.


Example of a formula that uses the SUM function

Cell B7 displays the result of the formula. The formula itself appears in the formula bar whenever that cell is selected.

In a formula that uses a function, such as SUM, the cell reference that appears inside the parentheses is the argument (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) of the formula. The argument determines which values the formula is going calculate. The colon (:) in the cell reference (B3:B6 in the example) indicates that the cell reference is a range (range: Two or more cells on a sheet. The cells in a range can be adjacent or nonadjacent.) of cells. Parentheses are always required in a formula that uses a function — they separate the argument from the function name in the formula.

When a cell reference is used in the argument of a formula instead of the actual values, Excel can automatically update the formula result whenever the values in the referenced cells are updated.

Stop typing the same formula over and over

Once you have created a formula, you can copy it to other cells — no need to create the same formula over and over again.

For example, when you copy the formula in cell B7 to the adjacent cell C7, the formula in that cell automatically adjusts to the new location, and calculates the numeric values in column C.


Example of how the copied formula is immediately applied to the new column

The copied formula references and calculates the numeric values in column C.

Top of Page Top of Page

Use a simple formula to add, subtract, multiply, or divide numeric values

In a simple formula, you can enter values and math operators to calculate those values. However, instead of entering values directly in the formula, you can also refer to the cells that contain the values that you want to calculate. Using cell references (cell reference: The set of coordinates that a cell occupies on a worksheet. For example, the reference of the cell that appears at the intersection of column B and row 3 is B3.) in a formula makes sure that any changes to the values are automatically updated in the calculation result of the formula.

  1. On a worksheet, click the cell in which you want to enter the formula.
  2. To start the formula, type =
  3. To enter the first numeric value, do one of the following:
    • Type the value that you want to use.

       Tip   For example, type 10

    • Select the cell that contains the value that you want to use.

       Tip   For example, select cell A1.

  4. To enter the math operator that you want to use, do one of the following:
    • To use a plus sign (+) to add the values in the formula, type +
    • To use a minus sign (-) to subtract the values in the formula, type -
    • To use an asterisk (*) to multiply the values in the formula, type *
    • To use a forward slash (/) to divide the values in the formula, type /
  5. To enter the next value numeric value, do the following:
    • Type the value that you want to use.

       Tip   For example, type 5.

    • Select the cell that contains the value that you want to use.

       Tip   For example, select cell B1.

  6. Repeat steps 4 and 5 for any additional math operations and values that you want to include in the formula.

 Tip   For an operation to take precedence in the calculation, use parentheses around that operation. For example, type =(10+5)*2 or =(A1+B1)*C1.

  1. When the formula is complete, press ENTER.

By default, the resulting value of the formula appears in the selected cell, and the formula itself is displayed in the formula bar.

Top of Page Top of Page

Use the SUM function to total numeric values in a column or row

To calculate the total of a series of numeric values in a row or column, you do not have to enter all those values manually into a formula. Instead you can use a predefined formula that uses the SUM function.

  1. On a worksheet, click a cell below or to the right of the numeric values that you want to total.
  2. On the Home tab, in the Editing group, click AutoSum Button image.

 Tip   AutoSum is also available on the Formulas tab, in the Function Library group.

  1. Press ENTER to display the SUM function result in the selected cell.

The formula itself appears in the formula bar.

 Tip   If you are looking for an quick way to total values in a column, you may want to place your data in an Excel table. In an Excel table, you can add a total row so that you can instantly summarize the values in a column. For more information, see Overview of Excel tables.

Top of Page Top of Page

Fill a formula into adjacent cells

When you fill a formula into adjacent cells, either in a row or column, the formula automatically adjusts to calculate the values in the corresponding row or column.

  1. On a worksheet, select the cell that contains the formula that you want to fill into adjacent cells.
  2. Drag the fill handle (fill handle: The small black square in the lower-right corner of the selection. When you point to the fill handle, the pointer changes to a black cross.) Fill handle across the cells that you want to fill.

 Note   The fill handle is displayed by default, but if it is not available you must first specify an option in Excel to enable the fill handle.

For information about how to display the fill handle, see Display or hide the fill handle.

  1. To specify how you want to fill the selection, click Auto Fill Options Button image, and then click the option that you want.

 Note   If automatic workbook calculation is not enabled, formulas will not recalculate when you fill cells. To check your workbook calculation options, do the following:

  1. Click the Microsoft Office Button Button image, click Excel Options, and then click the Formulas category.
  1. Under Calculation options, look under Workbook Calculation.

Tips

  • You can also fill the active cell with the formula of an adjacent cell by using the Fill command (on the Home tab in the Editing group) or by pressing CTRL+D to fill a cell below or CTRL+R to fill a cell to the right of the cell that contains the formula.
  • You can automatically fill a formula downward, for all adjacent cells that it applies to, by double-clicking the fill handle of the first cell that contains the formula. For example, cells A1:A15 and B1:B15 contain numeric values, and you type the formula =A1+B1 in cell C1. To copy that formula into cells C2:C15 (so that C2=A2+B2, C3=A3+B3, and so on), select cell C1 and double-click the fill handle.
  • If you are looking for an even faster method for filling formulas, you may want to place your data in an Excel table. In an Excel table, you can create a calculated column by simply entering one formula, and Excel automatically uses that formula in the whole column. Magic math! For more information, see Overview of Excel tables.

Top of Page Top of Page

 
 
Applies to:
Excel 2007