Sort AlphaNumeric with structured references in Excel

后端 未结 4 934
醉梦人生
醉梦人生 2020-12-12 03:34

I Have an Excel Sheet with data that looks like that.

Data
x=1.1
x=11.2
x=10.3
x=1.4
x=2.5;2.6
x=2.1
x=4.7
x=6.8
x=6.2;6.3
x=1.10

What i wa

相关标签:
4条回答
  • 2020-12-12 04:02

    The Solution to the Problem is:

    =LEFT(IF(ISNUMBER(SEARCH(";";A1));LEFT(A1;FIND(";";A1;1)-1);A1);2)&TEXT(--MID(IF(ISNUMBER(SEARCH(";";A1));LEFT(A1;FIND(";";A1;1)-1);A1);3;FIND(".";IF(ISNUMBER(SEARCH(";";A1));LEFT(A1;FIND(";";A1;1)-1);A1)&".")-3);"000;@") &TEXT(--MID(IF(ISNUMBER(SEARCH(";";A1));LEFT(A1;FIND(";";A1;1)-1);A1);FIND(".";IF(ISNUMBER(SEARCH(";";A1));LEFT(A1;FIND(";";A1;1)-1);A1)&".")+1;99);"000;@")
    
    0 讨论(0)
  • 2020-12-12 04:18

    Copy the data into a new column say B If you are using excel 2007 or higher, go to data tab --> text to columns option after selecting your data in B

    Here you can choose delimited and it will separate your data into 2 columns. Then apply the sorting based on this column

    0 讨论(0)
  • 2020-12-12 04:21

    In an unused column to the right, use this formula starting in row 2,

    =LEFT(A2, 2)&TEXT(--MID(A2, 3, FIND(".", A2&".")-3), "000;@")&TEXT(--MID(A2, FIND(".", A2&".")+1, 99), "000;@")
    

    Fill down as necessary then sort conventionally using the helper column as the primary sort key.

            Sort with Helper column

    0 讨论(0)
  • 2020-12-12 04:29

    If you put a 0 prior to the numbers, that would take care of it.

    X=01.1

    Or, in a convoluted way, split the column as recommended above, sort the way you want and then reassemble. I would also create a column with the right 1-n sequence, just in case I need to sort in a particular way, but the come back to the original sort.

    0 讨论(0)
提交回复
热议问题