Microsoft Office Tutorials and References

In Depth Information

**Ways to Enter a Function into a Formula**

sometimes known as
nesting
functions. Excel starts by evaluating the most deeply nested

expression and works its way out. Note this example of a nested function:

=SIN(RADIANS(B9))

The RADIANS function converts degrees to
radians,
the unit used by all of the Excel

trigonometric functions. If cell B9 contains an angle in degrees, the RADIANS function converts it to radians

and then the SIN function computes the sine of the angle.

A formula can contain up to 64 levels of nested functions — a limit that will probably never be a

factor.

Arrays as arguments

A function can also use an array as an argument. An
array
is a series of values separated by a

comma and enclosed in brackets. The formula below uses the OR function with an array as an

argument. The formula returns TRUE if cell A1 contains 1, 3, or 5.

=OR(A1={1,3,5})

See Part IV of this topic for more information about working with arrays.

Often, using arrays can help simplify your formula. The formula below, for example, returns the

same result but uses nested IF functions instead of an array:

=IF(A1=1,TRUE,IF(A1=3,TRUE,IF(A1=5,TRUE,FALSE)))

Ways to Enter a Function into a Formula

You can enter a function into a formula by typing it manually, by using the Function Library

commands, or by using the Insert Function dialog box.

Entering a function manually

If you’re familiar with a particular function — you know its correct spelling and the types of

arguments that it takes — you may choose to simply type the function and its arguments into your

formula. Often, this method is the most efficient.