[]
        
(Showing Draft Content)

VALUETOTEXT

This function converts a value to text.

Syntax

VALUETOTEXT(value, [format])

Arguments

Argument

Description

value

The value to convert.

format

Optional. Specifies the output format.

0 — Concise format (default).

1 — Strict format.

Return Value

Returns a text representation of the specified value.

Remarks

  • If omitted, format defaults to 0.

  • Output is always based on General format, regardless of the cell’s NumberFormat.

  • Empty values return an empty string.

  • In strict mode:

    • Text values are enclosed in double quotes.

    • Internal double quotes are escaped as "".

    • Boolean and numeric values are not quoted.

    • Most error values are not quoted. Dynamic array errors such as #SPILL! and #CALC! are enclosed in double quotes.

  • Date and time values are returned as their underlying serial numbers.

  • Function, lambda, rich values, and custom objects return their display representation.

  • Localized text depends on the current culture settings.

Examples

Formula

Result

=VALUETOTEXT(1234)

1234

=VALUETOTEXT("Hello",1)

"Hello"

=VALUETOTEXT(A1) (A1=2025/1/1)

45658

=VALUETOTEXT(#SPILL!,1)

"#SPILL!"

See also