Page 187 - Excel Progamming Weekend Crash Course
P. 187
k540629 ch13.qxd 9/2/03 9:34 AM Page 162
162 Saturday Afternoon
Figure 13-1 Excel’s Insert Function dialog box
Excel offers a large number of functions, too many to cover in this session. The latter
part of this session provides information and examples for some of the more commonly
needed functions, but this is merely scratching the surface. You can refer to Excel’s online
help or use the Insert Function dialog box to get information on functions that are not cov-
ered here.
Using Excel Functions in Formulas
An Excel function consists of the function name followed by parentheses. Almost all func-
tions take one or more arguments that specify the data the function is to use. An argument
may be a literal value, a cell reference, a range reference, or even another function. It is
important that the argument be of the appropriate type, no matter what form it takes.
A function that performs a numerical calculation, for example, should not be passed text
data as an argument.
To use a function, include it in the formula and then insert it in the desired cell. A for-
mula may contain nothing but a function, as in the following example that uses the Sum
function to add the values in cells B1:B9 in the worksheet named “Sales” and display the
result in cell B10:
Worksheets(“Sales”).Range(“B10”) = “=Sum(B1:B9)”
A function can also be part of a more complicated formula, as in the following example
that sums the values in cells B1:B9 and multiplies that value by the number in the cell
named InterestRate:
Worksheets(“Sales”).Range(“B10”) = “=Sum(B1:B9)*InterestRate”
Cell and range references in function arguments work the same as they do in
formulas. See Session 11 for details.
Note