May 27, 2019 06:49 PM
hi i have a column with codes like this “0010o00002Fs719AAB”
What will the formula to extract the 8 of the code?
it should become Fs719AAB.
Thanks in advance!
Chris
Jul 15, 2021 02:45 PM
Thank you for the swift response, @Justin_Barrett - I’m sadly getting that same pesky #ERROR! message.
I didn’t mention that the currency data I’m trying to pull from is a lookup result from another tab. Does that matter?
I’ve attached a screen shot in case it’s useful
Jul 15, 2021 04:10 PM
Yes. Lookup fields return arrays, not single values, and Airtable’s regular expression functions only operate on strings. This can be fixed by concatenating the lookup field output with an empty string, which force-converts it to a string.
IF({Reward Total}, REGEX_EXTRACT({Reward Total} & "", "[\\d,]+"))
When a lookup field is only pulling from a single linked record (as in your situation), it still returns an array, but there are limited instances where Airtable will auto-convert that array to a single data type. It’s tough to keep track of all of the options, so I ran a lot of tests and documented my findings here:
I’m also working on a course all about Airtable formulas. It’s not going to be ready for another month or two, but my rough edit currently runs over an hour. If learning the ins and outs of Airtable’s formula system is something that interests you, keep an eye out for when the course is released.
Aug 26, 2021 06:00 PM
Thanks @Justin_Barrett - late response from me but appreciate your help!
Would love to join your formula course once it’s available!