Yess – I finally got my Microsoft Excel 2010 formula working. My local settings use semicolon (“;”) instead of comma (“,”) that was used on this source at Microsoft forum (short link: http://littleurl.info/j1p). Thanks to Zorvek.
- Place the IP addresses You want to sort in colum A
- Place the formula below in column B
- Sort Your columns with B as the sorting key.
- Voilà – You manage hopefully to sort IP addresses correctly!
Norwegian regional settings (semicolon “;”)
<br>=MID("00"&+A1;LEFT(FIND(".";A1)-1);3) &"."& RIGHT("00"&MID(A1;FIND(".";A1)+1;FIND("|";SUBSTITUTE(A1;".";"|";2))-FIND(".";A1)-1);3) &"."& RIGHT("00"&MID(A1;FIND("|";SUBSTITUTE(A1;".";"|";2))+1;FIND("|";SUBSTITUTE(A1&".";".";"|";3))-FIND("|";SUBSTITUTE(A1;".";"|";2))-1);3) &"."& RIGHT("00"&RIGHT(A1;LEN(A1)-FIND("|";SUBSTITUTE(A1;".";"|";LEN(A1)-LEN(SUBSTITUTE(A1;".";"")))));3)<br>
England / U.S.A. regional settings (comma “.”)
<br>=MID("00"&+A1,LEFT(FIND(".",A1)-1),3) &"."& RIGHT("00"&MID(A1,FIND(".",A1)+1,FIND("|",SUBSTITUTE(A1,".","|",2))-FIND(".",A1)-1),3) &"."& RIGHT("00"&MID(A1,FIND("|",SUBSTITUTE(A1,".","|",2))+1,FIND("|",SUBSTITUTE(A1&".",".","|",3))-FIND("|",SUBSTITUTE(A1,".","|",2))-1),3) &"."& RIGHT("00"&RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,".","|",LEN(A1)-LEN(SUBSTITUTE(A1,".",""))))),3)<br>