Forum Discussion
Checking a column for alpha and alpha numeric characters
- 8 years ago
You can use the Value function together with IsError.
Like this:
IsNum = NOT(ISERROR(VALUE([Phone])))
If you want to alow dahes between the numbers you can add a SUBSTITUTE function around the [Phone] field.
IsNum = NOT(ISERROR(VALUE(SUBSTITUTE([Phone];"-";""))))
Hope this helps.
You can use the Value function together with IsError.
Like this:
IsNum = NOT(ISERROR(VALUE([Phone])))
If you want to alow dahes between the numbers you can add a SUBSTITUTE function around the [Phone] field.
IsNum = NOT(ISERROR(VALUE(SUBSTITUTE([Phone];"-";""))))
Hope this helps.
- whitakerj8 years agoRegular Visitor
Thank you very much!
- Romain_FOURNIER6 years agoFrequent Visitor
Hello,
Thank for the solution :
IsNum = NOT(ISERROR(VALUE([Phone])))
It seems to work most of the time :
NOT(ISERROR(value([ColumnWithLetters]))) gives FALSE.NOT(ISERROR(value([ColumnWithLeadingZeros]))) gives TRUE.
NOT(ISERROR(value([ColumnWithNULLValue]))) gives FALSE.Unfortunately, it does not work for empty fields (which are not numbers) :
NOT(ISERROR(value([ColumnWithEmptyValue]))) gives TRUENB : NOT(ISERROR(value(""))) works : it gives FALSE.
Here is an alternative partial solution (digits from 0 to 9 are encoded from 48 to 57, See https://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin) :
IsNum = UNICODE([Phone])>=48) && UNICODE([Phone])<=57Howerver, this formula tests only the first character of the string :