Microsoft Office Tutorials and References

In Depth Information

**Using Cell References with a Function**

Functions

Note:
Even if a function doesn’t take any arguments, you still need to supply an empty set of parentheses

after the function name. One example is the RAND() function, which generates a random fractional

number. The formula =RAND() works fine, but if you forget the parentheses and merely enter
=RAND
, then

Excel displays an error message (
#NAME
?). That’s Excelian for: “Hey! You got the function’s name wrong.”

See Table 17-2 for more information about Excel’s error messages.

Using Cell References with a Function

One of the particularly powerful things about functions is that they don’t necessarily

need to use literal values in their arguments. They can also use cell references. For

example, you could rewrite the five-card combination formula (mentioned above)

so that it specifies the number of cards that’ll be drawn from the deck based on a

number that you’ve typed in somewhere else in the spreadsheet. Assuming this

information’s entered into cell B2, the formula would become:

=COMBIN(52,
)

Building on this formula, you can calculate the probability (albeit astronomically

low) of getting the exact hand you want in one draw:

=1/COMBIN(52,B2)

You could even multiply this number by 100 or use the Percent number style to see

your percentage chance of getting the cards you want.

Tip:
Excel gives you a detailed function reference to find functions and learn about them. Excel’s

information doesn’t make for light reading, though; for the most part, it’s in IRS-speak. You’ll learn more about

using this reference on page 486.

Using Cell Ranges with a Function

In many cases, you don’t want to refer to just a single cell, but rather a
range
of cells.

A range is simply a grouping of multiple cells. These cells may be next to each other

(say, a range that includes all the cells in a single column), or they could be scattered

across your worksheet. Ranges are useful for computing averages, totals, and many

other calculations.

To group together a series of cells, use one of the three following reference operators:

•
The comma (,) separates more than one cell
. For example, the series
A1, B7,

is a cell range that contains three cells. The comma’s known as the
union
H9

operator
. You can add spaces before or after a comma, but Excel just ignores or

removes them (depending on its mood).