1
I am running a PROCV in one column, looking for values of another. The code runs to a certain value and appears the error quoted. But there is no difference in the numbers, even I have already put all values as the first to test and continue giving the same error (always in the 8th row of the column).
follows 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
						
Behold documentation of the Range.Cells property, where the syntax is:
.Cells(Linha,Coluna). So since you want the H column, try reversing 8 and i. So it would be:If Cells(i, 8).Value = "OK" Then– danieltakeshi
It had already reversed, it did not solve the problem. The error in the first row of the table instead of the 8.
– Leandro Lazari