Excel - VALUETOTEXT Function



VALUETOTEXT Function

The Excel VALUETEXT function transforms the field value into a text string, but the field that contains the text value will not be transformed and will retain the same value. It will retrieve the text values from a specific cell reference.

Finding specific information can become challenging when working with extensive spreadsheets that comprise numerous columns and rows without proper visibility cues. Manipulating extensive, voluminous, unstructured data is very time-consuming for users. To ease this problem, fourteen new Excel functions have been introduced in Excel 365. To overcome this problem, users may utilize the newly built-in functions like Filter, Unique, Lambda, Xlookup, etc.

Compatibility

The VALUETOTEXT function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web

Syntax

The syntax of the VALUETEXT function is as follows −

=VALUETOTEXT(value, [format])

Arguments

You can use the following arguments with the VALUETEXT function −

Argument Description Required / Optional
Value It specifies a value to be returned as a text. Required
format
  • format It represents a type of formatting of the retrieved text. Its value can be 0 or 1.
  • 0 This default value denotes standard formatting; the retrieved text will be unchanged.
  • 1 It indicates strict formatting, in which delimiters and special characters are included with the retrieved text. The resulting text would be embedded in the double quotes. However, double quotes will not be used if the resulting text has a Boolean value, Errors, and is in numeric form.
Optional

Examples of VALUETOTEXT Function

Practice the following example to learn the use of the VALUETOTEXT function in Excel.

Example 1

The VALUETOTEXT function in Excel is used to convert a numeric value into text format.

Solution

Step 1 − You need to develop a table consisting of two columns named Sample Data and Formula. Enter a few mixed entries in the first column as shown below image −

VALUETOTEXT Function in Excel

Step 2 − Enter the formula =VALUETOTEXT([@[Sample data]],1) in the B4 cell. Here, we employ the strict formatting value that is 1 in the second argument of the function. Evaluating the formula in the table is very interesting. If the VALUETOTEXT formula is written in one cell, the same formula will automatically apply to the remaining column cell.

VALUETOTEXT Function in Excel 1

Step 3 − Press the Enter tab to retrieve the computed text value as highlighted in below image.

VALUETOTEXT Function in Excel 2

As you can see in the above image, after applying the VALUETOTEXT function, only text data containing David John and World Cup are enclosed in double quotes, whereas other sample data remain the same.

Notice that the resulting text value remains unchanged even if we use 0 for the second argument. An error may occur if the second argument exceeds 1 or 0.

The VALUETOTEXT function works seamlessly with other functions, such as CONCATENATE, LEFT, RIGHT, IF statements, and many more, to build complex expressions that manipulate the text efficiently. It is similar to the ARRAYTOTEXT function, which works with arrays only.

Example 2

Using the CONCATENATE function with the VALUETOTEXT function.

Solution

Lets say you want to merge the total sales production with that of the North American region. To achieve this, you can enter the formula =CONCATENATE("North America:",VALUETOTEXT(B3,0)) in the C3 cell.

CONCATENATE function with the VALUETOTEXT function

Therefore, the VALUETEXT function will return the 2800 value, which is combined with the North America: text.

CONCATENATE function with the VALUETOTEXT function

Download Practice Sheet

You can download and use the sample data sheet to practice the VALUETOTEXT function.

Advertisements