Lookup & Reference

TOROW Function in Excel

Returns an array as a single row.

Syntax

  • =TOROW(array, [ignore], [scan_by_column])

Arguments

  • array (required): Array to convert
  • ignore (optional): 0=keep all, 1=ignore blanks, 2=ignore errors, 3=ignore both
  • scan_by_column (optional): FALSE=by row (default), TRUE=by column

Examples

  • =TOROW(A1:C3) - Convert 3x3 to single row - Result: 9 values in row

When to use TOROW

  • Use TOROW when you need to retrieve values from a table or range based on a key.
  • Confirm data types match (text vs number) and trim spaces before lookups.
  • Pair with [IFERROR](/functions/iferror/) or [IFNA](/functions/ifna/) for cleaner reports.
  • See the [lookup functions guide](/guides/excel-lookup-functions-guide/) for VLOOKUP, XLOOKUP, and INDEX MATCH paths.

Common TOROW mistakes

  • #N/A often means the key is missing or exact match is wrong — see [#N/A error](/errors/na/).
  • Lock table references with $ when copying formulas down a column.
  • Compare legacy vs modern lookups in [XLOOKUP vs VLOOKUP](/compare/xlookup-vs-vlookup/).

Common errors

  • Requires Excel 365

Use cases

  • Flatten arrays
  • Data transformation
  • Combine ranges

Frequently asked questions

  • What is TOROW in Excel? TOROW flattens a 2D array into a single row. A 3×3 array becomes 9 values in one row. It's useful for combining multiple columns into one row, preparing data for other functions, or creating horizontal lists.
  • How do I remove blanks when flattening with TOROW? Use ignore=1: =TOROW(A1:C10, 1) flattens the array and removes blank cells. Use ignore=2 to remove errors, or ignore=3 to remove both blanks and errors. Default (0) keeps everything.
  • What is the difference between scan_by_column TRUE and FALSE? FALSE (default) reads row by row: A1,B1,C1,A2,B2,C2... TRUE reads column by column: A1,A2,A3,B1,B2,B3... Choose based on how your data should be ordered in the resulting row.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.