Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

The VALUETOTEXT function returns text from any specified value. It passes text values unchanged, and converts non-text values to text.   

Syntax

VALUETOTEXT(value, [format])

The VALUETOTEXT function syntax has the following arguments.

Argument

Description

value   

The value to return as text. Required.

format   

The format of the returned data. Optional. It can be one of two values:

   Default. Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied.

   Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers and Errors.

If format is anything other than 0 or 1, VALUETOTEXT returns the #VALUE! error value.

Examples

Copy the example data in the following table and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.

Note      To convert "Seattle" to a linked data type, Select cell A6, and then select Data > Geography.

Data

TRUE

1234.01234

Hello

#VALUE!

Seattle

1234

Concise Formula

Concise Result

Strict  Formula

Strict Result

=VALUETOTEXT(A2, 0)

TRUE

=VALUETOTEXT(A2, 1)

TRUE

=VALUETOTEXT(A3, 0)

1234.01234

=VALUETOTEXT(A3, 1)

1234.01234

=VALUETOTEXT(A4, 0)

Hello

=VALUETOTEXT(A4, 1)

"Hello"

=VALUETOTEXT(A5, 0)

#VALUE!

=VALUETOTEXT(A5, 1)

#VALUE!

=VALUETOTEXT(A6, 0)

Seattle

=VALUETOTEXT(A6, 1)

"Seattle"

=VALUETOTEXT(A7, 0)

1234

=VALUETOTEXT(A7, 1)

1234

See Also

ARRAYTOTEXT function

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.