NUMBERVALUE (convert text to a number, locale)

<< Click to Display Table of Contents >>

NUMBERVALUE (convert text to a number, locale)

Syntax:

NUMBERVALUE(Text [, DecimalSeparator] [, GroupSeparator])

Description:

Converts a text string into a number. The arguments DecimalSeparator and GroupSeparator allow you to format the text string in locale independent way.

Text is the value you want to convert to a number.

DecimalSeparator (optional) specifies which character is currently used to separate the decimal places in the text string.

GroupSeparator (optional) specifies which character is currently used in the text string to form groups of 1000s.

The result is returned as default format: without group separator and the zeros after the decimal separator are truncated.

Notes:

The following rules apply when using the NUMBERVALUE function:

If the arguments DecimalSeparator and GroupSeparator are not specified, the text string is returned according to the current locale.

If multiple characters are specified in DecimalSeparator or GroupSeparator, only the first character is used.

An empty Text string returns 0 as result.

Space characters within the Text string are ignored.

Multiple decimal separators in Text string returns the error value #VALUE!

If the decimal separator appears before the group separator in the Text string, this returns the error value #VALUE!

If the Text string cannot be understood as a number, this returns the error value #VALUE!

The % sign at the end of the Text string is treated as a percentage (i.e. the number is divided by 100). Multiple % signs cause the number to be divided several times by 100.

Example:

NUMBERVALUE("42") returns 42

NUMBERVALUE("42.44") returns 42.44

NUMBERVALUE("42,44") returns 4244

NUMBERVALUE("42,44",",",".") returns 42.44

NUMBERVALUE("42,000.44") returns 42000.44

NUMBERVALUE("42.000,44") returns #VALUE

NUMBERVALUE("42,000.44",",",".") returns #VALUE!!

NUMBERVALUE("42.000,44",",",".") returns 42000.44

NUMBERVALUE("42 0 0 0",",",".") returns 42000

NUMBERVALUE("42%") returns 0.42

NUMBERVALUE("42%%") returns 0.0042

Compatibility notes:

Microsoft Excel supports this function only in version 2013 or later. In older versions, the function is unknown.

See also:

VALUE