Microsoft Office Tutorials and References
In Depth Information
Understanding the Dimensions of an Array
Understanding the Dimensions of an Array
As stated previously, an array can be either one-dimensional or two-dimensional. A
onedimensional array’s orientation can be either vertical or horizontal.
One-dimensional horizontal arrays
The elements in a one-dimensional horizontal array are separated by commas. The following
example is a one-dimensional horizontal array constant:
{1,2,3,4,5}
To display this array in a range requires five consecutive cells in a single row. To enter this array
into a range, select a range of cells that consists of one row and five columns. Then enter
={1,2,3,4,5} and press Ctrl+Shift+Enter.
If you enter this array into a horizontal range that consists of more than five cells, the extra cells
will contain #N/A (which denotes unavailable values). If you enter this array into a vertical range
of cells, only the first item (1) will appear in each cell.
The following example is another horizontal array; it has seven elements and is made up of text
strings:
{“Sun”,”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”}
To enter this array, select seven cells in one row and then type the following (followed by
pressing Ctrl+Shift+Enter):
={“Sun”,”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”}
One-dimensional vertical arrays
The elements in a one-dimensional vertical array are separated by semicolons. The following is a
six-element vertical array constant:
{10;20;30;40;50;60}
Displaying this array in a range requires six cells in a single column. To enter this array into a
range, select a range of cells that consists of six rows and one column. Then enter the following
formula, and press Ctrl+Shift+Enter:
 
Search JabSto ::




Custom Search