Sorting Titles that begin with "The"


If you’re like me, you like to catalog things. Like, perhaps, your movies. And you’re going to want to sort them by title. Which is no big deal… until you get to all of those movies that start with “The.” You don’t really want all of them in a lump in the T section, right? You’ve gotten spoiled by programs like iTunes that somehow ignore the word “The” when sorting.

Thanks to Airtable’s formula columns and string-handling capabilities, you can achieve the same effect. Let’s say you’re storing your movie titles in the Name column. All you need to do is:

  1. Look at the first four characters of the title.
  2. If the first four characters are "The " - chop them off, then add “, The” to the end of the title.
  3. Otherwise, just return the title as is.

This function:
IF(LEFT(Name, 4) = "The ", RIGHT(Name, LEN(Name) - 4) & “, The”, Name)
does just that. Sort on this column, and you’re all set. Hide the column if you don’t feel like looking at it.

Be sure to look at the first four characters and look for the space after “The.” Otherwise, you’ll pick up words like “Then” or “There.” Hope this helps!