Friday, July 25, 2008   
  Search  
 
Register  Login  
Forums  
   Get Your Own E-Mail Account @MeraWindows.com Minimize  
New Page 1 New Page 1
Show your cool quotient with @merawindows.com email account
     
  
     Minimize  

Welcome to MeraWindows forums.

Thank you for being at the Microsoft Windows Community Site. You may have to register before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  
 
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  sorting list of numbers or strings from right to left
Previous Previous
 
Next Next
New Post 2/17/2008 7:47 AM
User is offline Peter.Bialas
1 posts
Member


sorting list of numbers or strings from right to left  
Modified By Peter.Bialas  on 2/17/2008 8:05:39 AM)

 

Looking for an elegant (macro) solution.
Sometimes data records have the "interesting" detail in the end, so an analysis of patterns etc. would be much
helped if we could sort them the way you see in the attached (simplified) example.
I tried recording a macro but even with that manual approach I run into a problem (highlighted).
What now?

 

Original sequence

convert as     = Sort expanded     =  Concatenate   back  Desired output Ascending
14354  text to  columns 1 4 3 5 4  on last right  9 2 1 2 0  to string 92120
23992  using column 2 3 9 9 2  column 4 2 0 5 1   42051
39267  breaks 3 9 2 6 7  (ascending) 2 3 9 9 2   23992
42051   4 2 0 5 1   1 4 3 5 4   14354
46886   4 6 8 8 6   8 3 4 0 5   83405
65747   6 5 7 4 7   4 6 8 8 6   46886
83405   8 3 4 0 5   3 9 2 6 7   woops, why here? 65747
90287   9 0 2 8 7   6 5 7 4 7   39267
92120   9 2 1 2 0   9 0 2 8 7   90287
98989   9 8 9 8 9   9 8 9 8 9   98989
                             
                            (= sorted with values seen reverse)
 
New Post 2/17/2008 8:38 AM
User is offline Ashish Mathur
27 posts
www.ashishmathur.com
Member




Re: sorting list of numbers or strings from right to left  

Hi Peter,

Thank you for yoru query.  You may access my workaround to your Excel problem from the following link.  Please scroll down to question 13.

Hope this helps.


For Microsoft Excel trainings in India, please visit http://ashishmathur.com/training.aspx

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
www.ashishmathur.com

 
Previous Previous
 
Next Next
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  sorting list of numbers or strings from right to left