View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Fomat cells for IP address including leading Zeros

On Fri, 08 Jun 2007 08:20:51 -0700, Pete wrote:

I replied to the following thread: http://tinyurl.com/2ky6vm, but it
was a month old and I've gotten no replies. Therefore, I am creating
this new post to address the matter.

This has been asked previously, but I have never seen a response that
I can understand or apply. I'm using MS Excel 2003. I frequently
need to enter IP addresses into a product called Remedy, and this
product requires that entries contain 12 numerals in IP Address
entries. It would be a huge timesaver to be able to take my lists of
IP Addresses and paste the segment IP addresses into worksheets that
convert them to Remedy Format (with Leading Zeros where necessary.) I
tried the number format ###"."###"."###"."### but this will not add
the leading zeros to IP addresses entered without them.

Is there a means to accomplish this without manually entering the
leading zeros? (unrealistic)
I have minimal scripting experience. Thanks in advance.

Pete Marion
Commonwealth of Pennsylvania
Information Systems
Technology Engineering
Security Architecture


Another method:

With your URL in A10

Select A10
Select Data/Text to Columns/Delimited
Other "."

That will split the URL into A10:D10

Then use this formula:

=TEXT(A10,"000\.")&TEXT(B10,"000\.")&
TEXT(C10,"000\.")&TEXT(D10,"000")


--ron