Convert a String to a Number With Val().

 

The Val() function converts a string to a number. If there is an error, the result will be 0. The decimal point character must always be given as "."

Example:

Val ("3.141")                Result: 3.14

 

The "LocVal()" functions converts a string to a number and presents the result in a format that is valid for the country.

Examples:

LocVal ("12.00","de-de")          Result: 12,00

LocVal ("12.00","en-us")          Result: 1200,00