Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I sort a range of IP addresses typed in Excel?

Status
Not open for further replies.

ril

IS-IT--Management
Jan 2, 2003
1
IN
How do I sort a range of IP addresses typed in Excel? Excel does not seem to succeed in sorting the range of IP addresses typed into cells. Please help!
 
I would guess that Excel is doing its best. As you don't say what is going wrong, I can only guess at it. Excel starts sorting string figures at 0 or in the case of IP addresses, at 1. It doesn't matter if it is 1 10 or 100. This means that 2 is bigger than 100, which leads to confusion.

The only solution I can see is to format the cells as text, add leading zeros to the addresses, sort and then using find and replace throw out the leading zeros again. Be careful not to throw out all of the zeros, however.

All the best,

Carol
Berlin, Germany
 
Hi,

As Carol said, you didn't explained exactly what's wrong but if your cell's format is "Standard" and you type like this :

001.002.003.1
123.002.145.005
245.2.3.1
255.001.002.123

You normally should be able to sort the collumn without any problem.

Good luck ;-)
Ced
Lausanne / Switzerland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top