View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Roger[_11_] Roger[_11_] is offline
external usenet poster
 
Posts: 1
Default macro and wildcard

I am trying to get a wildcard to work in a macro.

Sub Merge()
Dim intRow As Integer
Dim txt As String
intRow = 1
Do Until IsEmpty(Cells(intRow, 2))
If Cells(intRow, 2) = "0x" Then
Cells(intRow, 2) = Cells(intRow, 24)
If Cells(intRow, 24) = "ip:source-ip=192.168.1.*" Then
Cells(intRow, 2) = "value 3"
End If
If Cells(intRow, 24) = "ip:source-ip=192.168.2.*" Then
Cells(intRow, 2) = "value 2"
End If
If Cells(intRow, 24) = "ip:source-ip=192.168.3.*" Then
Cells(intRow, 2) = "value 1"
End If
End If
intRow = intRow + 1
Loop
Columns(1).AutoFit
End Sub

Will this wildcard logic work at all? I know as it currently is it will
not.

Any help appreciated

thanks

Roger