If data exsits in B1:B16 prior to running the code, then if no match is found
for a given A1:A16 value, the corresponding B value will be set to blank. Is
this what's happening? If so, try:
For i = 1 To 16
res = Application.Match(Range("a" & i), Range("a" & i + 18 & ":a" & i +
50), False)
If Not IsError(res) Then
Cells(i, 2) = Application.VLookup(Range("a" & i), Range("a" & i + 18 &
":B" & i + 50), 2, False)
End If
Next i
"knowtrump" wrote:
JE
Could you please "Comment" your solution.
When I run it it simply erases my data.
--
knowtrump
------------------------------------------------------------------------
knowtrump's Profile: http://www.excelforum.com/member.php...o&userid=19664
View this thread: http://www.excelforum.com/showthread...hreadid=514161