Wednesday, June 8, 2011

To arrange IP addresses


Type this in cell B1 then arrange these values by expanding and sorting, Wola your IP addresses are sorted. 
 
 
=((VALUE(LEFT(A1, FIND(".", A1)-1)))*256^3)+((VALUE(MID(A1, FIND(".", A1)+1, FIND(".", A1, FIND(".", A1)+1)-FIND(".", A1)-1)))*256^2)+((VALUE(MID(A1, FIND(".", A1, FIND(".", A1)+1)+1, FIND(".", A1, FIND(".", A1, FIND(".", A1)+1)+1)-FIND(".", A1, FIND(".", A1)+1)-1)))*256)+(VALUE(RIGHT(A1, LEN(A1)-FIND(".", A1, FIND(".", A1, FIND(".", A1)+1)+1)))) 
 

No comments:

Post a Comment