Forum Discussion
lufifocabo
Nov 16, 2024Copper Contributor
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...
- 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})+12. 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
Harun24HR
Nov 16, 2024Bronze Contributor
- If you want to sort on same columns then you need a additional helper column. On that helper column extract numbers using function then sort by that column.
- If you want to sort data to other places, then you can use SORTBY() function bases on a virtual column made by formula.