View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Sorting problem, need some help

Assuming your data in A1:A8
create dummy column B and column C

In B1 =--LEFT(A1,FIND("-",A1)-1)
In C1 =RIGHT(A1,LEN(A1)-FIND("-",A1))

Data Sort Sort by select Column B Ascending Then by Column C Ascending





"Chris B" wrote:

I'm trying to sort a text field that has both numbers and alphas in it, I am
not able to get it to sort right at all. Listed is how it is sorting followed
by how it needs to be. Any help would be appreciated.

This is how it is sorting:
1002086-A
1002-G
1003923-FB
1003-A
1003-G
1005243-01
1005-G
20-A

I need it to sort:
20-A
1002-G
1003-A
1003-G
1005-G
1002086-A
1003923-FB
1005243-01