Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Apr 14, 2023 03:10 PM
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
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Apr 14, 2023 03:48 PM
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})
Reply
