11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

406<br />

Part IV: Array <strong>Formula</strong>s<br />

Working with Multicell Array <strong>Formula</strong>s<br />

The preceding chapter introduces array formulas that you can enter into multicell ranges. In this<br />

section, I present a few more array multicell formulas. Most of these formulas return some or all<br />

of the values in a range, but are rearranged in some way.<br />

The examples in this section are available on the companion CD-ROM. The file is named<br />

multi-cell array formulas.xlsx.<br />

Returning only positive values from a range<br />

The following array formula works with a single-column vertical range (named Data). The array<br />

formula is entered into a range that’s the same size as Data and returns only the positive values<br />

in the Data range. (Zeroes and negative numbers are ignored.)<br />

{=INDEX(Data,SMALL(IF(Data>0,ROW(INDIRECT(“1:”&ROWS(Data)))),<br />

ROW(INDIRECT(“1:”&ROWS(Data)))))}<br />

As you can see in Figure 15-9, this formula works, but not perfectly. The Data range is A4:A23,<br />

and the array formula is entered into C4:C23. However, the array formula displays #NUM! error<br />

values for cells that don’t contain a value.<br />

Figure 15-9: Using an array formula to return only the positive values in a range.

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

Saved successfully!

Ooh no, something went wrong!