Bonjour,
J'essaie de compter le nombre de lignes entre date +1 et date - 30. Pourriez-vous m'aider SVP
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Sub compte_NotInstalled() Dim P, NbLigneDecompte As Long Dim plage, plage2 As Range Dim NP As Integer NbLigneDecompte = Sheets("Decompte").Cells(65536, 1).End(xlUp).Row Set plage = Range("E4:E" & Range("A4").End(xlDown).Row) For P = plage.Cells.Count To 1 Step -1 If (plage.Cells(P).Value < Date + 1) And (plage.Cells(P).Value > Date - 30) Then plage.Cells(P).Count = NP End If Next P Sheets("Decompte").Cells(NbLigneDecompte + 1, 6) = NP End Sub
Partager