LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting texts and numbers as if it was all numbers


Hi,

I have a list of appartement numbers. Sometimes it's written 102 o
sometimes 102a and 102b.

E.G

102
103
104a
104b
105
(...)

Actually, if I record a macro to sort those valuesm it puts 104a an
104b at the end of the list, without considering them as numbers whic
are locally before 105. Note that it could be one, two, three or mor
digits. It would be a dynamic lenght. The letter too could be dynami
as well.

Is there a way to tell Excel/VBE to sort intelligently this list?

Thx!

Werner


Code
-------------------


Sub Sorting()

Rows("16:29").Select
Selection.Sort Key1:=Range("A16"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub


-------------------

--
Werne
-----------------------------------------------------------------------
Werner's Profile: http://www.excelforum.com/member.php...fo&userid=2430
View this thread: http://www.excelforum.com/showthread.php?threadid=38524

 
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 numbers and numbers that contain text in excel MZ Excel Discussion (Misc queries) 3 November 25th 09 07:45 AM
Extract texts & numbers from one cell into four cells Ed Excel Discussion (Misc queries) 3 January 25th 08 04:57 AM
List of unique texts and numbers vsoler Excel Worksheet Functions 7 May 19th 07 06:47 PM
Conditional Formatting : Numbers & Texts Conflict nayinky Excel Worksheet Functions 3 August 8th 06 07:15 AM
convert numbers to texts sampath Excel Worksheet Functions 1 December 2nd 04 01:18 PM


All times are GMT +1. The time now is 07:02 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"