How to use TOROW function in Excel?

The `TOROW` function in Excel is a relatively new function that is used to transform a range or array into a single row. Here’s how you can use the `TOROW` function effectively:

Syntax

TOROW(array, [ignore], [by_col])

Parameters

  • array (required): This is the range or array that you want to transform into a row.
  • ignore (optional): This parameter specifies which values to ignore when creating the row. You can set it to:
    • `0` or omit it: Include all values.
    • `1`: Ignore blanks.
    • `2`: Ignore errors.
    • `3`: Ignore both blanks and errors.
  • by_col (optional): This determines the order in which the array will be flattened:
    • `FALSE` or omit it: Read the array by row.
    • `TRUE`: Read the array by column.

Example

Suppose you have data in the range `A1:B3`, and you want to transform this into a single row while ignoring any blank cells.

  A  B
  C  
  D  E
  =TOROW(A1:B3, 1)
  • Data in `A1:B3`:
  • Formula to transform into a row (ignore blanks):

This would result in:

  A, B, C, D, E

Step-by-Step

  • Select the cell where you want the result to appear.
  • Enter the formula using the syntax above.
  • Press Enter, and the selected range will be displayed in a single row.

Use Cases

  • Data Reorganization: Helpful in reshaping data for analysis.
  • Data Cleaning: Quickly strip out blanks and errors.
  • Concatenation: Gather all values from a range into one row for string operations or further analysis.

Using the `TOROW` function simplifies the process of reshaping data, improving data handling capabilities in Excel.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project