Help

Re: Formula to find if a field contains a number

1024 0
cancel
Showing results for 
Search instead for 
Did you mean: 
qwik3r
5 - Automation Enthusiast
5 - Automation Enthusiast

Hoping someone can assist me in creating a formula. 

Basically I want to take a field that has a numeric value in it and convert it to CM or if there is no number in that field output the text that is in it. 

e.g.

Field A contains value: 60 or contains value "not applicable".

Using a formula field I have 

{Field A} & " in, " & ROUND(VALUE({Field A}) * 2.54) & ' cm'.
 
The output would be "60 in, 152, cm" if it just contained numbers.
 
If that field instead contained text and no numbers I want to just output the text. It won't always be "not applicable" that's just an example. So I figure I might have to use the search() function with regex in the formula with an IF statement. So basically "if "field a" does not contain a number just output text".
 
Just not really sure how to do it! Any help would be great. 
1 Reply 1
qwik3r
5 - Automation Enthusiast
5 - Automation Enthusiast

Actually, think I figured it out:

 

IF(REGEX_MATCH({Field a}, "[0-9]"), {Field a} & " in, " & ROUND(VALUE({Field a}) * 2.54) & ' cm', {Field a})