You are actually sorting the decimal value of the IP Address.

A2: IP Address

B2:

1 |
=LEFT(A2,(FIND(".",A2))-1)*256^3+RIGHT(LEFT(A2,(FIND(".",A2,(FIND(".",A2))+1))-1),(FIND(".",A2,(FIND(".",A2))+1))-(FIND(".",A2))-1)*256^2+RIGHT(LEFT(A2,(FIND(".",A2,(FIND(".",A2,(FIND(".",A2))+1))+1))-1),(FIND(".",A2,(FIND(".",A2,(FIND(".",A2))+1))+1))-(FIND(".",A2,(FIND(".",A2))+1))-1)*256+RIGHT(A2,LEN(A2)-(FIND(".",A2,(FIND(".",A2,(FIND(".",A2))+1))+1))) |