Thread: sort an array
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default sort an array

your values appear to be text. Text would sort as

<20
<5
<60
<9

If you want a numberical sort, you could insert a column next to your data
and use a formula like

=--(Right(A1,Len(A1)-1) [drag fill down the column]

Then sort both columns using the column with the formulas as the sort key.

--
Regards,
Tom Ogilvy


"clui" wrote in message
...
What's the code for sorting an array? For example, my array looks like
this: <20, <5, <60, <9. I want to have it in this order: <5, <9, <20,
<60.

Thanks!


---
Message posted from http://www.ExcelForum.com/