I'm running a PROCV on one column, looking for values from another. The code runs up to a certain value and the error quoted appears. But there is no difference in the numbers, I have already put all values as the first one to test and continue giving the same error (always in the 8th row of the column).
follow the code
i = 2
Do Until Range("F" & i) = ""
Range("H" & i).Select
ActiveCell.FormulaR1C1 = "=IF(VLOOKUP(R[0]C[-2],C[-5],1,FALSE), ""OK"")"
If Cells(8, i).Value = "OK" Then 'Aqui aparece o erro
Cells(8, i).Copy
Sheets("Teste").Select
Cells(j, 2).Select
Sheets("Planilha4").Select
j = j + 1
End If
i = i + 1
Loop