Skip to main content

Hi, I need to convert letters to their position in the alphabet. So A becomes 1, B → 2, C → 3 etc…


Does Airtable have a function to do that?


I’d like to avoid the multiple IF statements 🙃


Thank you

Welcome to the Airtable community!


No, Airtable does not have a built in function that converts a letter to a number. If you know that the field will have only a single letter, you can use a SWITCH statement instead of nested IFs.


SWITCH( {field name},
"A", 1,
"B", 2,
"C", 3,
...
"Z", 26
)

If your field will have multiple letters, you can use 26 nested SUBSTITUTE() functions. Note that the result will be a string that looks like a number, but not an actual number unless you wrap a VALUE() function around it.


Reply