sorting ip is not straight forward (mind you finding duplicates is) you might find the following useful anyway
10.10.10.100
10.10.10.9
10.10.10.200
10.5.10.15
sorts as
10.10.10.100
10.10.10.200
10.10.10.9
10.5.10.15
you need to pad out the octets to 3 digits or convert to real value one way is to put this in an adjacent column then sort assuming ip starts in a1
=((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))))
you then get
10.5.10.15
10.10.10.9
10.10.10.100
10.10.10.200
or try this udf put in new module then us as =ipsort(a1) this pads out the octets then you can sort
eg
10.5.10.15 becomes 010.005.010.015
code from DMcRitch http://www.office-archive.com/4-exce...e8631f02bf.htm
Bookmarks