The VALUETOTEXT function converts a value’s data type to text. Its output is always a text value. It has two modes of operation: in default mode values are transformed into text and formatted according to the rules of Excel’s general format, and in strict mode text is generated which can be included in a formula. Strict mode augments default mode’s behaviour by replacing every double quote with 2 double quotes (“”) and enclosing the result as a whole between double quotes (“). For example, strict mode transforms the value xx”x into “xx””x”.
Invocations of the VALUETOTEXT function take the form:
Used to set VALUETOTEXT’s mode of operation. It can assume one of two values:
Value
Description
0
Default mode. A value supplied to the value argument is transformed into text and formatted according to the rules of Excel’s “General” format.
1
Strict mode. Generate values which can be included in formulae. A value supplied to the value argument is transformed into text and formatted according to the rules of Excel’s “General” format, has all instances of ” replaced with “” and the final output is enclosed between two ” characters.
Related Functions
Function
Example
Purpose
Examples: Explanatory Notes
Results of examples demonstrating the behaviour of VALUETOTEXT when operating on values of type currency, error, geography and stock were generated with the formulae VALUETOTEXT(<value>,0) and VALUETOTEXT(<value>,1).
They relate to default and strict mode respectively.
<value> represents a cell containing an example’s “‘Value’ argument“.