1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Sub sommenominal1TARGET()
Dim somme As Double
Dim ligne As Integer
Dim colonne As Integer
Dim derniereligne As Long
Dim lignee
derniereligne = Range("f" & Rows.Count).End(xlUp).Row + 1
For lignee = derniereligne To derniereligne
With Sheets("Risque Client")
.Range("f" & lignee).Borders.Value = 1
End With
Next lignee
somme = 0
ligne = derniereligne
colonne = 6
Do While Cells(ligne, colonne) <> ""
somme = somme + Cells(ligne, colonne)
ligne = ligne + 1
Loop
Cells(ligne, colonne) = somme
End Sub |
Partager