Datasheet

To be specific, a formula in Excel calculates something, or returns some
result based on data in the worksheet. A formula is placed in cells and must
start with an equal sign (=) to tell Excel that it is a formula and not data.
Sounds simple, and it is.
All formulas should start with an equal (=) sign. An alternative is to start a
formula with a plus sign (+). This keeps Excel compatible with Lotus 1-2-3.
Look at some very basic formulas. Table 1-1 shows a few formulas and tells
you what they do.
We use the word
return to refer to what displays after a formula or function
does its thing. So to say
the formula returns a 7 is the same as saying the for-
mula calculated the answer to be 7.
Table 1-1 Basic Formulas
Formula What It Does
=2 + 2 Returns the number 4.
=A1 + A2 Returns the sum of the values in cells A1 and A2, what-
ever those values may be. If either A1 or A2 has text in it,
then an error is returned.
=D5 The cell that contains this formula ends up displaying the
value that is in cell D5. If you try to enter this formula into
cell D5 itself, you create a circular reference. That is a no-
no. See Chapter 4.
=SUM(A2:A5) Returns the sum of the values in cells A2, A3, A4, and A5.
Recall from above the syntax for a range. This formula
uses the SUM function to sum up all the values in the
range.
Entering your first formula
Ready to enter your first formula? Make sure Excel is running and a work-
sheet is in front of you, and then:
1. Click an empty cell.
2. Type this in:
= 10 + 10.
3. Press Enter.
20
Part I: Putting the Fun in Functions
05_046555 ch01.qxp 12/26/06 7:54 PM Page 20