Formula to Extract letters only from String

I have afield with inventory numbers. There numbers start with a bin letter designator and then a number. ex, A2, G22, AA15, AB21

I was using the LEFT function to grab the First character to identify the bin letter, but now that I have grown and now have bins AA, AG, etc. How to I have have Airtable grab just the letters out of the field or grab two letters is the inventory has one?


1 Like

Hi @Ty_Andrea_Tidwell

The simplest way to do this is to use the VALUE() function which will extract the numeeric part from the inventory number.

Hope this helps…

How can I use this to extract the BIN Letter?

I think what @Julian_Kirkness is intimating is that using Value() to know the numbers in the string, you are now in a position to know the length of the number portion as well as the length of the entire string and by deduction, the length of the letters portion.

You see where this is going? :wink:

Thanks @Bill.French - very kind but actually I misread the question! Although of course your suggestion that this allow you to find the length is clearly the way forward.

However, there is one issue and that is that the LEN() function doesn’t work on a number - so you need to convert the VALUE(Bin) (I’ve used a field called Bin for the whole Inventory Number) to a string by adding a Zero length string ("") to it. The formula then ends up as:

Turn’s out it wasn’t so obvious but hopefully this should be the answer.


Perfect, thank you very much

As a Javascript nerd with vast hubris, I just assumed that everyone knew I meant .toString().length(). :wink:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.