On Sat, 24 Nov 2007 07:52:00 +1300, Himself <himself@himself.com> wrote: > 1. Created in Excel and had no space at the end of the names. > 2. Screen captured and imported with a single space at the end of the names. > 3. Screen captured and heavily edited resulting, in two spaces at end of > names. > > So hence the sorting result was not as expected. > Now the trick will be to remove all the unwanted spaces from 3000 cells, the > lazy way. Any suggestions ? Yup. Are you on anything other than Windows? If so, piece of cake with built-in Unix stuff on your system. Otherwise, do this: (I'm winging it but this should work) Export your data to a CSV file Open up the CSV file in your favorite editor (notepad if it can do search/replace) Find all instances of this (without the quotes): " ," and replace it with "," (again, without the quotes) Do it a second time to take care of the ones which were " ," but are now " ," Save it, get out of your editor, and then open the CSV file with Excel. Done. Let me know if that works - otherwise I can probably get exotic if needed. Dave
"Dave Hinz" <DaveHinz@gmail.com> wrote in message news:5qommeF10lbqhU3@mid.individual.net... > On Sat, 24 Nov 2007 07:52:00 +1300, Himself <himself@himself.com> wrote: > >> 1. Created in Excel and had no space at the end of the names. >> 2. Screen captured and imported with a single space at the end of the >> names. >> 3. Screen captured and heavily edited resulting, in two spaces at end of >> names. >> >> So hence the sorting result was not as expected. >> Now the trick will be to remove all the unwanted spaces from 3000 cells, >> the >> lazy way. Any suggestions ? > > Yup. Are you on anything other than Windows? If so, piece of cake with > built-in Unix stuff on your system. Otherwise, do this: (I'm winging it > but this should work) > Export your data to a CSV file > Open up the CSV file in your favorite editor (notepad if it can do > search/replace) > Find all instances of this (without the quotes): " ," and replace it > with "," (again, without the quotes) > Do it a second time to take care of the ones which were " ," but are > now " ," > Save it, get out of your editor, and then open the CSV file with Excel. > Done. > > Let me know if that works - otherwise I can probably get exotic if > needed. Thanks. No need to get exotic as your description worked. I used Notetab Lite and replaced a total of 5678 instances over multiple columns, some of which I don't need to sort on yet. Getting back to basic DOS applications can solve many problems, but I tend to forget it is an option. Trying the TRIM option within Excel didn't but I must have got the syntax wrong as it just gave #VALUE, at which point I didn't understand. Keith