• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How can I alphabetize sentences in word?

Hi,

I have about 140 pages of statements and sentences compiled into a word document. These are mainly notes, ideas, thoughts, etc. I compiled it from several other documents I put together. I was wondering if there was a program or filter that would reorder these statements alphabetically starting with the first letter of the sentence. Anything like that around? I know i have duplicate statements all over this thing and I would rather not sort it by hand.

Thanks!

Jason
 
Heh, here's what happens when you've had too much caffeine. This assumes you have MS Excel. Try it first on a small section of the text before doing all of it. Anyway, copy your text to notepad and save it as a plain text file.

1) Import it into Excel (Data->Import External Data), making sure to Delimit the text using (.) periods. After importing, each sentence should be in separate columns in the same row [Row A].
2) Cut the entire row, do a paste special on the row below it and make sure you click Transpose. You should now have multiple rows containing separate sentences.
3) To eliminate extra spaces in front of the sentence, add a new formula in cell B1 as follows: =TRIM(A1). Fill the formula down all the way through the rest of column B.
4) Data->Sort on column B.
5) Copy column B, go to Word, Paste Special->Unformatted text.

It's not perfect, but it'll get you off to a good start. There are several problems with this method, just one of which is that it assumes all sentences end with a period (fix this by adding another formula: =CONCATENATE(B1,".")),.

I bet someone will post a "Data->Sort paragraph alphabetically" 5 minutes after this post.
 
perl, where '$doc' is your input file, and sentances are ended with periods:
$doc = join ".\n", (sort {uc($a) cmp uc($b)} (split /\s*\.\s*/, $doc));
 
Back
Top