Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Excel Marco for IP Address
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Convert Word address list to Excel | Excel Discussion (Misc queries) | |||
how do I add a 'web address' to a cell in excel with a hyperlink? | New Users to Excel | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel | |||
Word address labels to Excel Columns | Excel Discussion (Misc queries) |