|
|
|||||||
I am sure there is a cleaner way to do this.. Code:
Comments, suggestions are welcome. Thanks, Kent |
||||||||
|
|
|||||||
never mind.. here it is.. Code:
Kent |
||||||||
|
|
|||||||
Not quite right, for a start this will determine that "0" is non-numeric. Also, this will return true if the value is "123%n23". CInt() will convert as much of the string to numeric as it can, and return it, silently ignoring the non-numeric parts. A more accurate check might be: Code: If CStr($val)=CStr(CInt($val)) But you would have to deal with "" != "0", and things like "0001" would be deemed to be non-numeric. |
||||||||
|
|
|||||||
This is a far better proposition: Code: Function udfIsInt($i) This will return true for "" and "0001", but will return false for "123x456". Note, you can very simply convert this to a general "check that only these values are present" function by making the "valid" string an additional optional parameter. |
||||||||
|
|
|||||||
Richard, I appreciate your response on this. Please see the detail in the request to remove the thread - Please remove ISNUMERIC() UDF Thanks, Kent |