The value of the cell is always "error" no matter if the condition is true or not. I've tried using else but it doesn't work either.
Sub ejer_4()
Cells(3, 1).Value = "hola"
For i = 2 To 21:
If Int(Cells(i, 3).Value) <> Int(Cells(i + 1, 3).Value) - 1 Then
Cells(3, 1).Value = "Error"
End If
Next
End Sub
Aucun commentaire:
Enregistrer un commentaire