+ Reply to Thread
Results 1 to 4 of 4

Sorting row with a alphanumeric value.

Hybrid View

  1. #1
    Registered User
    Join Date
    02-12-2004
    Posts
    17

    Sorting row with a alphanumeric value.

    I want to sort out my row by ascending/descending order. I know there is a function for that, but when i have Alpha-numeric value in my cell (like B1, B2, B3) i can't sort it. When i try to sort my row B11 comes after B1, but i want B2 to come after B1. Can anyone solve my problem?

    Thank you.
    --- Shakhawat
    =======================
    Md. Shakhawat Hossain Patwary
    Research Assistant
    Department of Civil Engineering
    Dalhousie University
    D304-1360, Barrington Street
    Halifax, Nova Scotia
    Canada B3J 2X4
    Talk: (902) 494 -3821

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You would have to introduce a helper column that extracts the number and then sort by that column...

    if it is indeed as you say, i.e. b1, b11, b45... then a formula like =--Mid(A2,2,255) would extract the number from A2...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-16-2007
    Posts
    43
    If at all possible, I try to format my alphanumerics to include leading zeros. You'd have B01, B02, B03, ..., B11, B12, etc.

    That would solve your sorting problem, but I'll be the first to admit it's not always possible to go that route.

    Brigitte

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    You could create a personalized list using those values.

    Go to "tools" "Options" "Personalized list" and import those values sorted as you want.

    You can then use the sort option from your "data" tab and use the "custom sort" to "sort by" the list you just created.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1