The Excel TOROW function flattens any range or array into a single row. It’s the sideways twin of TOCOL: point it at a grid and get one horizontal list back — ideal for building header rows, dashboard strips, and inputs for functions that want a row.
1 means "ignore blanks" — leave it out and every empty cell becomes a 0 in the row.
Syntax
| Argument | Description | |
|---|---|---|
array | Required | The range or array to flatten. |
ignore | Optional | What to skip: 0 = keep all values (default) · 1 = ignore blanks · 2 = ignore errors · 3 = ignore blanks and errors. |
scan_by_column | Optional | FALSE = read row by row, left to right (default). TRUE = read column by column, top to bottom. |
Same trap as TOCOL: with the default ignore of 0, empty cells come through as zeros. For real-world data, reach for =TOROW(range, 1).
Flatten a grid into one row
A shift grid sits in A1:C3 with one slot unfilled. One formula lays every name out in a single row:
| A | B | C | |
|---|---|---|---|
| 1 | Shift 1 | Shift 2 | Shift 3 |
| 2 | Ava | Ben | Cleo |
| 3 | Dan | Eli |
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 5 | Ava | Ben | Cleo | Dan | Eli |
By default TOROW reads row by row: Ava, Ben, Cleo, then Dan, Eli. Set the third argument to TRUE to walk down each column first:
Try it: interactive TOROW demo
Flatten a 3×3 grid that contains a blank cell and a #DIV/0! error. Switch the ignore mode and scan direction and watch the row change.
The real power: build header rows and horizontal strips
Dashboards and report templates often want data running across. TOROW turns any vertical or grid-shaped source into a horizontal strip without retyping:
Combine it with UNIQUE to spin up column headers straight from the data, then count against them:
Reshaping duo: TOROW flattens; WRAPCOLS and WRAPROWS re-fold. =WRAPROWS(TOROW(grid, 1), 4) reflows a ragged grid into tidy rows of four.
Errors & common pitfalls
Pitfall: blanks become zeros. The default ignore of 0 keeps every cell, and empty cells come through as 0. Use ignore 1 (or 3) to drop them.
#SPILL! — the row runs into something. A 200-cell grid makes a 200-column row. Make sure the cells to the right are empty — and remember the sheet ends at column XFD.
#NAME? — older Excel. TOROW requires Excel for Microsoft 365 or Excel 2024+. In older versions the name isn’t recognized.
Pitfall: errors ride along. With ignore 0 or 1, error cells from the source appear in the row and break downstream math. Use ignore 2 or 3 to drop them.
Pitfall: wrong reading order. If the flattened row looks shuffled, flip scan_by_column — FALSE reads across each row first, TRUE reads down each column first.
Practice workbook
Frequently asked questions
What do the ignore values 0-3 mean in TOROW?
0 keeps every value (blanks become 0), 1 ignores blanks, 2 ignores errors, 3 ignores both blanks and errors. The default is 0.What's the difference between TOROW and TOCOL?
What's the difference between TOROW and TRANSPOSE?
Why does my TOROW result contain zeros?
ignore mode 0. Use =TOROW(range, 1) to skip blanks.Which Excel versions have TOROW?
#NAME?.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class