Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default 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
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
Convert a picture to a cell address. Hector Excel Discussion (Misc queries) 1 March 28th 09 05:52 AM
Function to convert to email address? [email protected] Excel Worksheet Functions 4 November 12th 07 08:39 PM
Convert Relative to absolute address Yorke Excel Discussion (Misc queries) 6 October 25th 07 07:47 PM
how can i convert an email address to a web address Arvind Sikar Excel Worksheet Functions 3 October 3rd 06 08:06 PM
Convert IP Address to Host Name Ed Wurster Excel Programming 4 October 28th 04 01:14 PM


All times are GMT +1. The time now is 01:21 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"