Excel Marco for IP Address
Sub Test()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
If Len(Cells(i, "A").Value) - (Len(Replace(Cells(i, "A").Value, ".",
""))) = 3 Then
If IsNumeric(Replace(Cells(i, "A").Value, ".", "")) Then
'do something"
End If
End If
Next i
End Sub
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
wrote in message
ps.com...
I have a list of servers in column A, some of the server names are IP
addresses. I need a macro that will determine if the server name
listed is an IP address and if so, do a specfic action.
Example Spreadsheet
A
1 10.2.5.99
2 10.2.5.33
3 34Bob
4 Geroge
5 Luke
Psuedo Code
Check value of column A, Cell X
If value = IP address
copy entire row to other worksheet
delete row
End If
|