![]() |
| サイトマップ | |
|
関数 subblock
は、ワークシートで以前に定義したセルのブロック範囲内から、セルのブロックを返します。元のブロックで定義された範囲に対して、左上セルと右下セルを使用してサブブロックを定義します。
subblock
(block, column 1, row 1, column 2, row 2)
引数 block は、ブロック、すなわち、関数 block
文で定義される変数となります。
引数 column 1 と row 1 は、元のブロックに対するサブブロックの左上のセルの相対的座標です。引数 column 2 と row 2 は、サブブロックの右下セルの相対的座標です。この範囲内にあるすべての値が返されます。 ブロックに対して実行される演算は必ずブロックを返します。引数 column 2 と row 2 を省略した場合、最後の行または列(またはこれらの両方)は元のブロックの最後の行および列と想定されます。
列と行のすべての引数は(範囲ではなく)スカラーで指定する必要があります。
x = block (3,1,20,42)
の場合、subblock (x,1,1,1,1)
は cell (3,1)
を返し、subblock (x,5,5)
は、cell (7, 5)
から cell (20, 42)
のブロックを返します。
The subblock function returns a block of cells from within another previously defined block of cells from the worksheet. The subblock is defined using the upper left and lower right cells of the subblock, relative to the range defined by the source block.
subblock (block, column 1, row 1, column 2, row 2)
The block argument can be a variable defined as a block, or a block function statement.
The column 1 and row 1 arguments are the relative coordinates for the upper left cell of the subblock with respect to the source block. The column 2 and row 2 arguments are the relative coordinates for the lower right cell of the subblock. All values within this range are returned. Operations performed on a block always return a block. If column 2 and row 2 are omitted, then the last row and/or column is assumed to be the last row and column of the source block.
All column and row arguments must be scalar (not ranges).
For x = block (3,1,20,42) the operation subblock (x,1,1,1,1) returns cell (3,1) and the operation subblock (x,5,5) returns the block from cell (7, 5) to cell (20, 42).