Skip to main content

Excel TOCOL function

Author: Siluvia Last Modified: 2022-09-22

The TOCOL function transforms an array or range to a single column.

Note: This function is only available in Excel for Microsoft 365 on the Insider channel.

TOCOL function VS. TOROW function

The TOCOL function can be used to transform an array or a range to a single column, while the TOROW function can be used to transform an array or a range to a single row.

Syntax

=TOCOL(array, [ignore], [scan_by_column])

Arguments

Array (required): An array you want to transform to a single column.
Ignore (optional): To ignore certain types of values. By default, all values are kept.
-- 0 or omitted: Keep all values (default);
-- 1: Ignore blanks;
-- 2: Ignore errors;
-- 3: Ignore blanks and errors.
Scan_by_column (optional): How the function scans the array.
-- FALSE or omitted: The array is scanned by row (default);
-- TRUE: The array is scanned by column.

Return value

It returns a single column.

Example

Here we take the table below as an example to demonstrate the different uses of the TOCOL function.

#Example1: Transform a range to a single column and keep all values by default

For example, you want to take only the first three rows or columns from the sales table. You can apply one of the formulas below to get it done.

The range above contains both blanks and error values. To transform the range to a single column and keep all values in the resulting column, please apply the following formula.

Select a cell, such as H6 in this case, enter the following formula and press the Enter key to get the new column.

=TOCOL(B6:F9)

Notes:

1) In this case, we omitted the Ignore and the scan_by_column arguments in the formula.
2) Blank cells are displayed as 0 in the resulting column.
#Example2: Transform a range to a single column and ignore certain types of values

To ignore all blanks, you just need to specify a number 1 for the ignore argument. The formula is as follows.

=TOCOL(B6:F9,1)

To ignore error values, specify the number 2 for the ignore argument. The formula is as follows.

=TOCOL(B6:F9,2)

To ignore both the blanks and errors, specify a number 3 for the ignore argument.

=TOCOL(B6:F9,3)

#Example3: Transform a range to a single column by scanning values by column

By default, the TOCOL function scans the array by rows. If you need to return a single column from the array scanned by column, you need to set the scan_by_column argument to TRUE.

Select a cell, say J6 in this case, enter the following formula and press the Enter key to get the new column.

=TOCOL(B6:F9,3,TRUE)


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations