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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Word tables

Status
Not open for further replies.

Rosebud

MIS
Jun 19, 1999
73
US
I've a client who has a large Word table with first name, last name in one field. She, of course, wants the data sorted by last name. What is the process for splitting the data in those cells so that this sorting can take place.

Thanks!
 
Copy and paste into Excel.
Insert a new column B (or even a few blank columns just to be safe).
Select column A and hit Data-Text to columns....

When you're done, copy back to Word.
You can sort now.

If it's already only ONE fname and ONE lname in the cell, you MIGHT be able to use the sort in Word, but I didn't test it.

Anne Troy
VBA Coders, please help:
 
I wouldn't know if the following actually works or not since I've been unable to figure out why my options (except "case sensitive") are grayed out. Using Office 2000 / Windows 2000 / Sorting language = English U.S.

But, in case you want to test it on a few entries, here it is...

Before initiating the sort, place nonbreaking spaces between all combinations such as:

Dr. John E.
Walsh, Jr.

so that there is only one "regular space" in each entry with the regular space being the one preceding the last name.

Table > Sort
Options button
Other
space (type a single space with the spacebar)

 
Thanks, Dreamboat ... I was hoping that this could all be accomplished without leaving Word 2003, but I guess not.

dcompto - thanks for your ideas but that sorts by first name and we need to break the names apart and sort by each last name.
 
OK, I finally figured it out and it works great. Of course, it would be a speedier process if nonbreaking spaces were already where they should be.

First, if there is anything more than FirstName LastName in the name field, all spaces EXCEPT THE SPACE PRECEDING THE LASTNAME must be NONBREAKING spaces. Then proceed...

Table > Convert > Table to Text
Separate Text with Tabs
Table > Sort
Options button
Other
Space (type a single space in the "Other" field)
OK
Sort by Word 2
Then by Word 1
OK
Table > Convert > Text to Table
Separate text at Tabs
OK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top