the problem with that is that I need the IP address still. The text to
columns splits it up but I loose the IP. I also need this to do it
automatically.
To do this automatically you need an event macro.
The following macro should do what you want.
Any entry made in column A will be parsed into the adjacent columns (same row)
being split up by periods.
No error checking is done to ensure a valid entry.
The four columns to the right of the target will be CLEARed without warning.
Again, this can be changed if required.
You may change the value of aoi, and also the destination parameter, depending
on your requirements.
You may also add error checking for valid IP type entries, if required for your
application.
To enter this, right click on the sheet tab and select View Code.
Paste the code below into the window opens.
===============================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim aoi As Range
Dim c As Range
Dim i As Integer
Set aoi = [A:A]
Application.EnableEvents = False
On Error Resume Next
If Not Intersect(Target, aoi) Is Nothing Then
For Each c In Target
If Not Intersect(c, aoi) Is Nothing Then
For i = 1 To 4
c.Offset(0, i).Clear
Next i
c.TextToColumns Destination:=c.Offset(0, 1), _
DataType:=xlDelimited, Other:=True, OtherChar:=".", _
FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4,
1))
End If
Next c
End If
Application.EnableEvents = True
End Sub
================================
HTH,
--ron