Microsoft Word: Is it possible to sort a list that ignores articles (a, an, the)?

I want Word so sort this list:

A Day in the Life
Mean Mr. Mustard
The Fool on the Hill

Into this (automagically):

A Day in the Life
The Fool on the Hill
Mean Mr. Mustard

Possible? (Googling only gave me answers related to Excel)

Thanks,
mmm

I doubt very much that you can do it in Word. You can copy it into an Excel Table and do it there as you probably found out.

https://support.microsoft.com/en-us/kb/151447

I think the formula as given is only going through the IFs for when there is an article; a final case for when there is no article is needed. Note that in the example given, everything does have an article. It’s also missing a parenthesis.

B2: =(IF(LEFT(A2,2)="A ",RIGHT(A2,LEN(A2)-2),IF(LEFT(A2,3)= "An ",RIGHT(A2,LEN(A2)-3),IF(LEFT(A2,4)="The ",RIGHT(A2, LEN(A2)-4),A2)),A2)

I think you might be able to create a macro in Word using Visual Basic to accomplish the same thing, but I don’t think you can do it without any external tools. I agree that Excel is a Better tool.

I use a very similar formula to sort my music library artist names, mostly to ignore band names that start with “The”.

Sort in Excel then remove the lines: View tab > Remove gridlines

I think the original is correct, even for when there are no articles; if there are no articles found, the IF’s all fall down to the last A2 (before the three right parentheses). By my quick count, the parentheses are correct in the original, too.

I suppose someone who really cares about The Truth could paste it into Excel and see whether it really works or not…

What about titles that begin with two articles, like And the Band Played On?

And is a conjunction, not an article. In English, the, a, and an are the only articles.

There’s no reason to reinvent the wheel. Just copy and paste it and sort it here, checking the “Ignore articles” checkboxes:

It can be done with relative ease from a Unix command-line:

sed -e ss^s,\ s -e ss,\ A\ s,A\ s -e ss,\ An\ s,An\ s -e ss,\ The\ s,The\ s | sort -k 2 | sed ss,\ *ss

If you can enter, prepare, or scrub the data in advance, you can change “A Day in the Life” to “Day in the Life, A” and a normal sort will be just fine.

You can also leave the title as is if you think a special title deserves a special treatment, something you can’t do with a general parsing formula.

I used to do this with song titles before Excel was a gleam in Wee Willy’s eye.

Easy for you to say.

The original didn’t copy lines with no articles. In the copied column, those spots would have been blank.

Can you convert the .doc file into a plain old text file?
If so, it’s really easy to sort, using an old DOS command from 2 decades ago.

Switch the computer out of Windows and into DOS mode. This is called the “command line”.
Type in the command:
SORT /+6 <myOldfilename >myNEWfilename.

This command opens myoldfile and copies it to myNEWfile, while sorting it by the letters in starting in the 6th column of each line.

(obviously, you can change the number 6 as necessary)
(oops, on editing I realize that this isn’t quite what you want. It will do the sort and ignore the words A and The, but for titles without an article, you would have to move the text on each line so that the first word starts in the 6th column.

Hmm. I just checked with my copy of excel (pasting it in unedited) and it works correctly for lines with no articles… for instance, the “Kentucky Blue” line in the example.

Also, “Kiss Me, Kiss Me, Kiss Me,” another title without an article, is in the example.