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 how to sort worksheets

That sort magic is all in the comparison of the names to each other.

You will need to modify Pearson's code to do a different type of comparison

Extract the first 8 characters from the name and convert that to a date.
then compare the dates

if they match, then compare the remainder.

--
Regards,
Tom Ogilvy


"jnf40" wrote in message
...
I have tried Chip Pearson's sorting codes and I can't get it to work on my
worksheet names, maybe it can't be done... My worksheet names are created
by
code...the names are as follows:
01-01-06 CSB 18" RCP; 01-01-06 CSB 18" RCP (2); 12-01-05 CSB 18" RCP
after the sort I would like the order to be:
12-01-05 CSB 18" RCP; 01-01-06 CSB 18" RCP; 01-01-06 CSB 18" RCP (2)...
Can this be done?