/en/excelxp/moving-copying-and-deleting-cell-contents/content/
In school, you learned formulas used to calculate math problems. Microsoft Excel uses these same formulas to perform calculations in a spreadsheet.
A formula can be a combination of values (numbers or cell references) and math operators (+, -, /, *, =) into an algebraic expression. Excel requires every formula to begin with an equals sign (=).
The following table illustrates the mathematical operators learned in school and those represented in Excel XP.
School | Excel XP | |
Addition | + | + |
Subtraction | - | - |
Multiplication | X | * |
Division | / | / |
Equals | = | = |
The result of a formula—the answer to 2+3, for example—displays in the cell on the Excel worksheet. The formula is visible only in the formula bar. A formula's result will change as different numbers are entered into the cells included in the formula's definition.
A simple formula in Excel contains one mathematical operation only: one number plus a second number equals a third number. Writing a simple formula is really no more difficult than that: 1+1. The only difference in Excel is that all formulas must begin with the equals sign (=). It is not enough to type 1+1 in Excel because what will appear in the cell is "1+1". You must begin the equation with an equals sign, or =1+1. This holds true for any formula—simple or complicated—that adds, subtracts, multiplies, or divides.
Let's add two numbers to create a third: 128+345=473. In Excel XP, this would be expressed by the formula =128+345, as shown below.
Excel will not always tell you if your formula contains an error, so it's up to you to check all of your formulas. To learn how to do this, read the Double-Check Your Formulas lesson in our Excel Formulas tutorial.
What happens when a column contains many numbers, each of which regularly changes? You don't want to write a new formula each time a number is changed. Luckily, Excel XP lets you include cell references in formulas.
A formula can add the value of two cells—B2 and B3, for example. Type any two values in these two cells, and the formula will adjust the answer accordingly.
Using this method to calculate two numbers—128 and 345, for example—requires that you type 128 into cell B2 and 345 into cell B3. The Excel formula =B2+B3 would then be defined in cell B4.
Formulas can be created by using either numbers or cell references in the definition. You can also use the mouse to select the cells to be used in the formula instead of typing the cell number or cell reference. Using this method, we'll write a simple formula that subtracts one cell from another: =B3-B2.
Creating multiplication formulas is similar to creating addition and subtraction formulas. To multiply two cells such as B2 and B3, you would need to insert a multiplication operator * between them: =B2*B3.
Creating division formulas is similar to creating addition, subtraction, and multiplication formulas. To divide the contents of cell B2 by cell B3, you would need to insert a division operator between them: =B2/B3.
/en/excelxp/creating-complex-formulas/content/