
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 19, 2023 05:34 AM
My field has a name followed by a number - SAM ADAMS (1234). I need to put the 1234 in it's own field. What is the best way to write a formula to do that?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 19, 2023 08:30 AM
Try this:
MID({field name}, FIND("(", {field name})+1, LEN({field name})-FIND("(", {field name})-1)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 19, 2023 05:06 PM
Here is the formula using Regex.
IF(
{Name&Number},
REGEX_EXTRACT(
{Name&Number},
"\\((\\d*)\\)$"
)
)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 19, 2023 05:22 PM
Actually, I just looked this up — this is the formula you would use to extract numbers from a string of text:
IF(
{text},
REGEX_REPLACE({text}, "\\D", "")
)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 26, 2023 11:20 AM
Thanks, Scott. I used an alternative method not the regex function.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Oct 26, 2023 01:09 PM
Another way of doing this could be to use Airtable's VALUE() function, but that is highly unpredictable since it also performs math! So use that one with caution.
