Excel 2019 Bible

(singke) #1

Part II: Working with Formulas and Functions


If you accidentally press Ctrl+Enter (instead of Ctrl+Shift+Enter) after editing an array formula, the formula will be
entered into each selected cell, but it will no longer be an array formula, and it will probably return an incorrect
result. Just select the cells again, press F2, and then press Ctrl+Shift+Enter.

Although you can’t change any individual cell that makes up a multicell array formula, you
can apply formatting to the entire array or only to parts of it.

Expanding or contracting a multicell array formula
Often, you may need to expand a multicell array formula (to include more cells) or contract
it (to include fewer cells). Doing so requires these steps:


  1. Select the entire range that contains the array formula.

  2. Press F2 to enter Edit mode.

  3. Press Ctrl+Enter. This step enters an identical (nonarray) formula into each
    selected cell.

  4. Change your range selection to include additional or fewer cells, but make sure
    that the active cell is a cell that’s part of the original array.

  5. Press F2 to re-enter Edit mode.

  6. Press Ctrl+Shift+Enter.


Array Formulas: The Downside
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 confusing.
You can easily forget to enter an array formula by pressing Ctrl+Shift+Enter. (Also, if you edit an exist-
ing array, you must remember to use this key combination to complete 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 sometimes 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 43, “Creating Custom Worksheet Functions,” for more information about creat-
ing custom VBA functions.
Free download pdf