Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert IP address to XXX.XXX.XXX.XXX
I need to convert a list of ~1000 IP address to XXX.XXX.XXX.XXX format in
order to sort them. Can anyone help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert IP address to XXX.XXX.XXX.XXX
Since each segment (xxx) maybe 1, 2 , or 3 digits, you can use a new column
where you re-format the ip for the sole pupose of sorting: 000-000-000-000 Say your ip is in column A starting in row 2: - insert new blank columns B,C,D,E - in B2: =FIND(".",A2) <-- finds the first dot in the ip - in C2: =FIND(".",A2,B2+1) <-- finds the second dot - in D2: =FIND(".",A2,C2+1) <-- finds the 3rd dot - in E2: =TEXT(LEFT(A2,B2-1),"000")&"-"&TEXT(MID(A2,B2+1,C2-B2),"000")&"-"&TEXT(MID(A2,C2+1,D2-C2),"000")&"-"&TEXT(RIGHT(A2,LEN(A2)-D2),"000") -- reformats ip as 000-000-000-000 - Copy/paste these formulas down along the ip data - sort by column E Regards, Sebastien "AVBBEN" wrote: I need to convert a list of ~1000 IP address to XXX.XXX.XXX.XXX format in order to sort them. Can anyone help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert IP address to XXX.XXX.XXX.XXX
format cells custom
type ###"."###"."###"."### -----Original Message----- I need to convert a list of ~1000 IP address to XXX.XXX.XXX.XXX format in order to sort them. Can anyone help? . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert IP address to XXX.XXX.XXX.XXX
Won't work, IP addresses already have the dot, but not necessarily leading
zeroes as the OP wants. -- HTH ------- Bob Phillips "DMoney" wrote in message ... format cells custom type ###"."###"."###"."### -----Original Message----- I need to convert a list of ~1000 IP address to XXX.XXX.XXX.XXX format in order to sort them. Can anyone help? . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert IP address to XXX.XXX.XXX.XXX
see
Sorting TCP/IP Addresses, and the like http://www.mvps.org/dmcritchie/excel/sorttcp.htm --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "AVBBEN" wrote in message ... I need to convert a list of ~1000 IP address to XXX.XXX.XXX.XXX format in order to sort them. Can anyone help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert a picture to a cell address. | Excel Discussion (Misc queries) | |||
Function to convert to email address? | Excel Worksheet Functions | |||
Convert Relative to absolute address | Excel Discussion (Misc queries) | |||
how can i convert an email address to a web address | Excel Worksheet Functions | |||
Convert IP Address to Host Name | Excel Programming |