How to Use the ARRAYTOTEXT Function in Excel

Today, we’ll explore the ARRAYTOTEXT function, a powerful tool available in both Microsoft Excel and Google Sheets. This function converts an array into a text string, which is extremely useful for various data manipulations. Let’s take a closer look at how this function operates and examine some practical examples of its use.

Basic Syntax

The syntax for the ARRAYTOTEXT function is straightforward:

ARRAYTOTEXT(array, delimiter, order)
  • array: The range of cells or the array you wish to convert into a text string.
  • delimiter: The character used to separate the elements in the resulting text string. This parameter is optional. If omitted, a comma will be used as the default delimiter.
  • order: This parameter determines the sequence in which the array elements are arranged in the text string. It can be set to 1 (row by row) or 2 (column by column), with 1 being the default setting.

Examples of Usage

Showcasing the Array

Consider a table with random numerical values in Excel or Google Sheets:

Column A Column B Column C
10 20 30
40 50 60

Converting Array to Text

Suppose we want to convert the above array into a text string separated by a hyphen (-), and arranged row by row. We can achieve this with the following use of the ARRAYTOTEXT function:

=ARRAYTOTEXT(A1:C2, "-", 1)

The output will be: “10-20-30-40-50-60.”

Changing the Order

If we prefer to convert the array column by column using the same delimiter, we modify the function as follows:

=ARRAYTOTEXT(A1:C2, "-", 2)

This will produce the result: “10-40-20-50-30-60.”

These examples demonstrate how the ARRAYTOTEXT function serves as an effective tool for converting arrays into customizable text strings, whether you’re organizing data row by row or column by column. Integrating this function into your Excel or Google Sheets skill set will significantly enhance your data handling capabilities!

More information: https://support.microsoft.com/en-us/office/9cdcad46-2fa5-4c6b-ac92-14e7bc862b8b

Other functions
Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters
Converts a number to text, using the ß (baht) currency format
Returns the character specified by the code number
Removes all nonprintable characters from text
Returns a numeric code for the first character in a text string
Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments
Joins several text items into one text item
Changes half-width (single-byte) English letters or katakana within a character string to full-width (double-byte) characters
Converts a number to text, using the $ (dollar) currency format
Checks to see if two text values are identical
Finds one text value within another (case-sensitive)
Formats a number as text with a fixed number of decimals
Changes half-width (single-byte) characters within a string to full-width (double-byte) characters
Returns the leftmost characters from a text value
Returns the number of characters in a text string
Converts text to lowercase
Returns a specific number of characters from a text string starting at the position you specify
Converts text to number in a locale-independent manner
Extracts the phonetic (furigana) characters from a text string
Capitalizes the first letter in each word of a text value
Replaces characters within text
Repeats text a given number of times
Returns the rightmost characters from a text value
Finds one text value within another (not case-sensitive)
Substitutes new text for old text in a text string
Converts its arguments to text
Formats a number and converts it to text
Combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined If the delimiter is an empty text string, this function will effectively concatenate the ranges
Removes spaces from text
Returns the Unicode character that is references by the given numeric value
Returns the number (code point) that corresponds to the first character of the text
Converts text to uppercase
Converts a text argument to a number
Returns text from any specified value