TOCOL

Formulas / TOCOL
Return an array in a single column.
=TOCOL(array, [ignore], [scan_by_column])
  • array - required, the array or range to transform
  • ignore - [OPTIONAL] a setting to ignore blank and error values
  • scan_by_column - [OPTIONAL] a boolean that determines whether data is scanned by column

Examples

  • =TOCOL(A2:D4)

    The function can be used to convert an array from a range of cells into a single column. For example, if the range A2:D4 contains an array of numbers, then the formula will return the numbers from the array in a single column.

  • =TOCOL(A2:D4)

    The function can be used to convert an array in a range of cells into a single column, even if the range contains other non-array data. For example, if the range A2:D4 contains an array of numbers and other text data, then the formula will return the numbers from the array in a single column while ignoring the other text data.

  • =TOCOL(A2:B4,C2:D4)

    The TOCOL function can also be used to convert an array from multiple ranges of cells into a single column. For example, if the ranges A2:B4 andC2:D4 both contain arrays of numbers, then the formula will return the numbers from both arrays in a single column.

Summary

The TOCOL function is a convenient tool for returning an array of data in a single row. It is useful for consolidating data into a single row.

  • The TOCOL function returns an array in a single row. The first argument is required and is the array or reference to use as a column in the result set. The second argument, ignore, is also required and is whether to ignore certain types of values. The third argument, scan_by_column, is required.


Frequently Asked Questions

What is the TOCOL function?
The TOCOL function is a spreadsheet function that returns an array in a single column, with the first column being the column number and the remaining columns being the values in the array.
What are the arguments for the TOCOL function?
The arguments for the TOCOL function are:
  • Array: The array or reference to use as a column in the result set.
  • Ignore: Whether to ignore certain types of values.
  • Scan_by_column: Whether to scan the array by column. The default is to scan the array by row.
Is the array argument required?
Yes, the array argument is required.
Do I have to use the scan_by_column argument?
Yes, the scan_by_column argument is required.
What is the default for the scan_by_column argument?
The default is to scan the array by row.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV