Forum Discussion

lufifocabo's avatar
lufifocabo
Copper Contributor
Nov 16, 2024
Solved

Order rows ascending by number with text that include 'numbers and letters'

Hello, I have a excel file with several columns and on the first column I have rows with repeated text that include numbers and 'numbers and letters' (1(several times), 5D(several times), 10A(severa...
  • lufifocabo's avatar
    Nov 17, 2024

    Thank you very much guys. I figured it out with the helper column. I couldn't make the regexextract work but I found another way. I am too lazy to investigate SQL and how it works.

    I am sure the way I found it's not the most direct... but it works.

    Data on column A

    1. Column B (to determine the position of last digit)
    =MAX(ISNUMBER(VALUE(MID(A2;{1;2;3;4;5;6;7;8;9};1)))*{1;2;3;4;5;6;7;8;9})+1

    2. column C (to separate the numbers)
    =VALUE(LEFT(A2;B2-1))

    3. column D (to separate the letters)
    =TRIM(RIGHT(A2;LEN(A2)-B2+1))

    Then I just order by number

Resources