Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default sorting numbers with hyphens in excel

I am trying to sort a list of numbers, some of which contain hyphens. For
example I want to sort "65,66,66-1,67-1,68,69". Excel sorts it out as
"65,66,68,69,66-1,67-1". What I want it to give me is
"65,66,66-1,67-1,68,69". Any ideas on how to do this in a simple manner? I
have had some ideas thrown at me but they are all rather involved and I would
like to be able to sort in this manner often. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default sorting numbers with hyphens in excel

First, convert all your data to text. Various ways of doing this, a quick
way is to use the formula:
=TEXT(A1,"@")
and then do a copy, paste special - values
Next, select your data, sort, ascending, and choose "sort numbers as text"
option. Otherwise, XL will sort all the numbers first, and then all the text
strings.

--
Best Regards,

Luke M
"mb-76" wrote in message
...
I am trying to sort a list of numbers, some of which contain hyphens. For
example I want to sort "65,66,66-1,67-1,68,69". Excel sorts it out as
"65,66,68,69,66-1,67-1". What I want it to give me is
"65,66,66-1,67-1,68,69". Any ideas on how to do this in a simple manner?
I
have had some ideas thrown at me but they are all rather involved and I
would
like to be able to sort in this manner often. Thanks.



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
sorting cells that contain spaces and hyphens amaries Excel Discussion (Misc queries) 2 October 15th 07 03:19 PM
numbers contain hyphens to dates bill gras Excel Worksheet Functions 1 August 11th 05 04:39 AM
how do i remove hyphens from between numbers ian78 Excel Worksheet Functions 5 April 13th 05 02:41 PM
How do i remove the hyphens between numbers without having to edi ian78 Excel Discussion (Misc queries) 2 April 12th 05 04:39 PM
Does XL2K have "hard hyphens" (non-break hyphens)? StargateFan Excel Discussion (Misc queries) 0 January 29th 05 01:36 PM


All times are GMT +1. The time now is 05:20 AM.

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

About Us

"It's about Microsoft Excel"