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

How can I reformat IP addresses out of a text string so that I can use their
values in my excel/vb functions. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default IP address format

The Split function can split the IP address in to an array.


Dim S As String
Dim Arr As Variant
Dim N As Integer
S = 12.34.56.78
Arr = Split(S,".")
For N = LBound(Arr) To UBound(Arr)
Debug.Print Arr(Ndx)
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"shois" wrote in message
...
How can I reformat IP addresses out of a text string so that I
can use their
values in my excel/vb functions. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default IP address format

Debug.Print Arr(Ndx)
should be
Debug.Print Arr(N)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chip Pearson" wrote in message
...
The Split function can split the IP address in to an array.


Dim S As String
Dim Arr As Variant
Dim N As Integer
S = 12.34.56.78
Arr = Split(S,".")
For N = LBound(Arr) To UBound(Arr)
Debug.Print Arr(Ndx)
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"shois" wrote in message
...
How can I reformat IP addresses out of a text string so that I
can use their
values in my excel/vb functions. Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default IP address format

Break each component down into separate cells with DataText to Columns and
a separator of stop '.'

--

HTH

RP
(remove nothere from the email address if mailing direct)


"shois" wrote in message
...
How can I reformat IP addresses out of a text string so that I can use

their
values in my excel/vb functions. Thanks



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
for Email address format Lakshmanagm Excel Worksheet Functions 2 February 27th 09 12:48 PM
Address number changes to calendar format timbo2008au Excel Discussion (Misc queries) 5 April 18th 08 12:01 PM
How do I put my OE Address Book in a csv format hildos Excel Discussion (Misc queries) 1 April 8th 08 10:17 PM
Address Format Problem [email protected] Excel Discussion (Misc queries) 3 May 4th 07 08:33 AM
How to format a cell as email address Steve Freides Excel Discussion (Misc queries) 4 September 21st 05 08:38 PM


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