StrToFloat
Converts a number's character string representation to its numerical value.
Syntax
StrToFloat(val)
val = string whose numerical value you want to calculate
Remarks
If val dopes not contain a representation of a number, the function will return #VAL!.
To specify a default value, see StrToFloatDef.
The format must be compatible with the ECMAScript standard. In particular, the period (.) is the only supported decimal separator (see 7.8.3 Numeric Literals).
Note that the conversion from string to number follows the JavaScript parsefloat conventions.
Examples
StrToFloat("3.14") = 3.14 (numerical value)StrToFloat("abc") = #VAL!StrToFloat("3,14") = #VAL! (commas are value separators, not decimal separators)