View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default How to sort - Help

So your examples were not all inclusive? The number of letters before the
dash is not always 3 as you show?
Then use
=IF(ISNUMBER(FIND("-",A1,1)), MID(A1,FIND("-",A1,1)+1,255),A1)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yossy" wrote in message
...
this doesn't help, some of my values are cut off. Please How do I sort
using
the country alphabetically. Where no country all data should be lined up
together beneath one another

ABS
ABS_Canada
GBP_JKL_Spain
DCG_Netherland
HNK_France
HGP_Ontario
KLG_France
JKL_Canada

"Bernard Liengme" wrote:

Let's assume the data is in A1..
Make a helper column B with formula in B1: ==MID(A1,5,255)
Sort on this
Remember the column can be hidden is needed
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yossy" wrote in message
...
I have this

ABS
ABS_Canada
DCG_Netherland
HNK_France
HGP_Ontario
KLG_France
JKL_Canada

How do I sort using the country alphabetically. Where no country all
data
should be lined up together beneath one another