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 />

FIGURE 17.5<br />

Creating a named array constant.<br />

FIGURE 17.6<br />

Using a named array in an array formula.<br />

Because commas separate the array elements, the array has a horizontal orientation. Use semicolons to create<br />

a vertical array. Or you can use the Excel TRANSPOSE function to insert a horizontal array into a vertical<br />

range of cells (see “Transposing an array,” later in this chapter). The following array formula, which is<br />

entered into a seven-cell vertical range, uses the TRANSPOSE function:<br />

{=TRANSPOSE(DayNames)}<br />

You also can access individual elements from the array by using the Excel INDEX function. The following<br />

formula, for example, returns Wed, the fourth item in the DayNames array:<br />

=INDEX(DayNames,4)<br />

Working with Array Formulas<br />

This section deals with the mechanics of selecting cells that contain arrays and entering and editing array<br />

formulas. These procedures differ a bit from working with ordinary ranges and formulas.<br />

Entering an array formula<br />

When you enter an array formula into a cell or range, you must follow a special procedure so that Excel<br />

knows that you want an array formula rather than a normal formula. You enter a normal formula into a cell<br />

by pressing Enter. You enter an array formula into one or more cells by pressing Ctrl+Shift+Enter.<br />

320

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

Saved successfully!

Ooh no, something went wrong!