M
Matilda
Hi,
I am wanting to find a string from a column which matches my variable. I
modified this code of Tom Ogilvy's in a related answer
For Each cell In rngA
res = Application.Match("*" & cell.Value & "*", rngB, 0)
If Not IsError(res) Then
Set rng = rngB(res)
rng.Offset(0, 1).Value = cell
End If
to
For Each cell In rngA
res = Application.Match(myVar, MyRng)
If Not IsError(res) Then
myCode
End If
next
but I get a number in res that in fact is a blank cell. Can't work out what
is happening. Any help appreciated.
I am wanting to find a string from a column which matches my variable. I
modified this code of Tom Ogilvy's in a related answer
For Each cell In rngA
res = Application.Match("*" & cell.Value & "*", rngB, 0)
If Not IsError(res) Then
Set rng = rngB(res)
rng.Offset(0, 1).Value = cell
End If
to
For Each cell In rngA
res = Application.Match(myVar, MyRng)
If Not IsError(res) Then
myCode
End If
next
but I get a number in res that in fact is a blank cell. Can't work out what
is happening. Any help appreciated.