PC Review


Reply
Thread Tools Rate Thread

Columns not sorting properly.

 
 
StargateFan
Guest
Posts: n/a
 
      16th Aug 2011
I'm stumped on this one - I had it happen once before but I don't
recall the fix. When I sort either manually or programmatically via a
recorded script, by name, there's a break in the sort so that I get 2
groups of alphabetically sorted names. In other words, half the
column is sorted A to Z and then after a name beginning with X, then
below that another group starts A-Z. I checked the format of the
celsl and they're all General. I removed all other sorts so as to
just leave either FIRST NAME, LAST NAME sort and tried going back and
forth but the columns remain badly sorted as described.

Anyone know what is the cause of this type of thing?

Thx. D

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      16th Aug 2011
On Aug 16, 6:33*am, StargateFan <IDon'tAcceptS...@NoJunkMail.com>
wrote:
> I'm stumped on this one - I had it happen once before but I don't
> recall the fix. *When I sort either manually or programmatically via a
> recorded script, by name, there's a break in the sort so that I get 2
> groups of alphabetically sorted names. *In other words, half the
> column is sorted A to Z and then after a name beginning with X, then
> below that another group starts A-Z. *I checked the format of the
> celsl and they're all General. *I removed all other sorts so as to
> just leave either FIRST NAME, LAST NAME sort and tried going back and
> forth but the columns remain badly sorted as described.
>
> Anyone know what is the cause of this type of thing?
>
> Thx. *D


Perhaps a TRIM would help. If all else fails, send to me at dguillett1
@gmail.com.
 
Reply With Quote
 
StargateFan
Guest
Posts: n/a
 
      17th Aug 2011
On Tue, 16 Aug 2011 04:55:24 -0700 (PDT), Don Guillett
<(E-Mail Removed)> wrote:

>On Aug 16, 6:33*am, StargateFan <IDon'tAcceptS...@NoJunkMail.com>
>wrote:
>> I'm stumped on this one - I had it happen once before but I don't
>> recall the fix. *When I sort either manually or programmatically via a
>> recorded script, by name, there's a break in the sort so that I get 2
>> groups of alphabetically sorted names. *In other words, half the
>> column is sorted A to Z and then after a name beginning with X, then
>> below that another group starts A-Z. *I checked the format of the
>> celsl and they're all General. *I removed all other sorts so as to
>> just leave either FIRST NAME, LAST NAME sort and tried going back and
>> forth but the columns remain badly sorted as described.
>>
>> Anyone know what is the cause of this type of thing?
>>
>> Thx. *D

>
>Perhaps a TRIM would help. If all else fails, send to me at dguillett1
>@gmail.com.


Wow, thanks! I never would have figured that out. Sure enough, I hd
extra spaces before the data in both columns. I copy/pasted the data
in the original sheet; then, on top of that, I discovered the text to
columns feature that I never knew anything about so that the original
LAST NAME, FIRST NAME was split into 2 columns. Something I didn't
anticipate, I told Excel to use the comma as the splitting criteria
(",") but I now strongly suspect I needed to use ", " including the
space. I'll test this out sometime to see if that was truly the
cause.

I couldn't figure out the TRIM thing and since I was rushed for time
just quickly went through and manually erased all the extra spaces.
Surprisingly, lots of websites talk about TRIM but none mentioned the
actual logistics. I suspect you have to add an extra column and
reference the faulty one with TRIM then probably you need to
copy/paste as values and then get rid of the original column(s). That
was too much work in the time I had to test, though. Someone seems to
have come up with a neat-looking TRIM add-in but that still seems to
leave a TRIM("A1") type column of data to deal with. Don't know if a
macro would have been best bet if I hadn't fixed this manually.

I'll know next time to to check for extra spaces if anything sorts
weird ever again. I really was going nuts because I just couldn't
figure out the cause. So thanks tons for the help. As always you
guys save the day and make us look competent in our Excel use at work
<lol><sigh>.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PLEASE HELP: Columns not sorting properly when I import from text sam Microsoft Access VBA Modules 5 9th May 2010 03:56 PM
freezing columns labels while sorting columns Stan Microsoft Excel New Users 1 3rd Dec 2009 11:30 AM
Not Sorting Properly EddieLampert Microsoft Access Reports 2 25th Apr 2008 09:42 AM
help with sorting text in columns to match other columns rkat Microsoft Excel Misc 1 11th Aug 2006 03:42 AM
No sorting event available when sorting DataGrid columns!!! =?Utf-8?B?TmFk?= Microsoft Dot NET Framework Forms 2 21st Apr 2005 02:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:48 AM.