VAL() converts a character expression to a numeric value. This function is the opposite of STR(), which converts numbers to strings. VAL() processes the string from left to right, converting numeric characters until it encounters a non-numeric character. If it encounters a non-numeric character before finding any numbers, it returns 0.
VAL(string)
VAL() returns a numeric value
// Basic numeric conversion
VAL("12.085") = 12.085
// Negative number conversion
VAL("-10") = -10
// Conversion with trailing non-numeric
VAL("5548A") = 5548
// Conversion with multiple non-numeric
VAL("5548A-12345") = 5548
// Non-numeric at start
VAL("A-5548-12345") = 0
// Additional examples
VAL("123.45") = 123.45 // Decimal number
VAL("0.001") = 0.001 // Small decimal
VAL("1000") = 1000 // Integer
VAL("1E3") = 1000 // Scientific notation