ARRAYTOTEXT function in Excel allows you to convert an array of values into a single text string. It can be useful for consolidating data or preparing it for presentation or analysis.
Syntax
=ARRAYTOTEXT(array, delimiter, [skip_blanks])
Arguments
array | The range or array of values you want to convert to text. |
[format] | (optional) Output format. 0 = concise (default), and 1 = strict. |
How to use
Let’s look at some examples of how to use the ARRAYTOTEXT function:
1 2 3 |
=ARRAYTOTEXT(A1:A5, 0) // 1, 2, 3, 4, 5 =ARRAYTOTEXT(A1:A5, 1) // {1;2;3;4;5} |
This formula will take the values in cells A1 to A5 and separate them with a comma and a space, creating a text string like “Value1, Value2, Value3, Value4, Value5.”
Additional information
It’s important to note that the ARRAYTOTEXT function is particularly useful when you need to create a comma-separated list of values or when you want to consolidate data from multiple cells into a single text string.