Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sort sentenes based on word

Status
Not open for further replies.

QASA25

Technical User
Jun 23, 2005
63
NL
Hi all i got a list of sentences and i want to sort them baced on word that that can be find on them. could any one tell me how to do this in ms word. I want to be able to type a wrod for example Linux and it goes findes all the sentences with word on them and put those sentence one after each other.Thanks
 
Turn the sentences into separate paragraphs, using Replace; [. ] to [^p],

Then convert text to table. If you needed to sort by the first word, that would be easy. If it is a selected word, then add a second column to the table and manually place the word in that column for each sentence. Sort on that, and then remove the extra column.

Finally convert the table back to text. You can also use 'Replace' to re-join the sentences. (Check the [More] and [Special] options on Replace for lots more options.)

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thank u for u reply. Well the sentences are one in each line for example :

.....Linux.........
..... microsfot.....
.....microsfot.....
.......Linux.........
.....microsfot.....
.....Linux.........
.....microsfot.....
.....Linux.........

now i want put lines that has word linux one after each other . I do not think that metho that u suggest produce this result!
 
So create an extra column using the word you do want.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top