CassioGodinho,
Does it have to be a macro? What you're looking for can be accomplished with a formula in cell B3 and copied down:
=IFERROR(VLOOKUP(A3,F:G,2,0),"")
If it has to be a macro, you can input the formula programmatically and then convert the results to values, no loop necessary:
Sub tgr()
Application.Calculation = xlCalculationManual
With Range("A3:A500").Offset(, 1)
.Formula = "=IFERROR(VLOOKUP(A3,F:G,2,0),"""")"
Calculate
.Value = .Value
End With
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks