+ Reply to Thread
Results 1 to 3 of 3

Sorting problem

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    montgomery, al
    MS-Off Ver
    Excel 2003
    Posts
    1

    Sorting problem

    Hi
    My sorting looks something like this: 1312, 2192, 2193, 21931, 1615A, 1718B, 2193B but it needs to look like: 1312, 1615A,1718B, 2192, 2193, 2193B, 21931. The column is in text and its an inventory database. Please help. Nothing works that I do! Please help.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Sorting problem

    Your incorrectly sorted column is a mixture of sorted numbers then sorted text. You need to align everything then sort.
    Looks like the length of your inventory items are 5 characters maximum.
    Try this

    With the data in A1 use a Helper column with this formula

    =LEFT(A1&" ",5)
    Note 4 spaces above

    Now sort on this new column and everything should sort the way you want.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sorting problem

    Hi

    Let's say that your data, starts in A2. Then in B2, put this formula.

    =LOOKUP(9^9;--LEFT(A2;COLUMN($1:$1)))


    Copy down.

    Then sort by column B(Hide this column if you like)

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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