18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part II<br />

Working with Formulas and Functions<br />

If you accidentally press Ctrl+Enter (instead of Ctrl+Shift+Enter) after editing an array<br />

formula, the formula will be entered into each selected cell, but it will no longer be an<br />

array formula. And it will probably return an incorrect result. Just reselect the cells, press F2, and then<br />

press Ctrl+Shift+Enter.<br />

CAUTION<br />

Although you can’t change any individual cell that makes up a multicell array formula, you can apply formatting<br />

to the entire array or to only parts of it.<br />

Expanding or contracting a multicell array formula<br />

Often, you may need to expand a multicell array formula (to include more cells) or contract it (to include<br />

fewer cells). Doing so requires a few steps:<br />

1. Select the entire range that contains the array formula.<br />

2. Press F2 to enter Edit mode.<br />

3. Press Ctrl+Enter. This step enters an identical (non-array) formula into each selected cell.<br />

4. Change your range selection to include additional or fewer cells.<br />

5. Press F2 to re-enter Edit mode.<br />

6. Press Ctrl+Shift+Enter.<br />

Array Formulas: The Downside<br />

If you’ve followed along in this chapter, you probably understand some of the advantages of using array formulas.<br />

The main advantage, of course, is that an array formula enables you to perform otherwise impossible<br />

calculations. As you gain more experience with arrays, however, you undoubtedly will also discover some<br />

disadvantages.<br />

Array formulas are one of the least understood features of Excel. Consequently, if you plan to share a workbook<br />

with someone who may need to make modifications, you should probably avoid using array formulas.<br />

Encountering an array formula when you don’t know what it is can be very confusing.<br />

You might also discover that you can easily forget to enter an array formula by pressing Ctrl+Shift+Enter. (And<br />

don’t forget: If you edit an existing array, you must remember to use this key combination to complete the<br />

edits.) Except for logical errors, this is probably the most common problem that users have with array formulas.<br />

If you press Enter by mistake after editing an array formula, just press F2 to get back into Edit mode and<br />

then press Ctrl+Shift+Enter.<br />

Another potential problem with array formulas is that they can slow your worksheet’s recalculations, especially<br />

if you use very large arrays. On a faster system, this delay in speed may not be a problem. But, conversely,<br />

using an array formula is almost always faster than using a custom VBA function. See Chapter 40 for<br />

more information about creating custom VBA functions.<br />

322

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

Saved successfully!

Ooh no, something went wrong!