PARSENUMBER function

PARSENUMBER(textualNumber) PARSENUMBER(textualNumber)

textualNumber — Text or { Text }

The text string containing a number.

Returns — Number or { Number }

The number found in the given text string.

Interprets a text string as a number and returns it. PARSENUMBER("18.4")PARSENUMBER("18.4") returns 18.4.

PARSENUMBER takes the language of the app into account when converting text strings to numbers. When PARSENUMBER is used with an app whose language is set to German, for instance, text strings representing numbers should use a comma (",") as a decimal separator. When PARSENUMBER is used with an app whose language is set to UK English, a decimal point (".") should be used. Language-appropriate thousands separators may be used.

This function is very flexible in terms of what input it can parse. For instance, PARSENUMBER("003,500.50 kg")PARSENUMBER("003,500.50 kg") returns 3500.5.

This function is specific to Calcapp.

Related functions

Examples

PARSENUMBER("18.4")PARSENUMBER("18.4")

Returns 18.4, if the decimal separator of the language the app is configured to use is a decimal point. If the decimal separator is a decimal comma, an error is returned.

PARSENUMBER({ "18.4", "-23" })PARSENUMBER({ "18.4"; "-23" })

Returns the array { 18.4, -23 }{ 18,4; -23 }, if the decimal separator of the language the app is configured to use is a decimal point. If the decimal separator is a decimal comma, an array of errors is returned.

PARSENUMBER("003,500.50 kg")PARSENUMBER("003,500.50 kg")

Returns 3500.5, if the decimal separator of the language the app is configured to use is a decimal point. If the decimal separator is a decimal comma, an error is returned.