[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
Single- and Multi-Cell Formulas
A single-cell formula is applied to a single cell while a multi-cell formula is applied to a range of cells as a group.
When a single-cell formula results in a single value, the designated cell takes on that value. [Example: When cell A10 contains SIN(0.3), the result stored in that cell is 0.295520207. end example]
When a multi-cell formula results in a single value, each of the designated cells takes on that value. [Example: When the group of cells A10:A12 contains SIN(0.3), the result stored in each of those cells is 0.295520207. end example]
When a single-cell formula results in multiple values, the designated cell takes on the first of those values. [Example: When cell A10 contains SIN({0.3,0.4,0.5}), the result stored in that cell is 0.295520207 (SIN(0.3)). end example]
When a multi-cell formula results in multiple values (such as when the multi-cell formula is array-entered), the designated cells take on corresponding values, according to the shape of the cell group and the values. Specifically,
• If the cell group and values have the same shape (i.e., the same number of rows and columns), each cell takes on the value corresponding to its relative position.
• If the cell group has fewer columns than the values, the left-most columns of the values are stored in the cells.
• If the cell group has fewer rows than the values, the top-most rows of the values are stored in the cells.
• If the cell group has more columns than the values, each cell takes on the value corresponding to its relative position, except that
• For a cell group 1xN array or a two-dimensional array, the excess right-most cells take on an unspecified value.
• For a cell group Nx1 array, the excess columns are clones of the first column.
• If the cell group has more rows than the values, each cell takes on the value corresponding to its relative position, except that:
• For a cell group Nx1 array or a two-dimensional array, the excess bottom-most cells take on an unspecified value.
• For a cell group 1xN array, the excess rows are clones of the first row.
[Example: Case 1: The 1x3 group of cells A20:C20 has applied to it the formula SIN({0.3,0.4,0.5}). The number of rows and columns in the group exactly matches the number of rows and columns in the result. Those cells then contain 0.295520207, 0.389418342, and 0.479425539, which correspond to SIN(0.3), SIN(0.4), and SIN(0.5), respectively.
Case 2: The 1x2 group of cells A20:B20 has applied to it the formula SIN({0.3,0.4,0.5}). The number of columns in the group is less than the number of columns in the result. (The number of rows is the same in each.) Those cells then contain 0.295520207 and 0.389418342, which correspond to SIN(0.3) and SIN(0.4), respectively, the left-most part of the set of values.
Case 3: The 1x4 group of cells A20:D20 has applied to it the formula SIN({0.3,0.4,0.5}). The number of columns in the group is greater than the number of columns in the result. (The number of rows is the same in each.) Those cells then contain 0.295520207, 0.389418342, 0.479425539, and an unspecified value, which correspond to SIN(0.3), SIN(0.4), and SIN(0.5), respectively, with the fourth value being unspecified.
Case 4: The 2x2 group of cells A30:B31 has applied to it the formula SIN({0.1,0.2,0.3}). The number of columns in the group is less than the number of columns in the result. As a result, the cells in row 30 contain 0.295520207 and 0.389418342, which correspond to SIN(0.3) and SIN(0.4), respectively. The number of rows in the group is greater than the number of rows in the result, so the cells in 31 are a copy of the cells in row 30. The left-most part of the set of values is propagated into the cells.
Case 5: The 2x2 group of cells A40:B41 has applied to it the formula SIN({0.1,0.2,0.3; 0.4,0.5,0.6; 0.7,0.8,0.9}). The number of columns in the group is less than the number of columns in the result. As a result, the left-most column values are stored. The number of rows in the group is less than the number of rows in the result. As a result, the top-most column values are stored. example]