+ Reply to Thread
Results 1 to 3 of 3

Trouble sorting imported data

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Trouble sorting imported data

    I can't figure out how to get the line #s to sort properly (lines 1.100, 1.101, 1.104 should be at the bottom of the list). I import this data, it comes through as text. I have converted the field to numbers and tried all sorts of functions but no matter what I do the sort remains in this order. It feels like there has to be a systematic way to get this sorted properly.

    Quote Line Number
    805571 1.10
    805571 1.100
    805571 1.101
    805571 1.104
    805571 1.12
    805571 1.13

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Trouble sorting imported data

    assuming 1.10 is in b1 and b1 is text
    then in c1 or another column put

    =TEXT(INT(B1),"0000")&"."&TEXT(MID(B1,FIND(".",B1)+1,3),"000")

    fill down and use that column to sort by
    it sorts as
    1.10
    1.12
    1.13
    1.100
    1.101
    1.104
    Last edited by martindwilson; 03-20-2013 at 07:52 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-20-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Trouble sorting imported data

    Thanks Martin, I never could have come up with such a complex formula on my own.

+ 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