Article ID: 111868
Article Last Modified on 9/19/2006
Expression Value Returned
--------------------------------------------
Val("1726 56th Ave NE") 172656
CInt("1726 56th Ave NE") Error message
Val("asdf") 0
Cint("asdf") Error message
Val("1,000") 1
CInt("1,000") 1000
Val("1.34") 1.34
CInt("1.34") 1
Because the Val function returns the value 0 when used with an expression
that contains either 0 or no numbers at all, you cannot use it to test
whether an input string is a valid number. You can, however, use the CInt function in a procedure to determine whether an input string is a valid number.
CInt
Additional query words: W_eXcel
Keywords: KB111868