Excel 2010 Bible

(National Geographic (Little) Kids) #1

Part II: Working with Formulas and Functions


366


Using Multicell Array Formulas ........................................................................................


This section contains examples that demonstrate additional features of multicell array formulas
(array formulas that are entered into a range of cells). These features include creating arrays from
values, performing operations, using functions, transposing arrays, and generating consecutive
integers.

Creating an array from values in a range .................................................................

The following array formula creates an array from a range of cells. Figure 16.8 shows a workbook
with some data entered into A1:C4. The range D8:F11 contains a single array formula:

{=A1:C4}

The array in D8:F11 is linked to the range A1:C4. Change any value in A1:C4, and the corre-
sponding cell in D8:F11 reflects that change. It’s a one-way link, of course. You can’t change a
value in D8:F11.

If you’ve followed along in this chapter, you probably understand some of the advantages of using array
formulas. The main advantage, of course, is that an array formula enables you to perform otherwise
impossible calculations. As you gain more experience with arrays, however, you undoubtedly will also
discover some disadvantages.

Array formulas are one of the least understood features of Excel. Consequently, if you plan to share a
workbook with someone who may need to make modifications, you should probably avoid using array
formulas. Encountering an array formula when you don’t know what it is can be very confusing.

You might also discover that you can easily forget to enter an array formula by pressing Ctrl+Shift+Enter.
(And don’t forget: If you edit an existing array, you must remember to use this key combination to com-
plete the edits.) Except for logical errors, this is probably the most common problem that users have
with array formulas. If you press Enter by mistake after editing an array formula, just press F2 to get back
into Edit mode and then press Ctrl+Shift+Enter.

Another potential problem with array formulas is that they can slow your worksheet’s recalculations,
especially if you use very large arrays. On a faster system, this delay in speed may not be a problem.
But, conversely, using an array formula is almost always faster than using a custom VBA function. See
Chapter 40 for more information about creating custom VBA functions.

Array Formulas: The Downside

Free download pdf