Tu vas dire que je cherche Sihamidi à quatorze heures... Mais, la somme de quoi ? La somme de toutes les cellules de la ligne ? La somme des cellules des colonnes A à Z (avant AA) ? Pourrais-tu préciser et/ou mettre un petit exemple en pièce jointe.
Dim i As Integer
Sub Essai()
For i = 7 To 26
If Cells(i, 6) = 0 Then
Range(Cells(i, 1), Cells(i, 6)).EntireRow.Hidden = True
Else
Cells(i + 1, 6).Select
End If
Next
End Sub
Bonjour sihamidi, Bonjour Robert , JBARBE
Une proposition pour masquer / afficher les lignes (et pas les supprimer)
VB:
Private Sub CommandButton1_Click()
Dim i&
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
If CommandButton1.Caption = "Masquer les lignes" Then
CommandButton1.Caption = "Afficher les lignes"
For i = 7 To Cells(Rows.Count, 1).End(xlUp).Row
Rows(i).Hidden = Cells(i, 6) = 0
Next i
Else
CommandButton1.Caption = "Masquer les lignes"
Rows.Hidden = False
End If
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Le code est dans le code de la feuille.
Cordialement