IP address format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I reformat IP addresses out of a text string so that I can use their
values in my excel/vb functions. Thanks
 
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
 
Debug.Print Arr(Ndx)
should be
Debug.Print Arr(N)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Break each component down into separate cells with Data>Text to Columns and
a separator of stop '.'

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top