Text function

VALUETOTEXT function

Converts any value to text. In strict mode text is wrapped in quotes, so the output can be pasted into a formula.

Available in Microsoft 365, Excel 2021 and later, Excel for the web, Excel for Mac 2021+

Excel 2021 and laterNot in Google Sheets

Syntax

VALUETOTEXT(value, [format])
ArgumentWhat it means
valueRequiredThe value to convert: text, number, logical value or a cell.
formatOptional0 (default) concise: the value as it would read. 1 strict: text values are wrapped in double quotes.

Returns: Text.

How VALUETOTEXT works

VALUETOTEXT turns a single value into text. In the default concise mode text stays as it is and numbers and logical values are written out as their stored value (1250.5, TRUE). It is the single-cell partner of ARRAYTOTEXT.

The strict mode (format 1) is what makes it different from simply joining with &"": text values are wrapped in double quotes while numbers are not. That makes it easy to build formula text, JSON-like strings or log messages where you must tell "42" (text) and 42 (number) apart - a common source of bugs when data arrives from imports.

Number formatting is ignored; use TEXT when you need a particular look.

Examples

1Concise mode keeps text as it is

C2fx=VALUETOTEXT(A2)
ABC
1CustomerBalance
2Northwind1250.5Northwind

Result: Northwind

Text in concise mode is returned unchanged.

2Strict mode quotes text

C2fx=VALUETOTEXT(A2,1)
ABC
1CustomerBalance
2Northwind1250.5"Northwind"

Result: "Northwind"

With format 1 the text is wrapped in double quotes, ready to be pasted into a formula.

3Numbers are never quoted

C2fx=VALUETOTEXT(B2,1)
ABC
1CustomerBalance
2Northwind1250.51250.5

Result: 1250.5

Even in strict mode the number stays unquoted and unformatted, which shows it really is a number.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!format is not 0 or 1.Use 0, 1 or leave it out.

Tips

  • Spot numbers stored as text: =VALUETOTEXT(A2,1) shows quotes around "42" if A2 holds text and no quotes if it holds a number.
  • For a whole range use ARRAYTOTEXT.

Google Sheets

Use TO_TEXT(value), or """" & value & """" to add quotes like the strict format.

VALUETOTEXT in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishVÆRDITILTEKST
FinnishARVO.TEKSTIKSI
FrenchVALEUR.EN.TEXTE
HungarianÉRTÉK.SZÖVEGGÉ
Norwegian (Bokmål)VERDITILTEKST
PolishWARTOŚĆ.NA.TEKST
RussianЗНАЧЕНИЕВТЕКСТ
SpanishVALORATEXTO
SwedishVÄRDETILLTEXT
TurkishDEĞERMETİN