Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Formula to Extract letters only from String

Topic Labels: Formulas
Solved
Jump to Solution
4541 6
cancel
Showing results for 
Search instead for 
Did you mean: 
Ty_Andrea_Tidwe
5 - Automation Enthusiast
5 - Automation Enthusiast

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?

Thanks,

1 Solution

Accepted Solutions
Julian_Kirkness
10 - Mercury
10 - Mercury

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:

34

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

See Solution in Thread

6 Replies 6

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? :winking_face:

Julian_Kirkness
10 - Mercury
10 - Mercury

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:

34

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

Ty_Andrea_Tidwe
5 - Automation Enthusiast
5 - Automation Enthusiast

Perfect, thank you very much

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