Excel vba trouble
Hi All,
I am trying to write code, that looks in a text string in column a, it looks for a secific text, if true i want it to be a result in column n, but i am having problems. any help would be great.
here is my code so far
Sub Macro4()
Dim a As Integer
Sheets("Data").Select
For a = 2 To Range("a65536").End(xlUp).Row
If (InStr(1, Cells(a, 1).Value, "VLAB-Kerberos")) Then
Cells(n, 1).Value = "VLAB"
Else: Cells(n, 1).Value = ""
End If
Next
' MsgBox (InStr(1, Cells(2, 2), "abc", vbTextCompare))
End Sub
thanks Liam
|