bonjour,
une proposition via macro
Sub aargh()
With Sheets("feuil2")
dl = .Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To dl
If .Cells(i, 2) = "N" Then
.Cells(i, 4) = .Cells(i, 3)
If .Cells(i, 3) > maxv Then maxv = .Cells(i, 3)
ElseIf .Cells(i, 3) > maxv Then
.Cells(i, 4) = .Cells(i, 3)
maxv1 = .Cells(i, 3)
Else
maxv1 = maxv1 + 1
.Cells(i, 4) = maxv1
End If
Next i
End With
End Sub