gh4
XLDnaute Occasionnel
excel 2007
bonjour,
j'ai une différence de résultat quand je compare 2 cellules soit en macro soit en formule depuis la cellule et je ne sait pas pourquoi
par formule =SI(E2+F2-H2=B2;"OK";"ERREUR") tous les résultats sont bons
en macro certains résultats sont faux
Sub Macro3()
derniereligne = Cells(Rows.Count, 3).End(xlUp).Row
lign = derniereligne
colon = 3
27
'lign = 26
If lign = 1 Then GoTo 30
x = Cells(lign, colon + 2) + Cells(lign, colon + 3) - Cells(lign, colon + 5)
y = Cells(lign, colon - 1)
If x <> y Then
Cells(lign, colon + 4) = "ERREUR"
lign = lign - 1
GoTo 27
End If
If x = y Then
Cells(lign, colon + 4) = "OK"
lign = lign - 1
GoTo 27
End If
30
End Sub
si quelqu'un avait une idée.
par avance merci
Cordialement
bonjour,
j'ai une différence de résultat quand je compare 2 cellules soit en macro soit en formule depuis la cellule et je ne sait pas pourquoi
par formule =SI(E2+F2-H2=B2;"OK";"ERREUR") tous les résultats sont bons
en macro certains résultats sont faux
Sub Macro3()
derniereligne = Cells(Rows.Count, 3).End(xlUp).Row
lign = derniereligne
colon = 3
27
'lign = 26
If lign = 1 Then GoTo 30
x = Cells(lign, colon + 2) + Cells(lign, colon + 3) - Cells(lign, colon + 5)
y = Cells(lign, colon - 1)
If x <> y Then
Cells(lign, colon + 4) = "ERREUR"
lign = lign - 1
GoTo 27
End If
If x = y Then
Cells(lign, colon + 4) = "OK"
lign = lign - 1
GoTo 27
End If
30
End Sub
si quelqu'un avait une idée.
par avance merci
Cordialement