Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Anna
 
Posts: n/a
Default How do you change sort defaults for combined text number & hyphen.

I'm trying to sort an array of part numbers such as (3000, 3000P, 3000-10,
3000-10P, 30000P) and would like them to appear in that order. But I see
that Excel ignores hyphens, which is part of the problem. Is there anyway I
can change the data sorting defaults so the part numbers appear is this order?
  #2   Report Post  
Myrna Larson
 
Posts: n/a
Default

Another part of the problem is that you want the data to be treated as a
number followed by text. Excel can't do that unless you either split the data
into 2 columns - number part and text part -- or you pad the numeric portion
on the left with spaces to the maximum possible length of the number (i.e. 5
digits in the data you show).

So let's say you use 2 "helper" columns in which you've done that split.
You'll have to put a space in the 2nd column for those entries that consist of
a number only (if it's blank, that row will sort to the bottom).

As for the hyphen problem, you can replace the hyphen with a character that
sorts after Z. One character that might work is character 158, an accented z.
Then you can sort with these 2 columns as the keys.

As far as I can see, this is the only way to get the order you want.

On Thu, 7 Apr 2005 20:23:03 -0700, "Anna"
wrote:

I'm trying to sort an array of part numbers such as (3000, 3000P, 3000-10,
3000-10P, 30000P) and would like them to appear in that order. But I see
that Excel ignores hyphens, which is part of the problem. Is there anyway I
can change the data sorting defaults so the part numbers appear is this

order?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text import wizard defaults? Bruce Bowler Excel Discussion (Misc queries) 4 April 3rd 23 10:57 AM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
how do I change the text case of imported data in excel? ArtLene Excel Discussion (Misc queries) 1 January 26th 05 07:08 AM
Can you change the defaults for Excel ? Nino Richards Excel Discussion (Misc queries) 1 December 15th 04 04:35 PM
change typed text to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"