Sorting List of IP Addresses


Posted by Kelly Steensma on August 24, 2001 9:55 AM

Anyone have a great idea of how to sort a list of IP addresses? Excel sorts my list like this:
1.10.1.5
1.100.1.5
1.1000.1.5
1.2.1.5
1.200.10.5
1.3.1.5

I need it sorted like this:
1.2.1.5
1.3.1.5
1.10.1.15
1.100.1.5
1.200.10.5
1.1000.1.5

One good way to make this work would be to break each ip address into four distinct columns and then sort A,B,C & then D, but I can't think of any formuals that would divide the cell based on when a decimal is encountered.



Posted by Mark W. on August 24, 2001 9:58 AM

Kelly, you don't need a formula... just use the
Data | Text to Columns... menu command to parse
a Delimited file specifying the delimiter as ".".