OVH Cloud OVH Cloud

En VBA comment soustraire

1 réponse
Avatar
André
Bonjour,

J'ai écrit:
For h = 8 To 172
If Cells(h, "d") = "Total" Then
Range("F3").Formula = Application.WorksheetFunction.Sum(Range("F3") +
Cells(h, "f"))
End If
If Cells(h, "d") = "" Then
Exit For
End If
Next h

Cells(3, "f") = Cells(3, "f") - Cells(6, "f") - Cells(7, "k"), cette ligne
ne fonctionne pas.

Je fais appel à vos connaissances pour faire cette soustraction.
Merci.

1 réponse

Avatar
Emmanuel DURAND
Cells(3, "f") = Cells(3, "f") - Cells(6, "f") - Cells(7, "k"), cette ligne
fonctionne chez moi... assure toi qu'il y ait des valeurs correctes :

If IsNumeric(Cells(6, "f").Value) Then


Courage