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

**URL:** <https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482>\
**Category:** Factual Questions\
**Created:** [July 21, 2016, 10:00am UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482 "2016-07-21T10:00:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mean\_Mr.Mustard](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mean_mr.mustard/32/3865_2.png) [@Mean\_Mr.Mustard](https://boards.straightdope.com/u/Mean_Mr.Mustard)\
**Post date:** [July 21, 2016, 10:00am UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/1 "2016-07-21T10:00:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)\
**Post date:** [July 21, 2016, 11:12am UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/2 "2016-07-21T11:12:50Z")

</div>

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.

> [@](#):
>
> To sort a list that contains titles that begin with one of the initial articles, follow these steps:
> 
> Enter the following data in a worksheet:  
> A1: Title  
> A2: A Kiss Before Dying  
> A3: Kiss Me, Kiss Me, Kiss Me  
> A4: The Kissing Place  
> A5: A Kid in King Arthur’s Court  
> A6: The Egg and I  
> A7: Kentucky Blue  
> A8: An Egg Named Ed
> 
> Type the following formula into the worksheet:  
> 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)))
> 
> With cell B2 selected, grab the fill handle and fill the formula down through cell B8.  
> Click cell A3.  
> On the Data menu, click Sort. In the Sort By list, click Column B, and click OK.  
> The sorted data will now look like the following:  
> A1: Title  
> A2: The Egg and I  
> A3: An Egg Named Ed  
> A4: Kentucky Blue  
> A5: A Kid in King Arthur’s Court  
> A6: A Kiss Before Dying  
> A7: Kiss Me, Kiss Me, Kiss Me  
> A8: The Kissing Place

[https://support.microsoft.com/en-us/kb/151447](https://support.microsoft.com/en-us/kb/151447)

---

<div class="post-metadata">

**Author:** ![Nava](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Nava](https://boards.straightdope.com/u/Nava)\
**Post date:** [July 21, 2016, 12:54pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/3 "2016-07-21T12:54:23Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Boyo\_Jim](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Boyo\_Jim](https://boards.straightdope.com/u/Boyo_Jim)\
**Post date:** [July 21, 2016, 4:15pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/4 "2016-07-21T16:15:25Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![up\_the\_junction](https://avatars.discourse-cdn.com/v4/letter/u/f1d935/32.png) [@up\_the\_junction](https://boards.straightdope.com/u/up_the_junction)\
**Post date:** [July 22, 2016, 6:04pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/5 "2016-07-22T18:04:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [July 22, 2016, 8:15pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/6 "2016-07-22T20:15:57Z")

</div>

> [@Nava](#):
>
> 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.

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…

---

<div class="post-metadata">

**Author:** ![Boyo\_Jim](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Boyo\_Jim](https://boards.straightdope.com/u/Boyo_Jim)\
**Post date:** [July 22, 2016, 8:25pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/7 "2016-07-22T20:25:23Z")

</div>

What about titles that begin with two articles, like _And the Band Played On_?

---

<div class="post-metadata">

**Author:** ![bibliophage](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bibliophage/32/7615_2.png) [@bibliophage](https://boards.straightdope.com/u/bibliophage)\
**Post date:** [July 22, 2016, 8:32pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/8 "2016-07-22T20:32:50Z")

</div>

_And_ is a conjunction, not an article. In English, _the_, _a_, and _an_ are the only articles.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [July 24, 2016, 6:56pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/9 "2016-07-24T18:56:15Z")

</div>

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

> **[Alphabetize a list in alphabetical order - and much more!](https://alphabetizer.flap.tv/)**
>
> Alphabetize lists and much more! A free website application for sorting text. Does ABC order in no time!

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 24, 2016, 7:25pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/10 "2016-07-24T19:25:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [July 24, 2016, 7:31pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/11 "2016-07-24T19:31:04Z")

</div>

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.

> [@septimus](#):
>
> 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

Easy for you to say.

---

<div class="post-metadata">

**Author:** ![Nava](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Nava](https://boards.straightdope.com/u/Nava)\
**Post date:** [July 25, 2016, 7:59am UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/12 "2016-07-25T07:59:04Z")

</div>

> [@Quercus](#):
>
> 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…

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

---

<div class="post-metadata">

**Author:** ![chappachula](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@chappachula](https://boards.straightdope.com/u/chappachula)\
**Post date:** [July 25, 2016, 11:55am UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/13 "2016-07-25T11:55:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [July 25, 2016, 1:22pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/14 "2016-07-25T13:22:52Z")

</div>

> [@Nava](#):
>
> The original didn’t copy lines with no articles. In the copied column, those spots would have been blank.

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.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [July 25, 2016, 1:53pm UTC](https://boards.straightdope.com/t/microsoft-word-is-it-possible-to-sort-a-list-that-ignores-articles-a-an-the/760482/15 "2016-07-25T13:53:36Z")

</div>

> [@Quercus](#):
>
> 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.
