Microsoft Office Tutorials and References
In Depth Information
Working with Multicell Array Formulas
This modified array formula, entered into range E4:E23, uses the IFERROR function to avoid the
error value display:
{=IFERROR(INDEX(Data,SMALL(IF(Data>0,ROW(INDIRECT(“1:”&ROWS(Data)))),ROW(IN
DIRECT(“1:”&ROWS(Data))))),””)}
The IFERROR function was introduced in Excel 2007. For compatibility with older versions, use
this formula entered in G4:G23:
{=IF(ISERR(SMALL(IF(Data>0,ROW(INDIRECT(“1:”&ROWS(Data)))),
ROW(INDIRECT(“1:”&ROWS(Data))))),””,INDEX(Data,SMALL(IF
(Data>0,ROW(INDIRECT(“1:”&ROWS(Data)))),ROW(INDIRECT
(“1:”&ROWS(Data))))))}
Returning nonblank cells from a range
The following formula is a variation on the formula in the preceding section. This array formula
works with a single-column vertical range named Data. The array formula is entered into a range
of the same size as Data and returns only the nonblank cell in the Data range.
{=IFERROR(INDEX(Data,SMALL(IF(Data<>””,ROW(INDIRECT(“1:”&ROWS(Data)))),
ROW(INDIRECT(“1:”&ROWS(Data))))),””)}
For compatibility with versions prior to Excel 2007, use this formula:
{=IF(ISERR(SMALL(IF(Data<>””,ROW(INDIRECT(“1:”&ROWS(Data)))),
ROW(INDIRECT(“1:”&ROWS(Data))))),””,INDEX(Data,SMALL(IF(Data
<>””,ROW(INDIRECT(“1:”&ROWS(Data)))),ROW(INDIRECT(“1:”&ROWS
(Data))))))}
Reversing the order of cells in a range
In Figure 15-10, cells C4:C13 contain a multicell array formula that reverses the order of the values
in the range A4:A13 (which is named Data ).
The array formula is
{=IF(INDEX(Data,ROWS(Data)-ROW(INDIRECT
(“1:”&ROWS(Data)))+1)=””,””,INDEX(Data,ROWS(Data)–
ROW(INDIRECT(“1:”&ROWS(Data)))+1))}

Search JabSto ::

Custom Search