18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introducing Array Formulas 17<br />

You can use additional array formulas to calculate other measures for the data in this example. For example,<br />

the following array formula returns the largest change (that is, the greatest improvement). This formula<br />

returns 23, which represents Linda’s test scores.<br />

{=MAX(C2:C15-B2:B15)}<br />

FIGURE 17.17<br />

Without an array formula, calculating the average change requires intermediate formulas in column D.<br />

The following array formula returns the smallest change (that is, the least improvement). This formula<br />

returns –11, which represents Nancy’s test scores.<br />

{=MIN(C2:C15-B2:B15)}<br />

Using an array in lieu of a range reference<br />

If your formula uses a function that requires a range reference, you may be able to replace that range reference<br />

with an array constant. This is useful in situations in which the values in the referenced range do not<br />

change.<br />

A notable exception to using an array constant in place of a range reference in a function is<br />

with the database functions that use a reference to a criteria range (for example, DSUM).<br />

Unfortunately, using an array constant instead of a reference to a criteria range does not work.<br />

NOTE<br />

CROSS-REF<br />

For information about lookup formulas, refer to Chapter 15.<br />

Figure 17.18 shows a worksheet that uses a lookup table to display a word that corresponds to an integer.<br />

For example, looking up a value of 9 returns Nine from the lookup table in D1:E10. The formula in cell C1 is<br />

=VLOOKUP(B1,D1:E10,2,FALSE)<br />

331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!