EXTRACT specific number to the left of specific text

Hi,

I have some text in a long text column. The text often says “8 apples” at some point in the text.

Can I use EXTRACT to isolate the number 8?

I can do this in the sheet but would prefer to do in appsheet

Also can I EXTRACT the two digits before “apples” in case there are 10 or 11.

Thanks

Phil

@Phil_Waite,
May be this

RIGHT(LEFT([LongText String], FIND([Specific Text], [LongText String])-1),3)

Example:
[Long Text String]: “A has 9 oranges and 10 apples”
[Specific Text]: “apples”
Expression Result: 10

3 Likes