Last updated: August 26, 2026.
The Val function reads the numeric prefix of a string and returns a number.
Syntax
Val(string)| Argument | Description |
|---|---|
string | Text expression beginning with the number to extract |
Examples
Val("123.45 USD") ' 123.45
Val(" -18 items") ' -18
Val("USD 123") ' 0Val recognizes a period as the decimal separator. For locale-aware conversion of user input, validate the format and use an appropriate conversion function such as CDbl instead.
See Microsoft’s Access function reference for related expression functions.