Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Convert text string to IP address

I've got a bunch of text strings similar to this one: 064190119066. Is there
a way to convert this into an IP address in Excel?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Convert text string to IP address

Hi

Try the formula below, If your data is in A1
=LEFT(A1,3) &"."& MID(A1,4,3 ) &"."& MID(A1,7,3) &"."& RIGHT(A1,3)


--
Best regards
Rajesh Mehmi



"Mike" wrote in message
...
I've got a bunch of text strings similar to this one: 064190119066. Is
there
a way to convert this into an IP address in Excel?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Convert text string to IP address

"Mike" wrote:
I've got a bunch of text strings similar to this one: 064190119066.
Is there a way to convert this into an IP address in Excel?


An IP(v4) address is usually presented in "dot notation", composed of 4
parts, each representing one octet. The representation of each octet may or
may not have leading zeros.

So I presume the above is 64.190.119.66. This can be constructed one of two
ways, depending on your preference:

=left(A1,3) & "." & mid(A1,4,3) & "." & mid(A1,7,3) & "." & right(A1,3)

=--left(A1,3) & "." & --mid(A1,4,3) & "." & --mid(A1,7,3) & "."
& --right(A1,3)

The first form yields 064.190.119.066 . The second form yields
64.190.119.66 . Both forms are equally acceptable.

This presumes that you entered the original 12-character string correctly,
either prefixed by an apostrophe (') or in a cell pre-formatted as Text in
order to preserve the leading zero(s).

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Convert text string to IP address

On Mon, 21 Sep 2009 15:53:01 -0700, Mike
wrote:

I've got a bunch of text strings similar to this one: 064190119066. Is there
a way to convert this into an IP address in Excel?

Thanks!


Here's one way:

=TEXT(A1,"000\.000\.000\.000")

--ron
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
cannot convert text string into value Andy Excel Worksheet Functions 16 September 5th 08 04:52 AM
Convert numbers to text string GARY Excel Discussion (Misc queries) 3 May 22nd 08 05:05 AM
return cell address of longest text string in a range Dave F[_2_] Excel Discussion (Misc queries) 2 July 12th 07 03:41 PM
Convert text string to date AK Excel Worksheet Functions 1 February 1st 06 06:27 PM
How can I convert text to reference ? Ex: ISNUMBER(ADDRESS(6;10;2. FernandoMendes Excel Discussion (Misc queries) 1 January 28th 05 06:54 PM


All times are GMT +1. The time now is 05:39 AM.

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

About Us

"It's about Microsoft Excel"