peux-tu tester ceci
(à partir de la cellule ou le pourcentage manque on controle vers le haut puis vers le bas)
je crains cependant que sur la totalité des lignes la macro soit un peu longue
qu'en est-il de la solution precedant la mienne ?
Sub pourcent()
colak = Range('AK1').Column
For Each c In Range('C3:C5249')
tot = 0
If c = Cells(c.Row - 1, c.Column) And Cells(c.Row, colak) = '' Then
For n = 1 To 10
If Cells(c.Row - n, c.Column) = c Then
tot = tot + Cells(c.Row - n, colak)
Else
Exit For
End If
Next
For n = 1 To 10
If Cells(c.Row + n, c.Column) = c Then
tot = tot + Cells(c.Row + n, colak)
Else
Cells(c.Row, colak) = 100 - tot
Exit For
End If
Next
End If
Next
End Sub