Forum Discussion
Debbo1984
Mar 23, 2023Copper Contributor
Sorting
I have a long excel worksheet with several columns. One of the columns lists different titles of employees at the upper levels found in a public university with a corresponding code. For example, co...
OliverScheurich
Mar 23, 2023Gold Contributor
=SORTBY(C1:C18,NUMBERVALUE(MID(C1:C18,FIND("(",C1:C18)+1,FIND(")",C1:C18)-FIND("(",C1:C18)-1)))
With Office 365 or Excel for the web you can try this formula.
Hecatonchire
Mar 23, 2023Iron Contributor
Hi,
This
=SORTBY(C1:C18,MID(C1:C18,FIND("(",C1:C18),9)*-1)
9 so it's for numbers <= 9 999 999
replace 9 by 99 for more
- OliverScheurichMar 23, 2023Gold Contributor
Thank you for your formula which works perfectly however i don't understand why the *-1 works.
Another alternative which works in my sheet is this formula.
=SORTBY(C1:C18,NUMBERVALUE(TEXTAFTER(TEXTBEFORE(C1:C18,")"),"(")))
- HecatonchireMar 23, 2023Iron Contributor
For my Excel (5) is negative
"(5)" * 1 = -5
So all the value of the MID are converted to negative with *1 so i use *-1 to reverse the inversion.