Ignoring Selected Words when Sorting

Arn has a need to exclude certain words when sorting a column. For instance, he is trying to exclude “The” when sorting a list of movie titles, so that “Alpha, Charlie, The Bravo” would sort as “Alpha, The Bravo, Charlie.”

There is no built-in way to do this. The best solution is to set up an intermediate column for your data. This column can contain the modified movie titles, and you can sort by the contents of the column. For instance, if column A contains your original movie titles, you could fill column B with formulas, such as this:

=IF(LEFT(A1,4)="The ",MID(A1,5,LEN(A1)-4),A1)

This formula will strip the word “The” (with its trailing space) from the start of the line. If you want to add the word “The” at the end of the string, then you could modify the formula in the following manner:

=IF(LEFT(A1,4)="The ",MID(A1,5,50),A1) & ", The"

If you wanted to delete all instances of the word “the” without regard to where it appeared in the title, you could use the following instead:

=SUBSTITUTE(A1,"the ","")

Sorting, again, would be done by the results shown in column B. This will give the list in the desired order.