Hello, Kindly help to correct the formula. IF Contains[ACCOUNT], [0-9] THEN "" ELSE [ACCOUNT] ENDIF
To check if a field named [ACCOUNT] that is a string contains any digits and return an empty string if it does, and the original field otherwise.
Thank you.
Solved! Go to Solution.
@Elena_B1 One way of doing this with the Regex_CountMatch function
IIF(REGEX_CountMatches([Account], '\d') > 0, '', [account])
IF Regex_Match([ACCOUNT],".*\d.*")=-1 THEN "" ELSE [ACCOUNT] ENDIF
Edit: just beat me @binuacs, great solution too!
The contains formula needs parentheses to be in proper syntax.
IF Contains([ACCOUNT], [0-9]) THEN "" ELSE [ACCOUNT] ENDIF
The problem you will still run into is that it will be looking for a column named [0-9] and expecting a string there, so it wont really do what you want it to do.
You may have better results using a regex match formula
if REGEX_Match([Account],".*[0-9].*") then "" else [Account] endif