Text Concatenation Operator: &

A & B

Evaluates «A» and «B», coerces their element values to text, and concatenates the result.

When concatenating numeric values to text, a number format is required to determine how the numbers should be rendered as text, what precision should be depicted, etc. The number format for the variable or User-Defined Function being evaluated is used. Only the number format for the whole variable is used -- if you have set cell-level formats (such as a different number format for a particular slice), this does not impact the behavior of the number-to-text coercion. If in doubt, you can use the NumberToText function to control the format of converted numbers before applying the & operator.


'Hello' & ' ' & 'world' → 'Hello world'
5 & 2 → '52'
['a', 'b'] & 'c' → ['ac', 'bc']


The need to coerce numbers to text using a particular format often arises. Instead of having to rely on setting the number format for the variable that you are defining for this purpose, you can use the NumberToText function.

See Also


You are not allowed to post comments.