NUMBERVALUE converts text to a number, and you tell it which characters mean "decimal point" and "thousands". That makes it the right tool for data from other regions: a file exported from a European system, a price list that uses a comma for decimals, or text that your own settings would read wrongly.
The arguments
- text is the text to convert.
- decimal_separator is the character used for the decimal point in the text.
- group_separator is the character used between thousands in the text.
=NUMBERVALUE("1.234,56",",",".") returns 1234.56. The text uses a comma for decimals and a dot for thousands, and the formula says so. The same text passed to VALUE in a US setting would be read as the wrong number, or fail.
=NUMBERVALUE("12 500,90",","," ") handles a space as the thousands separator, as in many European and Scandinavian exports, and returns 12500.9.
The defaults
If you leave out the second and third arguments, NUMBERVALUE uses the separators from your regional settings. In a US setting, =NUMBERVALUE("1,250.75") returns 1250.75. That default is also the weakness: the same formula gives a different answer on a computer set to another region. When a workbook will be opened in several places, always state both separators.
Percentages and spaces
A percent sign at the end of the text divides the result by 100: =NUMBERVALUE("3.5%") returns 0.035, as long as "." is the decimal separator. Several percent signs divide more than once. Spaces anywhere in the text are ignored, even in the middle, so "3 000" can be read as 3000.
An empty string returns 0, not an error. That is easy to miss in a column with gaps.
When it returns #VALUE!
NUMBERVALUE returns #VALUE! when:
- the decimal separator appears more than once in the text,
- a group separator comes after the decimal separator,
- or the text has characters that can't be part of a number, such as units or letters.
=NUMBERVALUE("12 kg") fails. Strip the unit first with SUBSTITUTE.
NUMBERVALUE or VALUE?
VALUE follows your regional settings and can also convert dates and times. NUMBERVALUE converts numbers only, but you decide the separators. Use VALUE for data that matches your own settings and NUMBERVALUE for anything from outside.
Separators with more than one character
If you pass a longer string as a separator, only its first character is used. A thousands separator of ", " is treated as just ",". Remove units and other symbols before converting.