Bonjour,
une solution avec une macro, en faisant l'hypothèse que le total de 6500 doive être obtenu en additionant des lignes consécutives.
Sub aargh()
dl = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To dl
s = s + Cells(i, 5)
If s = 6500 Then
s = 0
ElseIf s > 6500 Then
s = s - Cells(i, 5)
Cells(i, 1).Select
MsgBox "il manque " & 6500 - s & " avant la ligne " & i & " pour faire 6500"
Exit Sub
End If
Next i
End Sub