1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Sub masquer_lignes()
Dim I As Long, J As Long
Dim Plages
'Tableau des débuts et fins des plages
Plages = Array(122, 130, 184, 192, 198, 207, 228, 237, 245, 249, 260, 266)
Sheets("Non-current Assets form").Select
For I = 1 To 92
If Cells(I, 22).Value = 0 And Cells(I, 1).Value <> "" Then
Rows(I).Hidden = True
End If
Next
For J = LBound(Plages) To UBound(Plages) Step 2
For I = Plages(J) To Plages(J + 1)
If Application.CountA(Rows(I)) = 0 Then 'Si la ligne est vide
Rows(I).Hidden = True 'on masque
End If
Next
Next
End Sub |
Partager