Entering a new formula in a worksheet seems like a simple process:
- Select the cell where you want to enter the formula.
- Type an equal sign (=) to tell Excel you’re entering a formula.
- Enter the operands and operators for the formula.
- Press Enter to confirm the formula.
After entering a formula, you may need to go back and make changes. Excel offers three methods to enter Edit mode and modify a formula in the selected cell:
■ Press F2
■ Double-click the cell
■ Use the Formula Bar to click anywhere within the formula text
Excel categorizes formulas into four groups: arithmetic, comparison, text, and reference. Each group has its own set of operators, and each is used in different ways. The following sections explain how to use each type of formula.
Using Arithmetic Formulas
Arithmetic formulas are by far the most common type. These formulas combine numbers, cell addresses, and function results with mathematical operators to perform calculations.
Table 4.1-a summarizes the mathematical operators used in arithmetic formulas:
Table: Arithmetic Formula Operations
| Operator | Name | Example | Result |
|---|---|---|---|
+ |
Addition | =5 + 11 |
16 |
- |
Subtraction | =11 - 5 |
6 |
- |
Negation | =-5 - 11 |
-16 |
* |
Multiplication | =10 * 550 |
5500 |
/ |
Division | =15 / 3 |
5 |
% |
Percentage | =15% |
0.15 |
^ |
Exponentiation | =10^3 |
1000 |
Using Comparison Formulas
A comparison formula is a statement that compares two or more numbers, text strings, cell contents, or function results.
If the statement is true, the formula result is the logical value TRUE, which is equivalent to any non-zero value.
If the statement is false, the formula returns FALSE, which is equivalent to zero.
Table: Comparison Formula Operations
| Operator | Name | Example | Result |
|---|---|---|---|
= |
Equal to | =11=6 |
FALSE |
> |
Greater than | =11>6 |
TRUE |
< |
Less than | =10<5 |
FALSE |
>= |
Greater or equal to | ="a">="b" |
FALSE |
<= |
Less or equal to | ="a"<= "b" |
TRUE |
<> |
Not equal to | ="a"<> "b" |
TRUE |
Comparison formulas have many uses. For example, you can determine whether to pay a sales bonus by comparing actual sales to a predefined quota. If sales exceed the quota, the bonus is awarded.
Using Text Formulas
The arithmetic and comparison formulas discussed earlier calculate or compare values and return results.
However, a text formula is one that returns a text value.
Text formulas use the ampersand operator (&) to work with text cells, quoted text strings, and text function results.
One way to use text formulas is to concatenate text strings. For example, if you enter the formula:
="excel" & "corpo"
Excel will display: excelcorpo.
Note that the quotes and the ampersand do not appear in the result.
Using Reference Formulas
Reference operators combine two cell or range references to create a single reference.
The following table summarizes the operators you can use in reference formulas:
Table: Reference Formula Operations
| Operator | Name | Description |
|---|---|---|
: |
Range | Creates a range from two cell references, such as A1:D10 |
| (space) | Intersection | Returns a range that is the intersection of two ranges, e.g. A1:D10 B4:F20 |
, |
Union | Returns a range that is the union of two ranges, e.g. A1:D10, B4:F20 |