Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort IP address.

I need to sort IP addresses. I capture data from a program and put then in
Excel. I need to be able to insert leading zeros in the sections that have
less than 3-digits. IP address "123.123.123.3". If sorted "123.123.123.254"
comes before "123.123.123.3".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sort IP address.

This Topic has been discussed many times. See this listing and see what you
like:

http://groups.google.co.uk/groups?as...el.*&lr=&hl=en

--
Regards,
Tom Ogilvy

"Dogwoodz" wrote in message
...
I need to sort IP addresses. I capture data from a program and put then

in
Excel. I need to be able to insert leading zeros in the sections that

have
less than 3-digits. IP address "123.123.123.3". If sorted

"123.123.123.254"
comes before "123.123.123.3".



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Sort IP address.

Here is a trick that doesn't require the leading zeros. You will need 5
empty columns to the right of the IP column. If IPs are in column A copy
them to column B. Select the IP list in column B. From the menu select
Data/Text to Columns. Tell the Import Wizard "Delimited" and for the
separator Other type "." (decimal without the quotes). This will create 4
columns with 1 number each from the IP. Now select the entire block of data
(columns A:E) and from the menu select Data/Sort and choose column E -
Ascending. Now you can delete columns B:E, leaving column A sorted
correctly.

Mike F

"Dogwoodz" wrote in message
...
I need to sort IP addresses. I capture data from a program and put then in
Excel. I need to be able to insert leading zeros in the sections that
have
less than 3-digits. IP address "123.123.123.3". If sorted
"123.123.123.254"
comes before "123.123.123.3".



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Excel to Sort by IP Address Mykle Excel Worksheet Functions 0 August 4th 06 04:48 PM
sort e-mail address captain bob Excel Discussion (Misc queries) 1 August 1st 06 09:07 PM
sort in excel using end of email address kj Excel Worksheet Functions 6 November 14th 05 11:49 PM
how do I sort email address by ISP? lucy Excel Worksheet Functions 3 November 14th 05 03:20 PM
How Do I sort an IP address by the 3rd Octet? JF Excel Worksheet Functions 8 October 29th 04 07:38 PM


All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"