Bonjour,
J'ai une boucle qui calcule même le vide par contre je voulais qu'il calcule seulement les données existe,
Merci de m'aider a corrigé l'erreur.
Sub calculShift()
Dim ws As Worksheet
Const SourceColumn As String = "B"
Const DestColumn As String = "E"
Const TotalCell As String = "somTotal"
Const StartRow As Long = 5
Dim i As Long
On Error Resume Next
Set ws = Sheet4
With ws
For i = 5 To Range("E" & StartRow).End(xlDown).Row
Range("E" & i).Formula = "=(" & "B" & i & "/" & TotalCell & ")*100"
Next i
Columns("E").NumberFormat = "0.00"
End With
On Error GoTo 0
End Sub