What Bob said but his caveat is easily handled. I suggest when you create your list of data your DO NOT use comma or tab as the itemDelimiter. I tend to use | or numToChar(127) - which is invisible. If your data is going to contain remarks, or notes, as yours clearly is, then it will contain commas and tabs so this creates all sorts of hassles. Go with a character that is NEVER going to appear naturally in your data.
Once you do that, instead of: sort index1 by last word of each you do: sort index1 by item 2 of each assuming of course that item 1 contains one or more given names, and item 2 contains any combination of words and punctuation that makes up a Surname. HTH PS Never really understood why RunRev went with comma as an itemDelimiter when it appears so commonly in data that you are forever having to change the itemDelimiter to something less troublesome. Why not just go with ^ or | or ` or ~. Cue Richard and his link to his request never to create a CSV exporter, oh what the heck, I'll provide the link myself ;-) CSV Must Die <http://www.fourthworld.com/**embassy/articles/csv-must-die.**html>< http://www.fourthworld.com/embassy/articles/csv-must-die.html> _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode