Syntax
=TOROW(array, [ignore], [scan_by_column])Arguments
| Argument | Required | Description |
|---|---|---|
array | Required | The range or array |
ignore | Optional | 0 keep all (default), 1 skip blanks, 2 skip errors, 3 skip blanks and errors |
scan_by_column | Optional | FALSE (default) reads row by row, TRUE column by column |
How to use TOROW
When TOROW returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.
TOROW takes 1 required argument and 2 optional arguments. Type =TOROW( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=TOROW({1,2;3,4})Result Spilled result
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 1 | 2 | 3 | 4 |
=TOROW({1,#N/A;3,4}, 2)Result Spilled result
| A | B | C | |
|---|---|---|---|
| 1 | 1 | 3 | 4 |
Related array functions
- SORTBYSorts a range or array by the values of other ranges or arrays.
- SORTNReturns the first n rows of a range after sorting, with options for ties.
- TAKEReturns a number of rows or columns from the start (positive) or end (negative) of an array.
- TOCOLReturns the values of an array as a single column.
- TRIMRANGERemoves empty rows and columns from the edges of a range.
- UNIQUEReturns the unique rows (or columns) of a range or array.
- VSTACKStacks arrays on top of each other; shorter rows are padded with #N/A.
- WRAPCOLSWraps a row or column of values into columns of the given length.
- WRAPROWSWraps a row or column of values into rows of the given length.