Vous êtes sur la page 1sur 3

As with all basic math operations in Excel to add two or more numbers in Excel y
ou need to create a formula.
Note: To add together several numbers that are located in a single column or row
in a worksheet, use the SUM Function, which offers a shortcut to creating a lon
Important points to remember about Excel formulas:
Formulas in Excel always begin with the equal sign ( = );
Free IT Training
free-online-training-courses.com
How to Count Cells
Excel
Formulas in Excel
Fix a Cell
The equal sign is always typed into the cell where you want the answer to ap
pear;
The formula is completed by pressing the Enter key on the keyboard.
Using Cell References in Addition Formulas
In the image above, the first set of examples (rows 1 to 4) use a simple formula
- located in column C - to add together the data in columns A and B.
Although it is possible to enter numbers directly into an addition formula - as
shown by the formula:
= 5 + 5
in row 2 of the image - it is much better to enter the data into worksheet cells
and then use the addresses or references of those cells in the formula - as sho
wn by the formula
=A2 + B2
in row 3 above.
One advantage of using cell references rather than the actual data in a formula
, is that, if, at a later date, it becomes necessary to change the data it is a
simple matter of replacing the data in the cell rather than rewriting the formu
la.
Normally, the results of the formula will update automatically once the data cha
nges.

## Entering the Cell References using Pointing

Although it is possible to just type the above formula into cell C3 and have the
correct answer appear, it is usually better to use pointing to add the cell ref
erences to formulas in order to minimize the possibility of errors created by ty
ping in the wrong cell reference.
Pointing involves clicking on the cell containing the data with the mouse pointe
r to add the cell reference to the formula.
Steps to Creating the Addition Formula
The steps used to create the addition formula in cell C3 are:
Click on cell A3 with the mouse pointer to add that cell reference to the fo
rmula after the equal sign;
Type the plus sign ( + ) into the formula after A3;
Click on cell B3 with the mouse pointer to add that cell reference to the fo
Press the Enter key on the keyboard to complete the formula;
The answer 20 should be present in cell C3;
Even though you see the answer in cell C3, clicking on that cell will displa
y the formula =A3 + B3 in the formula bar above the worksheet.
Changing the Formula
If it becomes necessary to correct or change a formula, two of the best options
are:
Double click on the formula in the worksheet to place Excel in Edit mode and
then make changes to the formula - works best for minor changes.
Click once on the cell containing the formula and re-enter the entire formul
a - best for major changes.
Creating More Complex Formulas
To write more complex formulas that include multiple operations - such as divisi
on or subtraction as well as addition - use the steps listed above to get starte
d and then just continue to add the correct mathematical operator followed by th
e cell references containing the new data.
Before mixing different mathematical operations together in a formula however, i
t is important to understand the order of operations that Excel follows when eva
luating a formula.
For practice, try this step by step example of a more complex formula.
Copying Formulas Containing Cell References
Another advantage to using cell references in formulas is that, in the right cir
cumstances, the formula can be copied to other cells and the cell references wil
l update to reflect the formula's new locations.
Copying formulas only works, however, when the data used in the formula is alway
s the same distance - number of cells - away from the cell containing the answer
as shown in the first set of formulas in rows 3 and 4.
In this case, the formula in cell C3 was copied to cell C4 and, as shown in colu
mn D, the row numbers of the cell references changed to reflect the formula's ne
w location and to give the correct answer of 40 (20 + 20).

When the formula was copied, the distances between the data and the formulas wer
e maintained:
for the formula
e formula (cells A2
for the formula
e formula (cells A3

## in C2, the data is located 1 and 2 columns to the left of th

and B2);
in C3, the data is located 1 and 2 columns to the left of th
and B3).

Copy Errors
In the second set of formulas - rows 9 to 12 - which add the tax amount in cell
B6 to the data in column A, the formula in B9 was copied to cells B10 and B11, b
ut neither of the copied formulas gives the correct answer.
The formula in B10 returns a result of 15 instead of 35 because it adds the
blank cell B6 to the data in A10 - blank cells are set equal to zero by the form
ula;
The formula in B11 adds the text data Results in cell B7 to the data in A11
and returns the #VALUE! error as a result.
Note: If cells referenced in a formula carrying out any arithmetic operation (ad
dition, subtraction, multiplication, or division) contain text data rather than
numbers, the program returns a #VALUE! error as shown in row 11 above.
Using Absolute Cell References in Formulas
For both of these formulas, the distance from the cell containing the data (B1)
to the cell containing the formulas (B6 and B7) changed when the formula was cop
ied:
The formula in cell B9 is 3 rows below the data in cell B6;
The formula in cell B10 is 4 rows below the data in cell B6;
The formula in cell B11 is 5 rows below the data in cell B6.
The way to fix the problem of changing distances when formulas are copied is to
use absolute cell references when creating the formula.
Absolute cell references do not rely on the data always being the same distance
from the formula because absolute cell references do not change when they are co
pied.
Dollar Signs
In the formula in row 12, the cell reference for B6 is absolute - as shown by th
e presence of the dollar signs (\$B\$6) surrounding the reference. This formula gi
ves the correct result of 45 (20 + 25) because the formula always looks for data
in cell B6 rather than relying on a constant distance between the formula and i
ts data.