Description
The Val (str) function reads a string containing Numbers (example: an address, phone number, or social security number) and converts them to a decimal value.
Action
The Val (str) function reads a string containing Numbers (example: an address, phone number, or social security number) and converts them to a decimal value. Val stops reading the string when it finds the first character in the string that it finds that it cannot recognize as a number or as a space.
Typical uses
Use this function to extract only the numeric portion of a string that contains both numbers and text. For instance, you can extract only the street number from an address, or only the numeric portion of an ID that contains letters and numbers.
Examples
Val("2234 100th Street")
Returns 2234100.